/* ═══════════════════════════════════════════
   BiometrikHadir — Main Stylesheet
   Clean · Corporate · Emerald
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* ── CSS Variables ── */
:root {
    /* Brand — Emerald/Teal */
    --primary:          #0d9488;   /* teal-600 */
    --primary-hover:    #0f766e;   /* teal-700 */
    --primary-light:    #f0fdfa;   /* teal-50  */
    --primary-subtle:   #99f6e4;   /* teal-200 */
    --primary-mid:      #2dd4bf;   /* teal-400 */

    /* Navy anchors */
    --navy:             #0f172a;
    --navy-mid:         #1e293b;

    /* Neutrals */
    --bg:               #f8fafc;
    --surface:          #ffffff;
    --surface-2:        #f1f5f9;
    --border:           #e2e8f0;
    --border-light:     #f1f5f9;
    --text:             #0f172a;
    --text-secondary:   #475569;
    --text-muted:       #94a3b8;

    /* Status */
    --success:          #059669;
    --warning:          #d97706;
    --danger:           #dc2626;
    --info:             #0369a1;

    /* Layout */
    --sidebar-width:     260px;
    --sidebar-collapsed: 68px;
    --topbar-height:     58px;
    --bottombar-height:  42px;

    /* Tokens */
    --radius:       6px;
    --radius-lg:    10px;
    --radius-xl:    14px;
    --shadow-sm:    0 1px 2px rgba(15,23,42,.05);
    --shadow:       0 1px 4px rgba(15,23,42,.07), 0 1px 2px rgba(15,23,42,.04);
    --shadow-lg:    0 4px 16px rgba(15,23,42,.10);
    --shadow-xl:    0 8px 32px rgba(15,23,42,.12);
    --transition:   .18s cubic-bezier(.4,0,.2,1);
    --font:         'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:    'DM Mono', 'Courier New', monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

/* ── App Shell ── */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ═══════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════ */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--navy);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition), transform var(--transition);
    overflow: hidden;
}

/* Brand */
.sidebar-brand {
    min-height: var(--topbar-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    flex-shrink: 0;
    gap: 8px;
}
.sidebar-brand .brand-icon {
    width: 30px; height: 30px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 15px;
    flex-shrink: 0;
}
.sidebar-brand .brand-logo {
    object-fit: contain;
    flex-shrink: 0;
}
.sidebar-brand .brand-text {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar-brand .brand-text span {
    color: var(--primary-mid);
}

/* Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.1);
    border-radius: 4px;
}

.nav-section {
    padding: 18px 18px 5px;
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: rgba(255,255,255,.28);
    white-space: nowrap;
}

.nav-item { position: relative; }

.nav-link {
    display: flex;
    align-items: center;
    padding: 8px 16px 8px 18px;
    color: rgba(255,255,255,.55);
    font-size: .88rem;
    font-weight: 450;
    transition: all var(--transition);
    cursor: pointer;
    gap: 11px;
    white-space: nowrap;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    border-left: 2px solid transparent;
}
.nav-link i {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    color: rgba(255,255,255,.35);
    transition: color var(--transition);
}
.nav-link:hover {
    color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.05);
    border-left-color: rgba(45,212,191,.4);
}
.nav-link:hover i { color: var(--primary-mid); }
.nav-link.active {
    color: #fff;
    background: rgba(13,148,136,.18);
    border-left-color: var(--primary);
    font-weight: 600;
}
.nav-link.active i { color: var(--primary-mid); }

/* Badge */
.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    line-height: 1.4;
}

/* Expand arrow */
.nav-arrow {
    margin-left: auto;
    font-size: .78rem;
    transition: transform var(--transition);
    color: rgba(255,255,255,.25);
}
.nav-item.open > .nav-link .nav-arrow { transform: rotate(90deg); }

/* Sub-menu */
.nav-submenu { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.nav-item.open > .nav-submenu { max-height: 500px; }
.nav-submenu .nav-link {
    padding-left: 50px;
    font-size: .82rem;
    color: rgba(255,255,255,.4);
    border-left-color: transparent;
    position: relative;
}
.nav-submenu .nav-link::before {
    content: '';
    position: absolute;
    left: 32px; top: 50%;
    width: 4px; height: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    transform: translateY(-50%);
    transition: background var(--transition);
}
.nav-submenu .nav-link:hover::before,
.nav-submenu .nav-link.active::before { background: var(--primary-mid); }
.nav-submenu .nav-link:hover { padding-left: 50px; }

/* Sidebar footer */
.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,.07);
    padding: 10px 12px;
    flex-shrink: 0;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border-radius: var(--radius);
    transition: background var(--transition);
    cursor: pointer;
}
.sidebar-user:hover { background: rgba(255,255,255,.06); }
.sidebar-user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(13,148,136,.25);
    color: var(--primary-mid);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: .78rem;
    flex-shrink: 0;
    border: 1px solid rgba(45,212,191,.2);
}
.sidebar-user-info { overflow: hidden; white-space: nowrap; }
.sidebar-user-name {
    font-weight: 600;
    font-size: .82rem;
    color: rgba(255,255,255,.85);
}
.sidebar-user-role {
    font-size: .68rem;
    color: rgba(255,255,255,.35);
    text-transform: capitalize;
}

/* ═══════════════════════════════════════════
   COLLAPSED SIDEBAR
   ═══════════════════════════════════════════ */
body.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed); }
body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .nav-section,
body.sidebar-collapsed .sidebar-user-info { opacity: 0; width: 0; overflow: hidden; }
body.sidebar-collapsed .nav-arrow,
body.sidebar-collapsed .nav-badge { display: none; }
body.sidebar-collapsed .nav-link { justify-content: center; padding: 10px 0; }
body.sidebar-collapsed .nav-link span { display: none; }
body.sidebar-collapsed .nav-submenu { max-height: 0 !important; }
body.sidebar-collapsed .sidebar-user { justify-content: center; }
body.sidebar-collapsed .main-content { margin-left: var(--sidebar-collapsed); }
body.sidebar-collapsed .topbar { left: var(--sidebar-collapsed); }
body.sidebar-collapsed .bottombar { left: var(--sidebar-collapsed); }

/* Tooltip on collapsed */
body.sidebar-collapsed .nav-item > .nav-link { position: relative; }
body.sidebar-collapsed .nav-item > .nav-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(var(--sidebar-collapsed) + 6px);
    top: 50%; transform: translateY(-50%);
    background: var(--navy-mid);
    color: #fff;
    padding: 4px 10px;
    border-radius: var(--radius);
    font-size: .76rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    z-index: 200;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: var(--shadow-lg);
}
body.sidebar-collapsed .nav-item > .nav-link:hover::after { opacity: 1; }

/* ═══════════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════════ */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 90;
    transition: left var(--transition);
    gap: 14px;
}
.topbar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius);
    transition: all var(--transition);
    display: flex; align-items: center;
}
.topbar-toggle:hover { background: var(--primary-light); color: var(--primary); }

/* ── Topbar AI Trigger Button ─────────────────────────────────── */
.topbar-ai-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px 6px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}
.topbar-ai-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(13,148,136,.15);
}
.topbar-ai-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    color: #fff;
    font-size: .88rem;
    flex-shrink: 0;
    transition: transform var(--transition);
}
.topbar-ai-btn:hover .topbar-ai-icon { transform: scale(1.08) rotate(-5deg); }
.topbar-ai-label { color: inherit; font-weight: 600; }
.topbar-ai-kbd {
    display: inline-block;
    padding: 1px 5px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: .72rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-left: 2px;
    transition: background var(--transition);
}
.topbar-ai-btn:hover .topbar-ai-kbd {
    background: rgba(13,148,136,.1);
    border-color: var(--primary-subtle);
    color: var(--primary);
}
.topbar-ai-status {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1.5;
    flex-shrink: 0;
}
.topbar-ai-status--alpha {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}
.topbar-ai-status--beta {
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #c4b5fd;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}
.topbar-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.15rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 7px;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.topbar-btn:hover { background: var(--primary-light); color: var(--primary); }
.topbar-btn .badge-dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 7px; height: 7px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--surface);
}

.topbar-divider {
    width: 1px; height: 26px;
    background: var(--border);
    margin: 0 4px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}
.topbar-user:hover { background: var(--primary-light); }
.topbar-user-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(13,148,136,.12);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: .75rem;
    border: 1px solid rgba(13,148,136,.2);
}
.topbar-user-name { font-weight: 600; font-size: .82rem; color: var(--text); }
.topbar-user-chevron { font-size: .9rem; color: var(--text-muted); transition: transform .2s; }

/* User dropdown */
.topbar-user-wrap {
    position: relative;
}
.topbar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    z-index: 2000;
    overflow: hidden;
    animation: dropIn .15s ease;
}
@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.topbar-dropdown.open { display: block; }
.topbar-user-wrap.open .topbar-user-chevron { transform: rotate(180deg); }
.topbar-user-wrap.open .topbar-user { background: var(--primary-light); }

.topbar-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 12px;
}
.topbar-dropdown-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(13,148,136,.12);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: .8rem;
    border: 1px solid rgba(13,148,136,.2);
    flex-shrink: 0;
}
.topbar-dropdown-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.topbar-dropdown-name {
    font-weight: 700;
    font-size: .82rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-dropdown-email {
    font-size: .73rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 2px 0;
}
.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: background .15s;
}
.topbar-dropdown-item:hover { background: var(--primary-light); color: var(--primary); }
.topbar-dropdown-item i { font-size: 1rem; flex-shrink: 0; }
.topbar-dropdown-logout { color: #dc2626; }
.topbar-dropdown-logout:hover { background: #fef2f2; color: #dc2626; }

/* ═══════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════ */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    padding-bottom: var(--bottombar-height);
    min-height: 100vh;
    flex: 1;
    min-width: 0;          /* prevent flex child from overflowing viewport */
    overflow-x: hidden;
    transition: margin-left var(--transition);
}
.page-content { padding: 24px; }

/* Page header */
.page-header { margin-bottom: 24px; }
.page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.02em;
}
.page-subtitle {
    font-size: .84rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    font-size: .76rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .separator { font-size: .65rem; }

/* ═══════════════════════════════════════════
   BOTTOM BAR
   ═══════════════════════════════════════════ */
.bottombar {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width); right: 0;
    height: var(--bottombar-height);
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    font-size: .75rem;
    color: var(--text-muted);
    z-index: 90;
    transition: left var(--transition);
}
.bottombar a { color: var(--text-secondary); font-weight: 500; }
.bottombar a:hover { color: var(--primary); }

/* ═══════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title {
    font-weight: 650;
    font-size: .95rem;
    letter-spacing: -.01em;
}
.card-body { padding: 20px; }

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: .85rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    letter-spacing: -.01em;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 1px 3px rgba(13,148,136,.3);
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 3px 10px rgba(13,148,136,.35);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.btn-sm { padding: 4px 10px; font-size: .78rem; }
.btn-lg { padding: 10px 22px; font-size: .95rem; }

/* ═══════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
    letter-spacing: .01em;
}
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-size: .88rem;
    color: var(--text);
    transition: all var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13,148,136,.1);
}

/* ═══════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-neutral { background: var(--surface-2); color: var(--text-secondary); }

/* ═══════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════ */
.table-wrapper { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}
.table th {
    padding: 10px 14px;
    text-align: left;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--primary-light); }

/* ═══════════════════════════════════════════
   FLASH MESSAGES
   ═══════════════════════════════════════════ */
.alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: .84rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    animation: alertIn .25s ease;
    border-left: 3px solid transparent;
}
@keyframes alertIn { from { opacity: 0; transform: translateY(-6px); } }
.alert-success { background: #ecfdf5; color: #065f46; border-color: var(--success); }
.alert-error   { background: #fef2f2; color: #991b1b; border-color: var(--danger); }
.alert-warning { background: #fffbeb; color: #92400e; border-color: var(--warning); }
.alert-info    { background: #eff6ff; color: #1e40af; border-color: var(--info); }

/* ═══════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════ */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.stat-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.stat-icon.teal  { background: var(--primary-light); color: var(--primary); }
.stat-icon.slate { background: var(--surface-2);     color: var(--text-secondary); }
.stat-icon.green { background: #ecfdf5; color: var(--success); }
.stat-icon.red   { background: #fef2f2; color: var(--danger); }
.stat-label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 3px;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 750;
    color: var(--text);
    letter-spacing: -.03em;
    line-height: 1.2;
}
.stat-change {
    font-size: .75rem;
    margin-top: 4px;
    font-weight: 500;
}
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ═══════════════════════════════════════════
   DROPDOWN MENUS
   ═══════════════════════════════════════════ */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 6px;
    z-index: 300;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
}
.dropdown-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: .84rem;
    color: var(--text-secondary);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.dropdown-item:hover { background: var(--primary-light); color: var(--primary); }
.dropdown-item i { font-size: 1rem; color: var(--text-muted); }


/* ═══════════════════════════════════════════
   Utility Classes
   ═══════════════════════════════════════════ */

/* ── Text Alignment ── */
.text-center  { text-align: center !important; }
.text-start   { text-align: left   !important; }
.text-end     { text-align: right  !important; }
.text-justify { text-align: justify !important; }

/* ── Text Transform ── */
.text-uppercase   { text-transform: uppercase  !important; }
.text-lowercase   { text-transform: lowercase  !important; }
.text-capitalize  { text-transform: capitalize !important; }
.text-none        { text-transform: none       !important; }

/* ── Font Weight ── */
.fw-light    { font-weight: 300 !important; }
.fw-normal   { font-weight: 400 !important; }
.fw-medium   { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold     { font-weight: 700 !important; }

/* ── Font Style ── */
.fst-italic  { font-style: italic !important; }
.fst-normal  { font-style: normal !important; }

/* ── Font Size ── */
.fs-xs   { font-size: .75rem  !important; }
.fs-sm   { font-size: .85rem  !important; }
.fs-base { font-size: 1rem    !important; }
.fs-md   { font-size: 1.1rem  !important; }
.fs-lg   { font-size: 1.25rem !important; }
.fs-xl   { font-size: 1.5rem  !important; }
.fs-2xl  { font-size: 1.875rem !important; }
.fs-3xl  { font-size: 2.25rem  !important; }

/* ── Text Color ── */
.text-primary   { color: var(--primary)        !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted)     !important; }
.text-dark      { color: var(--text)           !important; }
.text-success   { color: var(--success)        !important; }
.text-warning   { color: var(--warning)        !important; }
.text-danger    { color: var(--danger)         !important; }
.text-info      { color: var(--info)           !important; }
.text-white     { color: #ffffff               !important; }
.text-navy      { color: var(--navy)           !important; }

/* ── Text Decoration ── */
.text-decoration-none      { text-decoration: none      !important; }
.text-decoration-underline { text-decoration: underline !important; }
.text-decoration-line-through { text-decoration: line-through !important; }

/* ── Text Wrap / Overflow ── */
.text-nowrap   { white-space: nowrap    !important; }
.text-wrap     { white-space: normal    !important; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important; }
.text-break    { word-break: break-word !important; overflow-wrap: break-word !important; }

/* ── Display ── */
.d-none         { display: none         !important; }
.d-block        { display: block        !important; }
.d-inline       { display: inline       !important; }
.d-inline-block { display: inline-block !important; }
.d-flex         { display: flex         !important; }
.d-inline-flex  { display: inline-flex  !important; }
.d-grid         { display: grid         !important; }

/* ── Flex Utilities ── */
.flex-row         { flex-direction: row            !important; }
.flex-column      { flex-direction: column         !important; }
.flex-row-reverse { flex-direction: row-reverse    !important; }
.flex-col-reverse { flex-direction: column-reverse !important; }
.flex-wrap        { flex-wrap: wrap   !important; }
.flex-nowrap      { flex-wrap: nowrap !important; }
.flex-grow-1      { flex-grow: 1     !important; }
.flex-shrink-0    { flex-shrink: 0   !important; }
.flex-fill        { flex: 1 1 auto   !important; }

/* ── Justify Content ── */
.justify-start    { justify-content: flex-start    !important; }
.justify-end      { justify-content: flex-end      !important; }
.justify-center   { justify-content: center        !important; }
.justify-between  { justify-content: space-between !important; }
.justify-around   { justify-content: space-around  !important; }
.justify-evenly   { justify-content: space-evenly  !important; }

/* ── Align Items ── */
.align-start    { align-items: flex-start !important; }
.align-end      { align-items: flex-end   !important; }
.align-center   { align-items: center     !important; }
.align-baseline { align-items: baseline   !important; }
.align-stretch  { align-items: stretch    !important; }

/* ── Align Self ── */
.self-start   { align-self: flex-start !important; }
.self-end     { align-self: flex-end   !important; }
.self-center  { align-self: center     !important; }
.self-stretch { align-self: stretch    !important; }

/* ── Gaps ── */
.gap-0  { gap: 0       !important; }
.gap-1  { gap: .25rem  !important; }
.gap-2  { gap: .5rem   !important; }
.gap-3  { gap: .75rem  !important; }
.gap-4  { gap: 1rem    !important; }
.gap-5  { gap: 1.25rem !important; }
.gap-6  { gap: 1.5rem  !important; }
.gap-8  { gap: 2rem    !important; }
.gap-10 { gap: 2.5rem  !important; }

/* ── Margin ── */
.m-0  { margin: 0         !important; }
.m-1  { margin: .25rem    !important; }
.m-2  { margin: .5rem     !important; }
.m-3  { margin: .75rem    !important; }
.m-4  { margin: 1rem      !important; }
.m-5  { margin: 1.25rem   !important; }
.m-6  { margin: 1.5rem    !important; }
.m-8  { margin: 2rem      !important; }
.m-auto { margin: auto    !important; }

.mt-0  { margin-top:    0       !important; }
.mt-1  { margin-top:    .25rem  !important; }
.mt-2  { margin-top:    .5rem   !important; }
.mt-3  { margin-top:    .75rem  !important; }
.mt-4  { margin-top:    1rem    !important; }
.mt-5  { margin-top:    1.25rem !important; }
.mt-6  { margin-top:    1.5rem  !important; }
.mt-8  { margin-top:    2rem    !important; }
.mt-auto { margin-top:  auto    !important; }

.mb-0  { margin-bottom: 0       !important; }
.mb-1  { margin-bottom: .25rem  !important; }
.mb-2  { margin-bottom: .5rem   !important; }
.mb-3  { margin-bottom: .75rem  !important; }
.mb-4  { margin-bottom: 1rem    !important; }
.mb-5  { margin-bottom: 1.25rem !important; }
.mb-6  { margin-bottom: 1.5rem  !important; }
.mb-8  { margin-bottom: 2rem    !important; }
.mb-auto { margin-bottom: auto  !important; }

.ms-0  { margin-left:   0       !important; }
.ms-1  { margin-left:   .25rem  !important; }
.ms-2  { margin-left:   .5rem   !important; }
.ms-3  { margin-left:   .75rem  !important; }
.ms-4  { margin-left:   1rem    !important; }
.ms-5  { margin-left:   1.25rem !important; }
.ms-6  { margin-left:   1.5rem  !important; }
.ms-8  { margin-left:   2rem    !important; }
.ms-auto { margin-left: auto    !important; }

.me-0  { margin-right:  0       !important; }
.me-1  { margin-right:  .25rem  !important; }
.me-2  { margin-right:  .5rem   !important; }
.me-3  { margin-right:  .75rem  !important; }
.me-4  { margin-right:  1rem    !important; }
.me-5  { margin-right:  1.25rem !important; }
.me-6  { margin-right:  1.5rem  !important; }
.me-8  { margin-right:  2rem    !important; }
.me-auto { margin-right: auto   !important; }

.mx-0    { margin-left: 0;    margin-right: 0    !important; }
.mx-1    { margin-left: .25rem; margin-right: .25rem !important; }
.mx-2    { margin-left: .5rem;  margin-right: .5rem  !important; }
.mx-3    { margin-left: .75rem; margin-right: .75rem !important; }
.mx-4    { margin-left: 1rem;   margin-right: 1rem   !important; }
.mx-auto { margin-left: auto;   margin-right: auto   !important; }

.my-0    { margin-top: 0;    margin-bottom: 0    !important; }
.my-1    { margin-top: .25rem; margin-bottom: .25rem !important; }
.my-2    { margin-top: .5rem;  margin-bottom: .5rem  !important; }
.my-3    { margin-top: .75rem; margin-bottom: .75rem !important; }
.my-4    { margin-top: 1rem;   margin-bottom: 1rem   !important; }
.my-auto { margin-top: auto;   margin-bottom: auto   !important; }

/* ── Padding ── */
.p-0  { padding: 0       !important; }
.p-1  { padding: .25rem  !important; }
.p-2  { padding: .5rem   !important; }
.p-3  { padding: .75rem  !important; }
.p-4  { padding: 1rem    !important; }
.p-5  { padding: 1.25rem !important; }
.p-6  { padding: 1.5rem  !important; }
.p-8  { padding: 2rem    !important; }

.pt-0  { padding-top:    0       !important; }
.pt-1  { padding-top:    .25rem  !important; }
.pt-2  { padding-top:    .5rem   !important; }
.pt-3  { padding-top:    .75rem  !important; }
.pt-4  { padding-top:    1rem    !important; }
.pt-5  { padding-top:    1.25rem !important; }
.pt-6  { padding-top:    1.5rem  !important; }
.pt-8  { padding-top:    2rem    !important; }

.pb-0  { padding-bottom: 0       !important; }
.pb-1  { padding-bottom: .25rem  !important; }
.pb-2  { padding-bottom: .5rem   !important; }
.pb-3  { padding-bottom: .75rem  !important; }
.pb-4  { padding-bottom: 1rem    !important; }
.pb-5  { padding-bottom: 1.25rem !important; }
.pb-6  { padding-bottom: 1.5rem  !important; }
.pb-8  { padding-bottom: 2rem    !important; }

.ps-0  { padding-left:   0       !important; }
.ps-1  { padding-left:   .25rem  !important; }
.ps-2  { padding-left:   .5rem   !important; }
.ps-3  { padding-left:   .75rem  !important; }
.ps-4  { padding-left:   1rem    !important; }
.ps-5  { padding-left:   1.25rem !important; }
.ps-6  { padding-left:   1.5rem  !important; }
.ps-8  { padding-left:   2rem    !important; }

.pe-0  { padding-right:  0       !important; }
.pe-1  { padding-right:  .25rem  !important; }
.pe-2  { padding-right:  .5rem   !important; }
.pe-3  { padding-right:  .75rem  !important; }
.pe-4  { padding-right:  1rem    !important; }
.pe-5  { padding-right:  1.25rem !important; }
.pe-6  { padding-right:  1.5rem  !important; }
.pe-8  { padding-right:  2rem    !important; }

.px-0  { padding-left: 0;    padding-right: 0    !important; }
.px-1  { padding-left: .25rem; padding-right: .25rem !important; }
.px-2  { padding-left: .5rem;  padding-right: .5rem  !important; }
.px-3  { padding-left: .75rem; padding-right: .75rem !important; }
.px-4  { padding-left: 1rem;   padding-right: 1rem   !important; }
.px-6  { padding-left: 1.5rem; padding-right: 1.5rem !important; }
.px-8  { padding-left: 2rem;   padding-right: 2rem   !important; }

.py-0  { padding-top: 0;    padding-bottom: 0    !important; }
.py-1  { padding-top: .25rem; padding-bottom: .25rem !important; }
.py-2  { padding-top: .5rem;  padding-bottom: .5rem  !important; }
.py-3  { padding-top: .75rem; padding-bottom: .75rem !important; }
.py-4  { padding-top: 1rem;   padding-bottom: 1rem   !important; }
.py-6  { padding-top: 1.5rem; padding-bottom: 1.5rem !important; }
.py-8  { padding-top: 2rem;   padding-bottom: 2rem   !important; }

/* ── Width / Height ── */
.w-auto  { width: auto   !important; }
.w-25    { width: 25%    !important; }
.w-50    { width: 50%    !important; }
.w-75    { width: 75%    !important; }
.w-100   { width: 100%   !important; }
.w-full  { width: 100%   !important; }
.min-w-0 { min-width: 0  !important; }

.h-auto  { height: auto  !important; }
.h-25    { height: 25%   !important; }
.h-50    { height: 50%   !important; }
.h-75    { height: 75%   !important; }
.h-100   { height: 100%  !important; }
.h-full  { height: 100%  !important; }
.min-h-0 { min-height: 0 !important; }

/* ── Overflow ── */
.overflow-auto    { overflow: auto    !important; }
.overflow-hidden  { overflow: hidden  !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll  { overflow: scroll  !important; }
.overflow-x-auto  { overflow-x: auto  !important; }
.overflow-y-auto  { overflow-y: auto  !important; }

/* ── Position ── */
.position-static   { position: static   !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed    { position: fixed    !important; }
.position-sticky   { position: sticky   !important; }

/* ── Border ── */
.border       { border: 1px solid var(--border) !important; }
.border-0     { border: none  !important; }
.border-top   { border-top:    1px solid var(--border) !important; }
.border-bottom{ border-bottom: 1px solid var(--border) !important; }
.border-start { border-left:   1px solid var(--border) !important; }
.border-end   { border-right:  1px solid var(--border) !important; }

.border-primary { border-color: var(--primary) !important; }
.border-success { border-color: var(--success) !important; }
.border-warning { border-color: var(--warning) !important; }
.border-danger  { border-color: var(--danger)  !important; }

/* ── Border Radius ── */
.rounded-0    { border-radius: 0                 !important; }
.rounded-sm   { border-radius: var(--radius)     !important; }
.rounded      { border-radius: var(--radius-lg)  !important; }
.rounded-lg   { border-radius: var(--radius-xl)  !important; }
.rounded-pill { border-radius: 999px             !important; }
.rounded-full { border-radius: 50%               !important; }

/* ── Background Color ── */
.bg-primary       { background-color: var(--primary)       !important; }
.bg-primary-light { background-color: var(--primary-light) !important; }
.bg-success       { background-color: var(--success)       !important; }
.bg-warning       { background-color: var(--warning)       !important; }
.bg-danger        { background-color: var(--danger)        !important; }
.bg-info          { background-color: var(--info)          !important; }
.bg-white         { background-color: #ffffff              !important; }
.bg-surface       { background-color: var(--surface)       !important; }
.bg-surface-2     { background-color: var(--surface-2)     !important; }
.bg-transparent   { background-color: transparent          !important; }
.bg-navy          { background-color: var(--navy)          !important; }

/* ── Shadow ── */
.shadow-none { box-shadow: none             !important; }
.shadow-sm   { box-shadow: var(--shadow-sm) !important; }
.shadow      { box-shadow: var(--shadow)    !important; }
.shadow-lg   { box-shadow: var(--shadow-lg) !important; }
.shadow-xl   { box-shadow: var(--shadow-xl) !important; }

/* ── Opacity ── */
.opacity-0    { opacity: 0    !important; }
.opacity-25   { opacity: .25  !important; }
.opacity-50   { opacity: .5   !important; }
.opacity-75   { opacity: .75  !important; }
.opacity-100  { opacity: 1    !important; }

/* ── Cursor ── */
.cursor-pointer { cursor: pointer !important; }
.cursor-default { cursor: default !important; }
.cursor-not-allowed { cursor: not-allowed !important; }

/* ── Visibility ── */
.visible   { visibility: visible !important; }
.invisible { visibility: hidden  !important; }

/* ── Z-Index ── */
.z-0   { z-index: 0    !important; }
.z-10  { z-index: 10   !important; }
.z-20  { z-index: 20   !important; }
.z-50  { z-index: 50   !important; }
.z-100 { z-index: 100  !important; }

/* ── Vertical Align ── */
.align-top      { vertical-align: top      !important; }
.align-middle   { vertical-align: middle   !important; }
.align-bottom   { vertical-align: bottom   !important; }
.align-text-top { vertical-align: text-top !important; }

/* ── List Reset ── */
.list-unstyled { list-style: none; padding-left: 0; margin-bottom: 0; }

/* ── Misc ── */
.user-select-none { user-select: none !important; }
.pointer-events-none { pointer-events: none !important; }
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.dropdown-item:hover i { color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ═══════════════════════════════════════════
   MOBILE OVERLAY
   ═══════════════════════════════════════════ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.45);
    z-index: 99;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* ═══════════════════════════════════════════
   PROFILE PAGE
   ═══════════════════════════════════════════ */

/* Hero card */
.profile-hero-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.profile-hero-bg {
    height: 90px;
    background: linear-gradient(135deg, var(--primary) 0%, #0f766e 60%, #134e4a 100%);
}
.profile-hero-body {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 24px 20px;
    flex-wrap: wrap;
}
.profile-avatar-wrap {
    position: relative;
    margin-top: -40px;
    flex-shrink: 0;
}
.profile-avatar-img {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
    border: 3px solid #fff;
    box-shadow: var(--shadow);
}
.profile-avatar-initials {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(13,148,136,.15);
    color: var(--primary);
    border: 3px solid #fff;
    box-shadow: var(--shadow);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -.03em;
}
.profile-avatar-edit {
    position: absolute;
    bottom: 2px; right: 2px;
    width: 24px; height: 24px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .78rem;
    border: 2px solid #fff;
    transition: background var(--transition);
}
.profile-avatar-edit:hover { background: var(--primary-hover); }
.profile-hero-info { flex: 1; padding-top: 10px; }
.profile-hero-name {
    font-size: 1.15rem;
    font-weight: 750;
    color: var(--text);
    letter-spacing: -.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.profile-title-badge {
    font-size: .72rem;
    font-weight: 700;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(13,148,136,.2);
    border-radius: 4px;
    padding: 1px 7px;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.profile-hero-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 5px;
}
.profile-hero-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .82rem;
    color: var(--text-secondary);
}
.profile-hero-meta i { font-size: .9rem; color: var(--primary); }
.profile-settings-btn { margin-top: 10px; }

/* Info grid */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.profile-grid-full { grid-column: 1 / -1; }

/* Definition list */
.profile-dl { display: flex; flex-direction: column; gap: 0; }
.profile-dl-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.profile-dl-row:last-child { border-bottom: none; }
.profile-dl-row dt {
    font-size: .77rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    flex-shrink: 0;
    min-width: 140px;
}
.profile-dl-row dd {
    font-size: .87rem;
    color: var(--text);
    font-weight: 500;
    text-align: right;
}
.profile-code {
    font-family: var(--font-mono);
    font-size: .8rem;
    background: var(--surface-2);
    padding: 1px 7px;
    border-radius: 4px;
    color: var(--text-secondary);
}

/* System info grid */
.profile-sys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.profile-sys-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.profile-sys-label {
    font-size: .73rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.profile-sys-item span:last-child {
    font-size: .87rem;
    font-weight: 500;
    color: var(--text);
}

/* ═══════════════════════════════════════════
   SETTINGS PAGE
   ═══════════════════════════════════════════ */

.settings-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 16px;
    align-items: start;
}
.settings-sidebar { display: flex; flex-direction: column; gap: 16px; }

/* Photo preview */
.photo-preview-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 16px;
    cursor: pointer;
    overflow: hidden;
}
.photo-preview-img {
    width: 120px; height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
    display: block;
}
.photo-preview-initials {
    width: 120px; height: 120px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    border: 3px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 2.2rem;
    letter-spacing: -.03em;
}
.photo-preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity var(--transition);
    border-radius: 50%;
    cursor: pointer;
}
.photo-preview-overlay i { font-size: 1.3rem; }
.photo-preview-wrap:hover .photo-preview-overlay { opacity: 1; }
.photo-hint {
    text-align: center;
    font-size: .74rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}
.w-full { width: 100%; justify-content: center; }

/* Settings read-only note */
.settings-readonly-note {
    font-size: .74rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 14px;
    padding: 8px 10px;
    background: var(--surface-2);
    border-radius: var(--radius);
    border-left: 3px solid var(--border);
}

/* Password input wrapper */
.pass-input-wrap { position: relative; }
.pass-input-wrap .form-control { padding-right: 40px; }
.pass-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 4px;
    line-height: 1;
    display: flex; align-items: center;
}
.pass-toggle:hover { color: var(--primary); }

/* Strength bar */
.pass-strength {
    height: 3px;
    border-radius: 2px;
    margin-top: 6px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.pass-strength::before {
    content: '';
    display: block;
    height: 3px;
    width: 60px;
    border-radius: 2px;
    background: var(--border);
}
.strength-weak   { color: #dc2626; }
.strength-weak::before   { background: #dc2626; }
.strength-medium { color: #d97706; }
.strength-medium::before { background: #d97706; }
.strength-good   { color: #2563eb; }
.strength-good::before   { background: #2563eb; }
.strength-strong { color: var(--success); }
.strength-strong::before { background: var(--success); }

/* Match hint */
.pass-match-hint {
    font-size: .74rem;
    font-weight: 600;
    margin-top: 5px;
}
.match-ok  { color: var(--success); }
.match-no  { color: var(--danger); }

/* Password tips */
.pass-tips {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 16px;
}
.pass-tips-title {
    font-size: .78rem;
    font-weight: 650;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.pass-tips ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pass-tips li {
    font-size: .77rem;
    color: var(--text-muted);
    padding-left: 16px;
    position: relative;
}
.pass-tips li::before {
    content: '○';
    position: absolute;
    left: 0;
    font-size: .6rem;
}
.pass-tips li.tip-ok { color: var(--success); font-weight: 600; }
.pass-tips li.tip-ok::before { content: '✓'; }

/* Inline alert */
.alert-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: var(--radius);
    font-size: .82rem;
    font-weight: 500;
    margin-bottom: 14px;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Topbar user photo */
.topbar-user-avatar img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-overlay { display: block; }
    .topbar, .bottombar { left: 0 !important; }
    .main-content { margin-left: 0 !important; }
    .topbar-ai-label, .topbar-ai-kbd { display: none; }
    .topbar-ai-btn { padding: 6px 8px; }
}
@media (max-width: 640px) {
    .page-content { padding: 14px; }
    .topbar { padding: 0 14px; }
    .bottombar { padding: 0 14px; }
    .topbar-user-name { display: none; }
}

/* ═══════════════════════════════════════════
   SCROLLBAR (global)
   ═══════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }