/* =============================================
   InvenTrack v2.0 — Production Design System
   ============================================= */

/* ===== Design Tokens ===== */
:root {
    /* Brand */
    --brand-50: #f0f9ff; --brand-100: #e0f2fe; --brand-200: #bae6fd;
    --brand-300: #7dd3fc; --brand-400: #38bdf8; --brand-500: #0ea5e9;
    --brand-600: #0284c7; --brand-700: #0369a1; --brand-800: #075985; --brand-900: #0c4a6e;

    /* Accent */
    --accent-500: #6366f1; --accent-600: #4f46e5;

    /* Neutrals */
    --n-0: #ffffff; --n-25: #fcfcfd; --n-50: #f8fafc; --n-100: #f1f5f9;
    --n-150: #e8edf3; --n-200: #e2e8f0; --n-300: #cbd5e1; --n-400: #94a3b8;
    --n-500: #64748b; --n-600: #475569; --n-700: #334155; --n-800: #1e293b;
    --n-900: #0f172a; --n-950: #020617;

    /* Semantic */
    --success-50: #f0fdf4; --success-500: #22c55e; --success-600: #16a34a; --success-700: #15803d;
    --warning-50: #fffbeb; --warning-500: #f59e0b; --warning-600: #d97706;
    --danger-50: #fef2f2; --danger-500: #ef4444; --danger-600: #dc2626; --danger-700: #b91c1c;
    --info-50: #eff6ff; --info-500: #3b82f6;

    /* Surfaces */
    --surface: var(--n-0);
    --surface-secondary: var(--n-50);
    --surface-tertiary: var(--n-100);
    --surface-hover: var(--n-100);
    --surface-active: var(--brand-50);

    /* Text */
    --text-primary: var(--n-900);
    --text-secondary: var(--n-600);
    --text-tertiary: var(--n-400);
    --text-inverse: var(--n-0);

    /* Borders */
    --border: var(--n-200);
    --border-hover: var(--n-300);
    --border-focus: var(--brand-500);

    /* Layout */
    --sidebar-w: 264px;
    --sidebar-collapsed-w: 72px;
    --topbar-h: 60px;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.04);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,.2);

    /* Motion */
    --ease: cubic-bezier(.4, 0, .2, 1);
    --duration: 200ms;

    /* Font */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ===== Dark Theme ===== */
body.dark {
    --surface: var(--n-900);
    --surface-secondary: var(--n-800);
    --surface-tertiary: var(--n-700);
    --surface-hover: var(--n-700);
    --surface-active: rgba(14,165,233,.12);
    --text-primary: var(--n-50);
    --text-secondary: var(--n-400);
    --text-tertiary: var(--n-500);
    --border: var(--n-700);
    --border-hover: var(--n-600);
    --shadow-xs: 0 1px 2px rgba(0,0,0,.2);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
    --shadow: 0 4px 6px rgba(0,0,0,.25);
    --shadow-md: 0 10px 15px rgba(0,0,0,.3);
    --shadow-lg: 0 20px 25px rgba(0,0,0,.35);
    --success-50: rgba(34,197,94,.1); --warning-50: rgba(245,158,11,.1);
    --danger-50: rgba(239,68,68,.1); --info-50: rgba(59,130,246,.1);
    --brand-50: rgba(14,165,233,.1);
}

/* =============================================
   LICENSE / LOGIN SCREEN
   ============================================= */
.login-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    transition: opacity .4s var(--ease), visibility .4s;
}
.login-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.login-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.login-particles {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(14,165,233,.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(99,102,241,.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(14,165,233,.04) 0%, transparent 70%);
    animation: loginPulse 8s ease-in-out infinite alternate;
}
@keyframes loginPulse {
    0% { opacity: .6; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}
.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 16px;
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: 0 25px 50px rgba(0,0,0,.4);
    animation: loginSlideUp .5s var(--ease);
}
@keyframes loginSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.login-brand {
    text-align: center;
    margin-bottom: 36px;
}
.login-brand svg {
    margin-bottom: 14px;
    filter: drop-shadow(0 4px 12px rgba(14,165,233,.3));
}
.login-brand h1 {
    font-size: 1.7rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -.02em;
}
.login-brand p {
    font-size: .82rem;
    color: #94a3b8;
    margin-top: 4px;
}
.login-field {
    margin-bottom: 20px;
}
.login-field label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
    letter-spacing: .03em;
}
.login-field label i {
    margin-right: 5px;
    font-size: .72rem;
}
.login-field input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    color: #f1f5f9;
    font-size: .92rem;
    font-family: var(--font);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.login-field input::placeholder { color: #475569; }
.login-field input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}
.login-pw-wrap {
    position: relative;
}
.login-pw-wrap input {
    padding-right: 46px;
}
.login-pw-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px 10px;
    font-size: .9rem;
    transition: color .2s;
}
.login-pw-toggle:hover { color: #94a3b8; }
.login-error {
    color: #ef4444;
    font-size: .8rem;
    min-height: 20px;
    margin-bottom: 8px;
    text-align: center;
    transition: opacity .2s;
}
.login-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.login-btn:hover { opacity: .92; }
.login-btn:active { transform: scale(.98); }
.login-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}
.login-footer {
    text-align: center;
    margin-top: 28px;
}
.login-footer p {
    font-size: .72rem;
    color: #475569;
}

}

@media (max-width: 480px) {
    .login-card { padding: 36px 24px; }
    .login-brand h1 { font-size: 1.4rem; }
}

/* license-screen = login-screen (aynı stil, farklı ID) */
.license-screen { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%); }
.license-screen.hidden { display: none; }

/* ===== Client Session Screen ===== */
.session-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(14,165,233,.3);
}
.session-license-info {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}
.session-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-size: .85rem;
    padding: 6px 0;
}
.session-info-row i {
    width: 18px;
    text-align: center;
    color: #0ea5e9;
    font-size: .8rem;
}
.session-secondary-btn {
    width: 100%;
    padding: 11px;
    background: transparent;
    color: #64748b;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: color .2s, border-color .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.session-secondary-btn:hover {
    color: #94a3b8;
    border-color: rgba(255,255,255,.2);
}

/* ===== Ayarlar — Lisans Bilgileri ===== */
.license-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.license-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.license-info-label {
    font-size: .75rem;
    color: var(--n-400, #94a3b8);
    font-weight: 600;
    letter-spacing: .02em;
}
.license-info-label i {
    margin-right: 4px;
    font-size: .7rem;
    color: var(--primary, #0ea5e9);
}
.license-info-value {
    font-size: .88rem;
    color: var(--n-100, #f1f5f9);
    font-weight: 500;
}
.license-key-masked {
    font-family: monospace, sans-serif;
    letter-spacing: .06em;
}
.license-status-active { color: #22c55e !important; }
.license-status-warn { color: #f59e0b !important; }
.license-status-critical { color: #ef4444 !important; }
.license-status-expired { color: #ef4444 !important; }
.license-status-inactive { color: #64748b !important; }

/* ===== Şifre Değiştir Formu ===== */
.pw-change-field { margin-bottom: 14px; }
.pw-change-field label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}
.pw-change-field label i {
    margin-right: 6px;
    color: var(--brand-500);
    font-size: .78rem;
}
.pw-change-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text-primary);
    font-size: .88rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 200ms;
    box-sizing: border-box;
}
.pw-change-field input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 2px rgba(14,165,233,.15);
}
.pw-change-field input::placeholder { color: #475569; }
.pw-change-error {
    color: #f87171;
    font-size: .8rem;
    margin: 8px 0 0;
    min-height: 1.2em;
}
.pw-change-success {
    color: #22c55e;
    font-size: .8rem;
    margin: 4px 0 0;
    min-height: 1.2em;
}

@media (max-width: 480px) {
    .license-info-grid { grid-template-columns: 1fr; }
}

/* ===== Lisans Durum Çubuğu (Sidebar Alt) ===== */
.license-status-bar {
    margin: 8px 12px 4px;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(14,165,233,.08);
    border: 1px solid rgba(14,165,233,.15);
    font-size: .72rem;
    color: var(--n-400, #94a3b8);
}
.license-status-bar.license-warn {
    background: rgba(245,158,11,.08);
    border-color: rgba(245,158,11,.2);
    color: #fbbf24;
}
.license-status-bar.license-critical {
    background: rgba(239,68,68,.1);
    border-color: rgba(239,68,68,.2);
    color: #f87171;
}
.license-status-bar.license-ok {
    background: rgba(16,185,129,.08);
    border-color: rgba(16,185,129,.15);
    color: #34d399;
}
.license-status-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    font-weight: 600;
}
.license-progress {
    height: 3px;
    background: rgba(255,255,255,.1);
    border-radius: 2px;
    overflow: hidden;
}
.license-progress-fill {
    height: 100%;
    background: currentColor;
    border-radius: 2px;
    transition: width .6s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--surface-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
}

.app-wrapper { display: flex; min-height: 100vh; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--n-300); border-radius: 8px; }
body.dark ::-webkit-scrollbar-thumb { background: var(--n-600); }

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
    width: var(--sidebar-w);
    background: var(--n-900);
    color: var(--n-300);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    transition: width var(--duration) var(--ease), transform .3s var(--ease);
    overflow: hidden;
}

body.dark .sidebar { background: var(--n-950); border-right: 1px solid var(--n-800); }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    min-height: 64px;
}

.brand-logo { flex-shrink: 0; }

.brand-text h1 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-text span {
    font-size: .7rem;
    color: var(--n-500);
    text-transform: uppercase;
    letter-spacing: .08em;
    white-space: nowrap;
}

.sidebar-collapse-btn {
    margin-left: auto;
    background: rgba(255,255,255,.06);
    border: none;
    color: var(--n-400);
    width: 28px; height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    transition: var(--duration) var(--ease);
    flex-shrink: 0;
}

.sidebar-collapse-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Nav */
.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section-label {
    font-size: .65rem;
    font-weight: 700;
    color: var(--n-600);
    letter-spacing: .1em;
    padding: 16px 14px 6px;
    white-space: nowrap;
}

/* Sidebar favorites */
.sidebar-favorites { border-bottom: 1px solid var(--border); padding-bottom: 4px; margin-bottom: 4px; }
.sidebar-favorites .nav-section-label { padding-top: 10px; padding-bottom: 4px; display: flex; align-items: center; }
.sidebar-favorites .nav-link { padding: 6px 14px 6px 18px; font-size: .82rem; }

/* Sidebar collapsible groups */
.nav-group { margin-bottom: 2px; }

.nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--n-300);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 150ms var(--ease);
    white-space: nowrap;
    text-align: left;
}
.nav-group-toggle i:first-child { width: 20px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.nav-group-toggle:hover { background: rgba(255,255,255,.06); color: var(--n-200); }

.nav-group-arrow {
    margin-left: auto;
    font-size: .6rem;
    transition: transform 250ms var(--ease);
}
.nav-group.collapsed .nav-group-arrow { transform: rotate(-90deg); }

.nav-group-items {
    max-height: 600px;
    overflow: hidden;
    transition: max-height 300ms ease;
}
.nav-group.collapsed .nav-group-items { max-height: 0; }

.nav-group-items .nav-link {
    padding-left: 42px;
    font-size: .85rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--n-400);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    transition: all 150ms var(--ease);
    white-space: nowrap;
    position: relative;
    margin-bottom: 2px;
}

.nav-link i { width: 20px; text-align: center; font-size: 1rem; flex-shrink: 0; }

.nav-link:hover { background: rgba(255,255,255,.06); color: var(--n-200); }

.nav-link.active {
    background: linear-gradient(135deg, var(--brand-600), var(--accent-600));
    color: #fff;
    box-shadow: 0 4px 12px rgba(14,165,233,.3);
}

.nav-badge {
    margin-left: auto;
    background: rgba(255,255,255,.12);
    color: var(--n-300);
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.nav-link.active .nav-badge { background: rgba(255,255,255,.25); color: #fff; }

/* Footer */
.sidebar-footer {
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(255,255,255,.06);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background 150ms;
}

.sidebar-user:hover { background: rgba(255,255,255,.06); }

.user-avatar-wrap { position: relative; flex-shrink: 0; }

.user-avatar {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 700;
}

.avatar-status {
    position: absolute; bottom: -1px; right: -1px;
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid var(--n-900);
}

.avatar-status.online { background: var(--success-500); }

.user-meta { display: flex; flex-direction: column; overflow: hidden; }
.user-meta strong { font-size: .82rem; color: var(--n-200); white-space: nowrap; }
.user-meta span { font-size: .7rem; color: var(--n-500); white-space: nowrap; }

.sidebar-version {
    text-align: center;
    font-size: .65rem;
    color: var(--n-600);
    margin-top: 8px;
}

/* Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.visible { display: block; }

/* =============================================
   MAIN CONTENT
   ============================================= */
.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--duration) var(--ease);
}

/* =============================================
   TOP BAR
   ============================================= */
.topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.topbar-left { display: flex; align-items: center; gap: 12px; }

.topbar-menu-btn {
    display: none;
    background: none; border: none;
    color: var(--text-secondary);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 6px;
}

.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
.breadcrumb-item { color: var(--text-tertiary); }
.breadcrumb-item.active { color: var(--text-primary); font-weight: 600; }
.breadcrumb-sep { font-size: .55rem; color: var(--text-tertiary); }

.topbar-center { flex: 1; max-width: 520px; margin: 0 auto; }

.global-search {
    display: flex;
    align-items: center;
    background: var(--surface-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 14px;
    height: 38px;
    gap: 8px;
    transition: border-color var(--duration);
}

.global-search:focus-within {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(14,165,233,.12);
}

.global-search i { color: var(--text-tertiary); font-size: .85rem; }

.global-search input {
    flex: 1; border: none; background: none; outline: none;
    font-size: .85rem; color: var(--text-primary);
    font-family: var(--font);
}

.global-search input::placeholder { color: var(--text-tertiary); }

.global-search kbd {
    font-family: var(--font);
    font-size: .65rem;
    color: var(--text-tertiary);
    background: var(--surface-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
    white-space: nowrap;
}

/* Search Dropdown */
.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
    max-height: 480px;
    overflow-y: auto;
    z-index: 999;
}
.search-dropdown.open { display: block; }
.global-search { position: relative; }
.search-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; cursor: pointer;
    transition: background var(--duration);
    border-bottom: 1px solid var(--border-light, var(--border));
}
.search-item:last-child { border-bottom: none; }
.search-item:hover, .search-item.active {
    background: var(--surface-secondary);
}
.search-item-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-50, rgba(14,165,233,.08));
    color: var(--brand-600);
    font-size: .85rem; flex-shrink: 0;
}
.search-item-info { flex: 1; min-width: 0; }
.search-item-label { font-size: .85rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-sub { font-size: .72rem; color: var(--text-tertiary); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-type {
    font-size: .65rem; color: var(--text-tertiary);
    background: var(--surface-tertiary);
    padding: 2px 8px; border-radius: 4px;
    white-space: nowrap; flex-shrink: 0;
}
.search-empty {
    padding: 20px; text-align: center;
    color: var(--text-tertiary); font-size: .85rem;
}

.topbar-right { display: flex; align-items: center; gap: 4px; }

.topbar-icon-btn {
    background: none; border: none;
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    transition: all 150ms;
}

.topbar-icon-btn:hover { background: var(--surface-hover); color: var(--text-primary); }

.topbar-divider { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }

.notif-dot {
    position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px;
    background: var(--danger-500);
    border-radius: 50%;
    display: none;
}

.notif-dot.visible { display: block; }

/* Notification Dropdown */
.notification-dropdown {
    display: none;
    position: absolute;
    top: calc(var(--topbar-h) - 4px);
    right: 16px;
    width: 360px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
}

.notification-dropdown.open { display: block; }

.notif-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.notif-header h4 { font-size: .9rem; font-weight: 700; }

.notif-clear {
    background: none; border: none;
    color: var(--brand-500); font-size: .78rem;
    cursor: pointer; font-weight: 500;
}

.notif-list { max-height: 300px; overflow-y: auto; }

.notif-item {
    display: flex; gap: 10px; padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 150ms;
}

.notif-item:hover { background: var(--surface-hover); }
.notif-item:last-child { border-bottom: none; }

.notif-item-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; flex-shrink: 0;
}

.notif-item-icon.warning { background: var(--warning-50); color: var(--warning-600); }
.notif-item-icon.danger { background: var(--danger-50); color: var(--danger-600); }
.notif-item-icon.info { background: var(--info-50); color: var(--info-500); }

.notif-item-text h5 { font-size: .8rem; font-weight: 600; }
.notif-item-text p { font-size: .72rem; color: var(--text-secondary); margin-top: 2px; }

/* =============================================
   PAGE CONTAINER
   ============================================= */
.page-container { flex: 1; padding: 24px; }

.page { display: none; animation: fadeIn .25s var(--ease); }
.page.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.page-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}

.page-head h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.page-subtitle { color: var(--text-secondary); font-size: .85rem; margin-top: 2px; }

.page-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.last-update { font-size: .75rem; color: var(--text-tertiary); }

/* =============================================
   KPI CARDS
   ============================================= */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all var(--duration) var(--ease);
}

.kpi-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.kpi-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.kpi-blue { background: var(--brand-50); color: var(--brand-600); }
body.dark .kpi-blue { background: rgba(14,165,233,.12); }
.kpi-emerald { background: var(--success-50); color: var(--success-600); }
body.dark .kpi-emerald { background: rgba(34,197,94,.12); }
.kpi-amber { background: var(--warning-50); color: var(--warning-600); }
body.dark .kpi-amber { background: rgba(245,158,11,.12); }
.kpi-rose { background: var(--danger-50); color: var(--danger-600); }
body.dark .kpi-rose { background: rgba(239,68,68,.12); }
.kpi-violet { background: rgba(99,102,241,.08); color: var(--accent-600); }
body.dark .kpi-violet { background: rgba(99,102,241,.12); }

.kpi-data { display: flex; flex-direction: column; }
.kpi-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.kpi-label { font-size: .75rem; color: var(--text-secondary); font-weight: 500; }

/* =============================================
   WIDGETS
   ============================================= */
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.widget-2x { grid-column: span 1; }

.widget-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.widget-header h3 {
    font-size: .88rem; font-weight: 700;
    display: flex; align-items: center; gap: 8px;
}

.widget-header h3 i { color: var(--brand-500); font-size: .9rem; }

.widget-link { font-size: .78rem; color: var(--brand-500); text-decoration: none; font-weight: 600; }
.widget-link:hover { text-decoration: underline; }

.widget-body { padding: 16px 20px; }

/* Donut Chart CSS */
.donut-chart-area { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }

.donut-ring {
    width: 140px; height: 140px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.donut-center {
    position: absolute; inset: 30px;
    background: var(--surface);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
}

.donut-center strong { font-size: 1.3rem; font-weight: 800; }
.donut-center span { font-size: .65rem; color: var(--text-secondary); }

.donut-legend { display: flex; flex-direction: column; gap: 6px; flex: 1; }

.legend-item {
    display: flex; align-items: center; gap: 8px;
    font-size: .8rem; color: var(--text-secondary);
}

.legend-dot {
    width: 10px; height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-item strong { color: var(--text-primary); margin-left: auto; font-size: .82rem; }

/* Status Bars */
.status-bars { display: flex; flex-direction: column; gap: 12px; }

.status-bar-item { display: flex; align-items: center; gap: 10px; }

.status-bar-label {
    width: 70px; font-size: .78rem; color: var(--text-secondary);
    font-weight: 500; text-align: right; flex-shrink: 0;
}

.status-bar-track {
    flex: 1; height: 8px;
    background: var(--surface-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.status-bar-fill {
    height: 100%; border-radius: 4px;
    transition: width .6s var(--ease);
}

.status-bar-fill.active { background: var(--success-500); }
.status-bar-fill.maintenance { background: var(--warning-500); }
.status-bar-fill.faulty { background: var(--danger-500); }
.status-bar-fill.storage { background: var(--brand-500); }
.status-bar-fill.retired { background: var(--n-400); }

.status-bar-value { font-size: .78rem; font-weight: 700; width: 28px; }

/* Activity Feed */
.activity-feed { display: flex; flex-direction: column; gap: 0; }

.feed-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.feed-item:last-child { border-bottom: none; }

.feed-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--surface-active);
    color: var(--brand-500);
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; flex-shrink: 0;
}

.feed-text { flex: 1; min-width: 0; }
.feed-text h4 { font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-text p { font-size: .7rem; color: var(--text-tertiary); }

.feed-date { font-size: .68rem; color: var(--text-tertiary); white-space: nowrap; }

/* Warranty Alerts */
.warranty-alerts { display: flex; flex-direction: column; gap: 0; }

.warranty-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.warranty-item:last-child { border-bottom: none; }

.warranty-meta h4 { font-size: .8rem; font-weight: 600; }
.warranty-meta p { font-size: .7rem; color: var(--text-tertiary); }

.warranty-tag {
    padding: 3px 10px; border-radius: 10px;
    font-size: .68rem; font-weight: 700;
}

.warranty-tag.expired { background: var(--danger-50); color: var(--danger-600); }
.warranty-tag.expiring { background: var(--warning-50); color: var(--warning-600); }

/* Location Bars */
.location-bars { display: flex; flex-direction: column; gap: 10px; }

.loc-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 0;
}

.loc-name { font-size: .8rem; font-weight: 500; color: var(--text-secondary); }

.loc-count {
    background: var(--surface-active);
    color: var(--brand-600);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: .72rem;
    font-weight: 700;
}

/* =============================================
   TOOLBAR & FILTERS
   ============================================= */
.toolbar {
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}

.toolbar-filters { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.filter-controls { display: flex; gap: 8px; flex-wrap: wrap; }

.filter-select {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    font-size: .82rem;
    font-family: var(--font);
    cursor: pointer;
    transition: border-color var(--duration);
    outline: none;
}

.filter-select:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(14,165,233,.1);
}

.toolbar-search { min-width: 200px; }

.search-input-wrap {
    display: flex; align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    height: 36px;
    gap: 8px;
}

.search-input-wrap:focus-within { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(14,165,233,.1); }
.search-input-wrap i { color: var(--text-tertiary); font-size: .82rem; }
.search-input-wrap input {
    flex: 1; border: none; background: none; outline: none;
    font-size: .82rem; color: var(--text-primary); font-family: var(--font);
}

/* Bulk Bar */
.bulk-bar {
    display: flex; align-items: center; gap: 12px;
    background: var(--brand-50); border: 1px solid var(--brand-200);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    margin-bottom: 12px;
    font-size: .85rem;
}

body.dark .bulk-bar { background: rgba(14,165,233,.08); border-color: rgba(14,165,233,.2); }
.bulk-bar.hidden { display: none; }

/* =============================================
   DATA TABLE
   ============================================= */
.table-wrapper {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}

.table thead { background: var(--surface-secondary); }

.table th {
    padding: 11px 14px;
    text-align: left;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: .68rem;
    letter-spacing: .06em;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
    user-select: none;
}

.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--brand-500); }
.table th i { font-size: .6rem; margin-left: 3px; opacity: .4; }
.table th.th-check { width: 40px; }
.table th.th-actions { width: 100px; text-align: center; }

.table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr { transition: background 100ms; }
.table tbody tr:hover { background: var(--surface-hover); }

.table .checkbox { width: 16px; height: 16px; accent-color: var(--brand-500); cursor: pointer; }

/* Status Badge */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 10px;
    font-size: .72rem; font-weight: 700;
    white-space: nowrap; gap: 4px;
}

.badge::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
}

.badge-aktif { background: var(--success-50); color: var(--success-700); }
.badge-aktif::before { background: var(--success-500); }
.badge-bakimda { background: var(--warning-50); color: var(--warning-600); }
.badge-bakimda::before { background: var(--warning-500); }
.badge-arizali { background: var(--danger-50); color: var(--danger-700); }
.badge-arizali::before { background: var(--danger-500); }
.badge-depo { background: var(--info-50); color: var(--info-500); }
.badge-depo::before { background: var(--info-500); }
.badge-emekli { background: var(--surface-tertiary); color: var(--text-tertiary); }
.badge-emekli::before { background: var(--n-400); }

/* Row Actions */
.row-actions { display: flex; gap: 2px; justify-content: center; }

.row-action-btn {
    width: 30px; height: 30px;
    border: none; border-radius: var(--radius-sm);
    background: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem;
    transition: all 100ms;
}

.row-action-btn:hover { background: var(--surface-tertiary); }
.row-action-btn.view-btn { color: var(--brand-500); }
.row-action-btn.edit-btn { color: var(--warning-600); }
.row-action-btn.delete-btn { color: var(--danger-500); }

/* Table Footer */
.table-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; gap: 16px; flex-wrap: wrap;
}

.table-info { font-size: .78rem; color: var(--text-secondary); }

.pagination { display: flex; gap: 4px; }

.pagination button {
    min-width: 34px; height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    font-size: .8rem;
    cursor: pointer;
    font-family: var(--font);
    font-weight: 500;
    transition: all 150ms;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--brand-500);
    color: var(--brand-500);
}

.pagination button.active {
    background: var(--brand-500);
    border-color: var(--brand-500);
    color: #fff;
}

.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* =============================================
   LICENSE SUMMARY
   ============================================= */
.license-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.license-stat {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.license-stat .val { font-size: 1.5rem; font-weight: 800; }
.license-stat .lbl { font-size: .72rem; color: var(--text-secondary); }

/* License Usage Bar */
.usage-bar {
    width: 100%; height: 6px;
    background: var(--surface-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.usage-fill {
    height: 100%; border-radius: 3px;
    transition: width .4s var(--ease);
}

.usage-fill.low { background: var(--success-500); }
.usage-fill.medium { background: var(--warning-500); }
.usage-fill.high { background: var(--danger-500); }

/* =============================================
   REPORTS
   ============================================= */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.report-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--duration) var(--ease);
}

.report-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.report-icon {
    width: 48px; height: 48px;
    background: var(--brand-50);
    color: var(--brand-600);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

body.dark .report-icon { background: rgba(14,165,233,.1); }

.report-info { flex: 1; }
.report-info h3 { font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.report-info p { font-size: .78rem; color: var(--text-secondary); line-height: 1.4; }

.report-card .btn { margin-top: 4px; flex-shrink: 0; align-self: center; }

/* =============================================
   TIMELINE (Activity Log)
   ============================================= */
.timeline { position: relative; padding-left: 28px; }

.timeline::before {
    content: '';
    position: absolute;
    left: 11px; top: 0; bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding: 12px 0 12px 24px;
    border-bottom: 1px solid var(--border);
}

.timeline-item:last-child { border-bottom: none; }

.timeline-dot {
    position: absolute;
    left: -22px; top: 16px;
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2px solid var(--surface);
}

.timeline-dot.add { background: var(--success-500); }
.timeline-dot.edit { background: var(--warning-500); }
.timeline-dot.delete { background: var(--danger-500); }
.timeline-dot.info { background: var(--brand-500); }

.timeline-time { font-size: .7rem; color: var(--text-tertiary); margin-bottom: 2px; }
.timeline-text { font-size: .85rem; color: var(--text-primary); }

.empty-state {
    text-align: center; padding: 48px 20px; color: var(--text-tertiary);
}

.empty-state i { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.empty-state p { font-size: .85rem; }

/* =============================================
   SETTINGS
   ============================================= */
.settings-layout { max-width: 900px; display: flex; flex-direction: column; gap: 16px; }

/* Settings Tabs */
.settings-tabs {
    display: flex; gap: 0; border-bottom: 2px solid var(--border);
    margin-bottom: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.settings-tab-btn {
    display: flex; align-items: center; gap: 7px;
    padding: 10px 18px; font-size: .85rem; font-weight: 600;
    color: var(--text-secondary); background: none; border: none;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    cursor: pointer; white-space: nowrap; transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.settings-tab-btn:hover { color: var(--text-primary); }
.settings-tab-btn.active { color: var(--brand-500); border-bottom-color: var(--brand-500); }
.settings-tab-btn i { font-size: .8rem; }
.settings-tab-panel { display: none; flex-direction: column; gap: 16px; }
.settings-tab-panel.active { display: flex; }

.settings-grid-2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0; background: var(--n-300); border-radius: 24px;
    transition: background var(--duration) var(--ease);
}
.toggle-slider::before {
    content: ''; position: absolute; width: 18px; height: 18px; left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%; transition: transform var(--duration) var(--ease);
}
.toggle-switch input:checked + .toggle-slider { background: var(--brand-500); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

.settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.settings-card-header {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.settings-card-header i { font-size: 1.1rem; color: var(--brand-500); }
.settings-card-header h3 { font-size: .95rem; font-weight: 700; }
.settings-card-header p { font-size: .75rem; color: var(--text-secondary); }

.settings-card-body { padding: 16px 20px; }

.setting-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0;
    gap: 16px;
}

.setting-row + .setting-row { border-top: 1px solid var(--border); }

.setting-info label { font-size: .88rem; font-weight: 600; display: block; }
.setting-info span { font-size: .75rem; color: var(--text-secondary); }

.setting-select {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    font-size: .85rem;
    font-family: var(--font);
    outline: none;
}

.theme-switcher { display: flex; gap: 4px; }

.theme-option {
    padding: 7px 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: .8rem; font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all 150ms;
    display: flex; align-items: center; gap: 6px;
}

.theme-option:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.theme-option:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.theme-option.active {
    background: var(--brand-500);
    border-color: var(--brand-500);
    color: #fff;
}

/* Tags */
.tag-manager { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px;
    background: var(--surface-active);
    color: var(--brand-600);
    border-radius: 8px;
    font-size: .78rem; font-weight: 600;
}

body.dark .tag { color: var(--brand-400); }

.tag-remove {
    background: none; border: none;
    color: inherit; cursor: pointer;
    font-size: .85rem; opacity: .6;
    padding: 0; line-height: 1;
}

.tag-remove:hover { opacity: 1; }

.tag-input-row { display: flex; gap: 8px; }

.tag-input-row input {
    flex: 1;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    font-size: .85rem;
    font-family: var(--font);
    outline: none;
}

.tag-input-row input:focus { border-color: var(--brand-500); }

/* Data Actions */
.data-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 150ms var(--ease);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn-sm { padding: 6px 12px; font-size: .78rem; }

.btn-primary {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
    color: #fff;
    box-shadow: 0 1px 3px rgba(14,165,233,.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
    box-shadow: 0 4px 12px rgba(14,165,233,.35);
    transform: translateY(-1px);
}

.btn-outline {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover { border-color: var(--brand-500); color: var(--brand-500); }

.btn-ghost { background: none; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text-primary); }

.btn-danger {
    background: var(--danger-500);
    color: #fff;
}

.btn-danger:hover { background: var(--danger-700); }

.btn-danger-outline {
    background: none;
    border: 1px solid var(--danger-500);
    color: var(--danger-500);
}

.btn-danger-outline:hover { background: var(--danger-50); }

/* =============================================
   MODALS
   ============================================= */
.modal-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center; justify-content: center;
    padding: 20px;
}

.modal-backdrop.open { display: flex; }

.modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 100%; max-width: 600px;
    max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: modalSlide .25s var(--ease);
    border: 1px solid var(--border);
}

.modal-wide { max-width: 720px; }
.modal-lg { max-width: 900px; }
.modal-confirm { max-width: 420px; }

.code-output { display: flex; justify-content: center; padding: 20px 0; }
.code-output svg { max-width: 100%; }
.code-label { text-align: center; font-size: 1.05rem; font-weight: 700; margin-top: 12px; }
.code-detail { text-align: center; font-size: .85rem; color: var(--text-secondary); margin-top: 4px; }

@keyframes modalSlide {
    from { opacity: 0; transform: scale(.96) translateY(-8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 { font-size: 1.1rem; font-weight: 700; }

.modal-close-btn {
    width: 32px; height: 32px;
    border: none; border-radius: 8px;
    background: none; color: var(--text-tertiary);
    cursor: pointer; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 150ms;
}

.modal-close-btn:hover { background: var(--surface-tertiary); color: var(--text-primary); }

.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }

.modal-footer {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 14px 24px;
    border-top: 1px solid var(--border);
}

/* Confirm content */
.confirm-content { text-align: center; padding: 12px 0; }

.confirm-icon {
    width: 56px; height: 56px;
    background: var(--danger-50);
    color: var(--danger-500);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
}

.confirm-content p { font-size: .92rem; color: var(--text-secondary); line-height: 1.5; }

/* =============================================
   FORMS
   ============================================= */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }

.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.full { grid-column: 1 / -1; margin-top: 4px; }

.form-field label {
    font-size: .8rem; font-weight: 600;
    color: var(--text-secondary);
}

.required { color: var(--danger-500); }

.form-field input,
.form-field select,
.form-field textarea {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    font-size: .88rem;
    font-family: var(--font);
    outline: none;
    transition: border-color var(--duration), box-shadow var(--duration);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(14,165,233,.1);
}

.form-field textarea { resize: vertical; }

.field-hint { font-size: .7rem; color: var(--text-tertiary); }

.form-field input.invalid,
.form-field select.invalid {
    border-color: var(--danger-500);
    box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}

/* =============================================
   DETAIL VIEW
   ============================================= */
.detail-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 2px; background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.detail-cell {
    padding: 12px 16px;
    background: var(--surface);
}

.detail-cell label {
    display: block;
    font-size: .68rem; font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 4px;
}

.detail-cell span { font-size: .9rem; font-weight: 500; }

.detail-notes-section {
    grid-column: 1 / -1;
    padding: 12px 16px;
    background: var(--surface-secondary);
}

.detail-notes-section p { font-size: .85rem; line-height: 1.6; color: var(--text-secondary); }

/* =============================================
   TOAST
   ============================================= */
.toast-stack {
    position: fixed; top: 16px; right: 16px;
    z-index: 3000;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 18px;
    border-radius: var(--radius);
    color: #fff;
    font-size: .85rem; font-weight: 500;
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    min-width: 300px;
    animation: toastIn .3s var(--ease), toastOut .3s var(--ease) 2.7s forwards;
}

.toast i { font-size: 1rem; }

.toast.success { background: var(--success-600); }
.toast.error { background: var(--danger-600); }
.toast.warning { background: var(--warning-600); }
.toast.info { background: var(--brand-600); }

@keyframes toastIn { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(60px); } }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1280px) {
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .widgets-grid { grid-template-columns: repeat(2, 1fr); }
    .widget-2x { grid-column: span 1; }
}

@media (max-width: 1024px) {
    .widgets-grid { grid-template-columns: 1fr 1fr; }
    .reports-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; overflow-x: hidden; width: 100%; }
    .topbar-menu-btn { display: flex; }
    .page-container { padding: 14px; max-width: 100vw; box-sizing: border-box; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .widgets-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .page-head { flex-direction: column; align-items: flex-start; margin-bottom: 16px; gap: 10px; }
    .global-search kbd { display: none; }
    .reports-grid { grid-template-columns: 1fr; }

    /* Detail grid — 1 column on mobile */
    .detail-grid { grid-template-columns: 1fr; }
    .detail-cell { padding: 10px 14px; }
    .detail-cell label { font-size: .7rem; }
    .detail-cell span { font-size: .85rem; }

    /* Settings page */
    .settings-layout { max-width: 100%; }
    .settings-grid-2 { grid-template-columns: 1fr; }
    .settings-card-header { padding: 14px 16px; }
    .settings-card-body { padding: 14px 16px; }
    .setting-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .setting-row .theme-switcher { width: 100%; }
    .theme-option { flex: 1; justify-content: center; padding: 9px 10px; font-size: .78rem; }
    .setting-select { width: 100%; }
    .tag-input-row { flex-direction: column; }
    .tag-input-row .btn { width: 100%; justify-content: center; }
    .data-actions { flex-direction: column; }
    .data-actions .btn { width: 100%; justify-content: center; }

    /* License summary grid */
    .license-summary { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .license-stat { padding: 12px; }
    .license-stat .val { font-size: 1.2rem; }

    /* Reports compact */
    .report-card { padding: 16px; gap: 12px; flex-direction: column; align-items: stretch; }
    .report-icon { width: 40px; height: 40px; font-size: 1rem; }
    .report-card .btn { width: 100%; justify-content: center; }

    /* Timeline compact */
    .timeline { padding-left: 20px; }
    .timeline::before { left: 7px; }
    .timeline-item { padding: 10px 0 10px 16px; }
    .timeline-dot { left: -18px; width: 10px; height: 10px; }
    .timeline-text { font-size: .82rem; }

    /* Empty state */
    .empty-state { padding: 32px 16px; }
    .empty-state i { font-size: 2rem; }
    .empty-state h3 { font-size: 1rem; }

    /* Widget internals compact */
    .status-bar-label { width: 55px; font-size: .72rem; }
    .feed-item { gap: 8px; padding: 6px 0; }
    .feed-icon { width: 28px; height: 28px; font-size: .7rem; }
    .feed-text h4 { font-size: .78rem; }
    .feed-text p { font-size: .68rem; }
    .feed-date { font-size: .65rem; }
    .warranty-item { flex-direction: column; align-items: flex-start; gap: 4px; }
    .warranty-meta h4 { font-size: .78rem; }
    .warranty-tag { font-size: .65rem; }

    /* Widget header/body compact */
    .widget-header { padding: 12px 16px; }
    .widget-header h3 { font-size: .82rem; }
    .widget-body { padding: 12px 16px; }

    /* Donut chart responsive */
    .donut-chart-area { flex-direction: column; align-items: center; gap: 14px; }
    .donut-ring { width: 120px; height: 120px; }
    .donut-center { inset: 24px; }
    .donut-center strong { font-size: 1.1rem; }
    .donut-legend { flex-direction: row; flex-wrap: wrap; gap: 8px; justify-content: center; }

    /* Form field labels bigger for readability */
    .form-field label { font-size: .85rem; }
    .form-field input, .form-field select, .form-field textarea { padding: 10px 12px; }

    /* Toast on mobile */
    .toast-stack { top: 8px; right: 8px; left: 8px; }
    .toast { font-size: .8rem; padding: 10px 14px; }

    /* Topbar compact */
    .topbar { padding: 0 12px; gap: 8px; }
    .topbar-right { gap: 2px; }
    .topbar-divider { display: none; }
    .breadcrumb { display: none; }

    /* Toolbar mobile */
    .toolbar { flex-direction: column; align-items: stretch; gap: 8px; margin-bottom: 12px; }
    .toolbar-filters { flex-direction: column; gap: 6px; }
    .filter-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .filter-select { width: 100%; min-width: 0; font-size: .8rem; padding: 8px 10px; }
    .toolbar-search { min-width: 0; width: 100%; }

    /* Table mobile — horizontal scroll preserved + touch friendly */
    .table-wrapper { max-width: 100%; }
    .table th, .table td { padding: 10px 10px; font-size: .78rem; }
    .table th.th-actions { width: 80px; }
    .row-action-btn { width: 34px; height: 34px; }
    /* Hide less critical columns on mobile: serial(6), location(8) */
    .table th:nth-child(6), .table td:nth-child(6),
    .table th:nth-child(8), .table td:nth-child(8) { display: none; }

    /* Bulk bar */
    .bulk-bar { flex-wrap: wrap; font-size: .8rem; padding: 8px 12px; }

    /* Table footer mobile */
    .table-footer { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 10px; }
    .pagination { justify-content: center; flex-wrap: wrap; }
    .pagination button { min-width: 38px; height: 38px; }

    /* Modal mobile */
    .modal-backdrop { padding: 8px; align-items: flex-end; }
    .modal {
        max-width: 100%;
        max-height: 92vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    .modal-wide, .modal-lg { max-width: 100%; }
    .modal-header { padding: 14px 16px; }
    .modal-body { padding: 16px; }
    .modal-footer { padding: 12px 16px; }
    .modal-footer { flex-wrap: wrap; }
    .modal-footer .btn { flex: 1; min-width: 0; justify-content: center; }

    /* KPI cards compact */
    .kpi-card { padding: 14px; gap: 10px; }
    .kpi-icon { width: 40px; height: 40px; font-size: 1rem; }
    .kpi-value { font-size: 1.3rem; }

    /* Page head actions — icon-only secondary + full-width primary */
    .page-head-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
    }
    .page-head-actions .btn-sm .btn-label { display: none !important; }
    .page-head-actions .btn-sm {
        padding: 0 !important;
        width: 40px;
        height: 40px;
        min-height: 0;
        max-height: 40px;
        justify-content: center;
        align-items: center;
        flex: 0 0 40px;
        display: inline-flex;
        gap: 0;
    }
    .page-head-actions .btn-sm i {
        font-size: 1rem;
        margin: 0;
    }
    .page-head-actions .btn-primary {
        flex: 1 1 100%;
        justify-content: center;
        font-size: .88rem;
        padding: 10px 16px;
        height: auto;
        width: 100%;
        min-height: 0;
        order: 10;
    }

    /* Widget cards */
    .widget { padding: 16px; }

    /* Notification dropdown */
    .notification-dropdown { right: -60px; width: 300px; }

    /* Hide fullscreen button on tablets/mobile */
    #fullscreenBtn { display: none; }
}

@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .page-container { padding: 10px; }
    .topbar { padding: 0 10px; height: 52px; }
    .topbar-center { display: none; }

    /* Full bottom-sheet modals on small screens */
    .modal-backdrop { padding: 0; }
    .modal {
        max-height: 95vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        animation: modalSlideUp .3s var(--ease);
    }
    .modal-confirm { max-width: 100%; }

    /* KPI single column compact */
    .kpi-card { padding: 12px 14px; }

    /* Form elements touch targets */
    .filter-select, .search-input-wrap { height: 42px; }
    .form-group input,
    .form-group select,
    .form-group textarea { font-size: 16px; } /* prevent iOS zoom on focus */

    /* Page title */
    .page-head h2 { font-size: 1.15rem; }
    .page-subtitle { font-size: .75rem; }

    /* Action buttons — small screens: tighter icon-only */
    .page-head-actions .btn-sm {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
    }
    .page-head-actions .btn-sm i {
        font-size: .9rem;
    }
    .page-head-actions .btn-primary {
        font-size: .82rem;
        padding: 10px 12px;
    }

    /* Filters single column on very small */
    .filter-controls { grid-template-columns: 1fr; }

    /* Table extra compact */
    .table th, .table td { padding: 6px 6px; font-size: .73rem; }

    /* Sidebar full width on mobile */
    .sidebar { width: 85vw; max-width: 320px; }

    /* Login card */
    .login-card { padding: 28px 18px; }
    .login-brand h1 { font-size: 1.3rem; }

    /* Help page */
    .help-section { padding: 14px 14px; }

    /* Settings extra compact */
    .settings-card-header { padding: 12px 14px; gap: 10px; }
    .settings-card-header h3 { font-size: .88rem; }
    .settings-card-header p { font-size: .72rem; }
    .settings-card-body { padding: 12px 14px; }
    .setting-info label { font-size: .82rem; }
    .setting-info span { font-size: .72rem; }
    .theme-option { padding: 8px 6px; font-size: .75rem; }
    .tag { padding: 6px 10px; font-size: .78rem; }
    .tag-remove { font-size: .9rem; padding: 2px 6px; }

    /* License summary single col */
    .license-summary { grid-template-columns: 1fr 1fr; }
    .license-stat .val { font-size: 1rem; }
    .license-stat .lbl { font-size: .7rem; }

    /* Report cards full stack */
    .report-card { padding: 14px; }
    .report-info h3 { font-size: .88rem; }
    .report-info p { font-size: .75rem; }

    /* Timeline extra compact */
    .timeline-text { font-size: .78rem; }
    .timeline-time { font-size: .68rem; }

    /* Detail grid compact */
    .detail-cell { padding: 8px 12px; }
    .detail-cell span { font-size: .82rem; }

    /* Form fields — prevent iOS zoom */
    .form-field input, .form-field select, .form-field textarea { font-size: 16px; padding: 11px 12px; }

    /* Confirm dialog compact */
    .confirm-icon { width: 48px; height: 48px; font-size: 1.2rem; }
    .confirm-content h3 { font-size: 1rem; }
    .confirm-content p { font-size: .85rem; }

    /* Notification dropdown  */
    .notification-dropdown { right: -40px; width: calc(100vw - 24px); max-width: 360px; }

    /* Hide less important columns on small screens for readability */
    .table th:nth-child(5), .table td:nth-child(5),
    .table th:nth-child(6), .table td:nth-child(6),
    .table th:nth-child(7), .table td:nth-child(7),
    .table th:nth-child(8), .table td:nth-child(8) { display: none; }

    /* Page head even more compact */
    .page-head { margin-bottom: 10px; gap: 8px; }
    .toolbar { gap: 6px; margin-bottom: 8px; }
    .toolbar-filters { gap: 5px; }
    .filter-controls { gap: 5px; }

    /* Login/session screen extra compact */
    .session-avatar { width: 56px; height: 56px; font-size: 1.2rem; }
    .session-info-row { font-size: .78rem; }

    /* Widget compact */
    .widget-header { padding: 10px 14px; }
    .widget-header h3 { font-size: .8rem; }
    .widget-body { padding: 10px 14px; }

    /* Donut extra compact */
    .donut-ring { width: 100px; height: 100px; }
    .donut-center { inset: 20px; }
    .donut-center strong { font-size: .95rem; }
    .donut-center span { font-size: .6rem; }
}

/* Bottom-sheet modal animation */
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

/* Touch-friendly tap targets */
@media (pointer: coarse) {
    .nav-link { padding: 12px 14px; min-height: 44px; }
    .topbar-icon-btn { width: 44px; height: 44px; }
    .topbar-menu-btn { padding: 10px; font-size: 1.25rem; min-width: 44px; min-height: 44px; }
    .row-action-btn { width: 40px; height: 40px; font-size: .9rem; }
    .pagination button { min-width: 44px; height: 44px; }
    .filter-select { min-height: 42px; }
    .search-input-wrap { min-height: 42px; }
    .btn:not(.btn-sm) { min-height: 44px; }
    .btn-sm { min-height: 36px; }
    .sidebar-collapse-btn { width: 38px; height: 38px; }
    .modal-close-btn { width: 40px; height: 40px; }
    .theme-option { min-height: 40px; }
    .setting-select { min-height: 42px; }
    .form-field input, .form-field select { min-height: 42px; }
    .tag-input-row input { min-height: 42px; }
    .checkbox-label input[type="checkbox"] { width: 20px; height: 20px; }
    .table .checkbox { width: 20px; height: 20px; }
}

/* Safe area insets for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
    .sidebar { padding-bottom: env(safe-area-inset-bottom); }
    .modal { padding-bottom: env(safe-area-inset-bottom); }
    .topbar { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
}

/* PWA standalone mode adjustments */
@media (display-mode: standalone) {
    .topbar { padding-top: env(safe-area-inset-top, 0); height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); }
}

/* =============================================
   HELP / USER GUIDE PAGE
   ============================================= */
.help-guide { max-width: 900px; }

.help-toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 28px;
}
.help-toc h3 { margin: 0 0 14px; font-size: 1.05rem; color: var(--text-primary); }
.help-toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px 16px;
}
.help-toc-grid a {
    color: var(--primary);
    text-decoration: none;
    font-size: .9rem;
    padding: 4px 0;
    transition: color .15s;
}
.help-toc-grid a:hover { color: var(--primary-hover); text-decoration: underline; }

.help-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 20px;
}
.help-section h3 {
    font-size: 1.15rem;
    color: var(--primary);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.help-section h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 20px 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.help-section p { color: var(--text-secondary); line-height: 1.7; margin: 0 0 10px; }
.help-section ul, .help-section ol { color: var(--text-secondary); line-height: 1.8; padding-left: 20px; margin: 0 0 12px; }
.help-section li { margin-bottom: 4px; }
.help-section code {
    background: var(--bg-hover);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .88rem;
    color: var(--primary);
}
.help-section kbd {
    display: inline-block;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 7px;
    font-size: .82rem;
    font-family: inherit;
    box-shadow: 0 1px 0 var(--border);
}

.help-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 16px;
    font-size: .9rem;
}
.help-table th {
    text-align: left;
    background: var(--bg-hover);
    padding: 10px 12px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
}
.help-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    vertical-align: top;
}
.help-table tr:last-child td { border-bottom: none; }
.help-table tr:hover td { background: var(--bg-hover); }

.help-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
    margin: 14px 0;
}
.help-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-hover);
    border-radius: var(--radius);
    font-size: .9rem;
    color: var(--text-secondary);
}
.help-feature i { color: var(--primary); font-size: 1rem; min-width: 20px; text-align: center; }

.help-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 12px 16px;
    margin: 14px 0;
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.help-tip i { color: var(--primary); margin-top: 3px; }

.help-footer {
    text-align: center;
    padding: 24px 0 8px;
    color: var(--text-muted);
    font-size: .85rem;
}
.help-footer p { margin: 2px 0; }

@media (max-width: 768px) {
    .help-section { padding: 16px 18px; }
    .help-section h3 { font-size: 1rem; }
    .help-section h4 { font-size: .92rem; }
    .help-toc { padding: 16px; }
    .help-toc-grid { grid-template-columns: 1fr 1fr; }
    .help-features { grid-template-columns: 1fr; }
    .help-table { font-size: .82rem; }
    .help-table th, .help-table td { padding: 8px 8px; }
    .help-tip { padding: 10px 12px; font-size: .85rem; }
}
@media (max-width: 480px) {
    .help-toc-grid { grid-template-columns: 1fr; }
    .help-section { padding: 12px 14px; }
    .help-section h3 { font-size: .95rem; }
    .help-section p, .help-section li { font-size: .82rem; }
    .help-table { font-size: .78rem; }
    .help-table th, .help-table td { padding: 6px 6px; }
    .help-feature { padding: 8px 10px; font-size: .82rem; }
    .help-tip { font-size: .82rem; }
}

/* Print */
@media print {
    .sidebar, .topbar, .page-head-actions, .toolbar, .pagination,
    .row-actions, .bulk-bar, .modal-backdrop, .toast-stack { display: none !important; }
    .main { margin-left: 0; }
    .page { display: block !important; }
    .page-container { padding: 0; }
    .table-wrapper { border: 1px solid #ccc; }
}
