/* ============================================
   HUMA HR - Core Styles & Layout
   ============================================ */

:root {
    /* Primary Palette - Inspired by Huma's brand */
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #5541D6;
    --primary-bg: #F0EEFF;

    /* Accent Colors */
    --accent-teal: #00CEC9;
    --accent-coral: #FF6B6B;
    --accent-amber: #FDCB6E;
    --accent-green: #00B894;
    --accent-blue: #0984E3;
    --accent-pink: #E84393;

    /* Neutrals */
    --bg-primary: #F8F9FC;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F1F3F9;
    --text-primary: #1A1D2E;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;

    /* Sidebar */
    --sidebar-bg: #1A1D2E;
    --sidebar-text: #C4C7D4;
    --sidebar-hover: rgba(108, 92, 231, 0.15);
    --sidebar-active: rgba(108, 92, 231, 0.25);
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Top bar */
    --topbar-height: 64px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

img {
    max-width: 100%;
}

/* ============================================
   App Container Layout
   ============================================ */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.app-container.logged-out {
    display: block;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
    z-index: 100;
    position: relative;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
    min-width: var(--sidebar-collapsed);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
}

.logo-text {
    color: white;
    font-weight: 700;
    font-size: 18px;
    white-space: nowrap;
    transition: opacity var(--transition-fast);
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-toggle {
    color: var(--sidebar-text);
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar.collapsed .sidebar-toggle {
    display: none;
}

/* Sidebar Search */
.sidebar-search {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.sidebar-search:focus-within {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px var(--primary);
}

.sidebar-search .material-icons-round {
    color: var(--sidebar-text);
    font-size: 20px;
    flex-shrink: 0;
}

.sidebar-search input {
    background: transparent;
    color: white;
    width: 100%;
}

.sidebar-search input::placeholder {
    color: var(--sidebar-text);
}

.sidebar.collapsed .sidebar-search {
    padding: 12px;
    justify-content: center;
}

.sidebar.collapsed .sidebar-search input {
    display: none;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.nav-section {
    padding: 8px 12px;
}

.nav-section-title {
    display: block;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 8px 12px 6px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .nav-section-title {
    text-align: center;
    font-size: 0;
    padding: 4px;
}

.sidebar.collapsed .nav-section-title::before {
    content: '';
    display: block;
    width: 16px;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 auto;
}

.nav-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--sidebar-text);
    transition: all var(--transition-fast);
    position: relative;
    margin-bottom: 2px;
    width: 100%;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-start;
    width: 100%;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: white;
}

.nav-item.active {
    background: var(--sidebar-active);
    color: white;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background:
        radial-gradient(circle at top right, rgba(108, 92, 231, 0.16), transparent 30%),
        radial-gradient(circle at bottom left, rgba(0, 206, 201, 0.16), transparent 32%),
        var(--bg-primary);
}

.login-card {
    width: min(100%, 520px);
    background: var(--bg-secondary);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-brand-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.login-brand-row h1 {
    font-size: 32px;
    line-height: 1.1;
    margin: 4px 0 8px;
}

.login-brand-row p {
    color: var(--text-secondary);
}

.login-eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-demo-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-demo-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.login-demo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    text-align: left;
}

.login-demo-item strong,
.login-demo-item span,
.login-demo-item code {
    display: block;
}

.login-demo-item span {
    color: var(--text-secondary);
    font-size: 12px;
}

.login-demo-item code {
    font-size: 12px;
    color: var(--primary-dark);
}

.nav-item .material-icons-round {
    font-size: 22px;
    flex-shrink: 0;
}

.nav-label {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
    text-align: left;
    line-height: 1.2;
    white-space: nowrap;
    transition: opacity var(--transition-fast);
}

.sidebar.collapsed .nav-label {
    display: none;
}

.sidebar.collapsed .nav-content {
    justify-content: center;
}

.nav-badge {
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

.nav-badge.warn {
    background: var(--accent-coral);
}

.nav-badge.info {
    background: var(--accent-blue);
}

.sidebar.collapsed .nav-badge {
    display: none;
}

/* Sidebar Footer */
.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.06);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    color: white;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.user-role {
    color: var(--sidebar-text);
    font-size: 11px;
    white-space: nowrap;
}

.sidebar.collapsed .user-info,
.sidebar.collapsed .user-menu-btn {
    display: none;
}

.user-menu-btn {
    margin-left: auto;
    color: var(--sidebar-text);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.user-menu-btn:hover {
    color: white;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Top Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--topbar-height);
    padding: 0 28px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 50;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: var(--radius-sm);
}

.breadcrumb {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

.breadcrumb span {
    color: var(--text-primary);
    font-weight: 600;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.top-bar-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.quick-add-btn {
    background: var(--primary);
    color: white;
    font-weight: 600;
    padding: 8px 16px;
}

.quick-add-btn:hover {
    background: var(--primary-dark);
    color: white;
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--accent-coral);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

/* Notification Panel */
.notification-panel {
    position: absolute;
    top: var(--topbar-height);
    right: 28px;
    width: 380px;
    background: var(--bg-secondary);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 200;
    display: none;
    border: 1px solid var(--border);
    border-top: none;
    max-height: 400px;
    overflow-y: auto;
}

.notification-panel.show {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.notification-header h3 {
    font-size: 15px;
    font-weight: 700;
}

.mark-read-btn {
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.notification-item:hover {
    background: var(--bg-tertiary);
}

.notification-item.unread {
    background: var(--primary-bg);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px !important;
}

.notif-info { background: #E0E7FF; color: var(--primary); }
.notif-warn { background: #FEE2E2; color: var(--accent-coral); }
.notif-success { background: #D1FAE5; color: var(--accent-green); }

.notif-text {
    font-size: 13px;
    line-height: 1.5;
}

.notif-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Page Content */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
    scroll-behavior: smooth;
}

/* ============================================
   Modals
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow: auto;
    animation: modalIn 0.25s ease;
}

.modal-lg {
    max-width: 720px;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    color: var(--text-muted);
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Quick Add Grid */
.quick-add-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.quick-add-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.quick-add-item:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-add-item .material-icons-round {
    font-size: 28px;
}

.quick-add-item span:last-child {
    font-size: 12px;
    font-weight: 600;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--sidebar-bg);
    color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    animation: toastIn 0.3s ease;
}

.toast.success { border-left: 4px solid var(--accent-green); }
.toast.error { border-left: 4px solid var(--accent-coral); }
.toast.info { border-left: 4px solid var(--accent-blue); }
.toast.warning { border-left: 4px solid var(--accent-amber); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast .material-icons-round {
    font-size: 20px;
}

.toast-message {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   Common UI Components
   ============================================ */

/* Cards */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
    transition: all var(--transition-fast);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-ghost {
    color: var(--text-secondary);
    padding: 8px 12px;
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--accent-coral);
    color: white;
}

.btn-danger:hover {
    background: #E85555;
}

.btn-success {
    background: var(--accent-green);
    color: white;
}

.btn-success:hover {
    background: #00A386;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn .material-icons-round {
    font-size: 18px;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.badge-active {
    background: #D1FAE5;
    color: #065F46;
}

.badge-inactive {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-pending {
    background: #FEF3C7;
    color: #92400E;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-new {
    background: #E0E7FF;
    color: #3730A3;
}

.badge-onleave {
    background: #FDE8E8;
    color: #B91C1C;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg-tertiary);
}

/* Avatar */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

.avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

.avatar-xl {
    width: 72px;
    height: 72px;
    font-size: 24px;
}

/* Form Inputs */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
    background: white;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 24px;
}

.tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width var(--transition-slow);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .material-icons-round {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto 24px;
}

/* Page Headers */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header-left h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.page-header-left p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.page-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    min-width: 280px;
    transition: all var(--transition-fast);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.search-box .material-icons-round {
    color: var(--text-muted);
    font-size: 20px;
}

.search-box input {
    width: 100%;
    background: transparent;
    color: var(--text-primary);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-chip:hover,
.filter-chip.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--transition-fast);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon .material-icons-round {
    font-size: 24px;
}

.stat-info h3 {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.stat-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stat-change {
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.stat-change.positive { color: var(--accent-green); }
.stat-change.negative { color: var(--accent-coral); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -var(--sidebar-width);
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 200;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-add-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .page-content {
        padding: 16px;
    }

    .top-bar {
        padding: 0 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-bar {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .quick-add-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Animations */
.fade-in {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Chart Placeholder Bars */
.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 120px;
    padding-top: 20px;
}

.chart-bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    min-width: 20px;
    transition: all var(--transition-normal);
    position: relative;
}

.chart-bar:hover {
    opacity: 0.8;
}

.chart-bar-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Donut Chart */
.donut-chart {
    width: 140px;
    height: 140px;
    position: relative;
}

.donut-chart svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-chart circle {
    fill: none;
    stroke-width: 12;
    cx: 70;
    cy: 70;
    r: 58;
}

.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-center .value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.donut-center .label {
    font-size: 11px;
    color: var(--text-muted);
}
