:root {
    --bg: #0b1220;
    --bg-2: #0f172a;
    --card: #1e293b;
    --sidebar: #111827;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --primary: #3b82f6;
    --ok: #22c55e;
    --warn: #f59e0b;
    --danger: #ef4444;
    --border: #2a3854;
    --sidebar-w: 250px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* ===== Lucide Icons Global ===== */
svg[data-lucide],
[data-lucide] svg {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    stroke-width: 1.8;
}

/* ===== Tata Letak ===== */
.layout { display: flex; min-height: 100vh; }

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    transition: transform .25s ease;
}
.brand {
    display: flex; align-items: center; gap: 12px;
    padding: 0 22px; height: 70px; border-bottom: 1px solid var(--border);
    box-sizing: border-box;
}
.brand svg { width: 22px; height: 22px; color: var(--primary); }
.brand-name { font-weight: 700; font-size: 1.1rem; letter-spacing: .3px; }

.nav { padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: 9px;
    color: var(--muted); cursor: pointer; font-size: .92rem; font-weight: 500;
    user-select: none; transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: var(--text); }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }

.sidebar-foot { padding: 16px; border-top: 1px solid var(--border); }
.drive-side { font-size: .8rem; color: var(--muted); }

/* Backdrop gelap saat sidebar terbuka di mobile */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 29;
    opacity: 0;
    transition: opacity .25s ease;
}
.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* ===== Konten ===== */
.content {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.topbar {
    display: flex; align-items: center; gap: 14px;
    padding: 0 28px; height: 70px; border-bottom: 1px solid var(--border);
    background: var(--bg-2); position: sticky; top: 0; z-index: 20;
    box-sizing: border-box;
}
.topbar h1 { font-size: 1.25rem; margin: 0; flex: 1; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
.topbar-ico { width: 15px; height: 15px; color: var(--muted); }
.hamburger {
    display: none; background: transparent; border: 1px solid var(--border);
    color: var(--text); border-radius: 8px; padding: 6px 11px; font-size: 1rem; cursor: pointer;
}
.hamburger svg { width: 18px; height: 18px; }

main { padding: 28px; max-width: 1100px; width: 100%; margin: 0 auto; }

/* ===== Tampilan ===== */
.view { display: none; flex-direction: column; gap: 22px; }
.view.active { display: flex; }

/* ===== Kartu Statistik ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.22s, box-shadow 0.22s;
}
.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.12);
}
.stat-ico {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.stat-card:hover .stat-ico {
    transform: scale(1.06);
}
.stat-ico svg { width: 22px; height: 22px; }
.stat-ico.blue { background: rgba(59,130,246,.15); color: var(--primary); }
.stat-ico.green { background: rgba(34,197,94,.15); color: var(--ok); }
.stat-ico.amber { background: rgba(245,158,11,.15); color: var(--warn); }
.stat-ico.violet { background: rgba(139,92,246,.15); color: #8b5cf6; }
.stat-num { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.5px; }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 400; }

/* ===== Kartu ===== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card h2 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.heading-ico { width: 18px; height: 18px; color: var(--muted); }

/* ===== Tombol ===== */
button {
    border: none; border-radius: 8px; padding: 8px 15px; font-size: .88rem;
    cursor: pointer; color: #fff; font-weight: 500; font-family: inherit;
    display: inline-flex; align-items: center; gap: 6px;
}
button:hover { opacity: .9; }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--primary); }
.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.danger { background: var(--danger); }
.warn { background: var(--warn); color: #1f2937; }
.ok-btn { background: var(--ok); }
.btn-ico { width: 15px; height: 15px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Tabel ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
    table-layout: fixed;
}
th, td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    font-size: .87rem;
    vertical-align: middle;
}
th {
    color: var(--muted);
    font-weight: 600;
}
td .row-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
td button {
    padding: 5px 10px;
    font-size: .78rem;
}

/* Default table column widths (e.g. recent-table) */
table th:nth-child(1), table td:nth-child(1) { width: 55%; word-break: break-all; }
table th:nth-child(2), table td:nth-child(2) { width: 15%; min-width: 80px; white-space: nowrap; }
table th:nth-child(3), table td:nth-child(3) { width: 30%; min-width: 150px; white-space: nowrap; }

/* Folder/backups table column widths (has 4 columns: File, Ukuran, Dibuat, Aksi) */
.folder-body table th:nth-child(1), .folder-body table td:nth-child(1) { width: 42%; word-break: break-all; }
.folder-body table th:nth-child(2), .folder-body table td:nth-child(2) { width: 12%; min-width: 80px; }
.folder-body table th:nth-child(3), .folder-body table td:nth-child(3) { width: 23%; min-width: 150px; }
.folder-body table th:nth-child(4), .folder-body table td:nth-child(4) { width: 23%; min-width: 180px; text-align: right; }
.folder-body table td .row-actions { justify-content: flex-end; }
a { color: inherit; text-decoration: none; }

.muted { color: var(--muted); font-size: .9rem; }
.hidden { display: none !important; }
.flash { margin: 16px 28px 0; padding: 12px 18px; border-radius: 8px; font-size: .9rem; }
.flash.ok { background: #14532d; }
.flash.err { background: #7f1d1d; }

/* ===== Google Drive ===== */
.drive-box { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.drive-status { display: inline-flex; align-items: center; gap: 7px; font-size: .88rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--ok); }

/* ===== Modal ===== */
.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.6);
    display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 12px;
    padding: 24px; width: 100%; max-width: 480px;
}
.modal-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.modal-header h3 { margin: 0; font-weight: 600; }
.modal-ico { width: 22px; height: 22px; color: var(--primary); }
form label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 12px; font-weight: 500; }
form input {
    width: 100%; margin-top: 5px; padding: 9px 11px; border-radius: 7px;
    border: 1px solid var(--border); background: #0f172a; color: var(--text); font-size: .9rem;
    font-family: inherit;
}
form input:focus { outline: none; border-color: var(--primary); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-card select {
    width: 100%; margin-top: 5px; padding: 9px 11px; border-radius: 7px;
    border: 1px solid var(--border); background: #0f172a; color: var(--text);
    font-size: .9rem; font-family: inherit;
}
.modal-card select:focus { outline: none; border-color: var(--primary); }
.modal-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.modal-actions .spacer { flex: 1; }
.test-result { margin-top: 12px; font-size: .85rem; min-height: 18px; }
.test-result.ok { color: var(--ok); }
.test-result.err { color: var(--danger); }

/* ===== Progress ===== */
.progress-wrap { margin-top: 4px; }
.progress-meta { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: 6px; }
.bar { height: 16px; background: #0f172a; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.bar-fill {
    height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), #60a5fa);
    transition: width .5s ease; border-radius: 8px;
}
.bar-fill.indeterminate {
    width: 35% !important; animation: slide 1.2s infinite ease-in-out;
}
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }

/* ===== Toast ===== */
.toast {
    position: fixed; bottom: 24px; right: 24px; padding: 14px 20px; border-radius: 10px;
    background: var(--card); border: 1px solid var(--border); max-width: 380px; font-size: .87rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.4); z-index: 60;
}
.toast.ok { border-left: 4px solid var(--ok); }
.toast.err { border-left: 4px solid var(--danger); }

/* ===== Responsif ===== */

/* Tablet & layar menengah */
@media (max-width: 992px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    main { padding: 24px; }
}

/* Sidebar menjadi drawer (mobile/tablet kecil) */
@media (max-width: 860px) {
    .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,.5); }
    .sidebar.open { transform: translateX(0); }
    .content { margin-left: 0; }
    .hamburger { display: inline-flex; }
    .topbar { padding: 0 16px; }
    main { padding: 18px; }

    /* Header kartu + grup tombol menumpuk rapi */
    .card-head { flex-direction: column; align-items: stretch; gap: 12px; }
    .card-head h2 { font-size: 1rem; }
    .btn-group { flex-direction: row; flex-wrap: wrap; width: 100%; }
    .btn-group > button { flex: 1 1 auto; justify-content: center; }
    .view-toggle { flex: 0 0 auto; }
}

/* HP */
@media (max-width: 600px) {
    main { padding: 14px; }
    .view { gap: 16px; }
    .card { padding: 18px 16px; border-radius: 12px; }
    .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 14px 12px; gap: 12px; }
    .stat-ico { width: 40px; height: 40px; }
    .stat-num { font-size: 1.2rem; }
    .topbar h1 { font-size: 1.1rem; }
    .topbar-right { display: none; }   /* sembunyikan jam agar judul tidak terdesak */
    .flash { margin: 14px 14px 0; }

    /* Tabel jadi bisa di-scroll horizontal */
    .card, .folder-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { table-layout: auto; min-width: 520px; }

    /* Form & modal: kolom tunggal */
    .grid2 { grid-template-columns: 1fr; }
    .modal-card { padding: 20px; border-radius: 12px; }

    /* Pengaturan: input + tombol menumpuk */
    .setting-row { flex-direction: column; align-items: stretch; }
    .setting-row button { justify-content: center; }

    /* Progress: label panjang tidak meluber */
    .progress-meta { flex-direction: column; gap: 2px; }

    /* Drive box menumpuk */
    .drive-box { flex-direction: column; align-items: stretch; }
}

/* HP kecil */
@media (max-width: 400px) {
    .stats { grid-template-columns: 1fr; }
    .btn-group > button { flex: 1 1 100%; }
}

/* ===== Status Badge ===== */
.badge { padding: 3px 9px; border-radius: 6px; font-size: .75rem; font-weight: 600; }
.badge.ok { background: rgba(34,197,94,.15); color: var(--ok); }
.badge.err { background: rgba(239,68,68,.15); color: var(--danger); }
.badge.pending { background: rgba(148,163,184,.15); color: var(--muted); }

/* ===== Settings Row ===== */
.setting-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.setting-input-wrap { flex: 1; }
.setting-input {
    width: 100%; padding: 9px 12px; border-radius: 7px;
    border: 1px solid var(--border); background: #0f172a; color: var(--text);
    font-size: .9rem; font-family: inherit;
}
.setting-input:focus { outline: none; border-color: var(--primary); }

/* ===== Folder Group ===== */
.folder-group { margin-bottom: 18px; }
.folder-header {
    display: flex; align-items: center; gap: 10px; padding: 10px 0 6px;
    cursor: pointer; user-select: none;
}
.folder-header svg { width: 18px; height: 18px; color: var(--warn); }
.folder-header .folder-name { font-weight: 600; font-size: .95rem; }
.folder-header .folder-meta { font-size: .8rem; color: var(--muted); margin-left: auto; }
.folder-body table { margin-top: 0; }

/* ===== Connection Cards ===== */
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.conn-grid.layout-compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.conn-grid.layout-list { grid-template-columns: 1fr; gap: 8px; }

.conn-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 12px;
    padding: 18px 20px; display: flex; flex-direction: column; gap: 12px;
    transition: border-color .15s;
}
.conn-card:hover { border-color: var(--primary); }
.conn-card.card-ok { border-color: rgba(34,197,94,.4); }
.conn-card.card-fail { border-color: rgba(239,68,68,.3); opacity: .75; }
.conn-card-header { display: flex; justify-content: space-between; align-items: center; }
.conn-card-title { font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.conn-card-title svg { width: 18px; height: 18px; color: var(--primary); }
.conn-card-details { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.conn-detail { font-size: .82rem; }
.conn-detail-label { color: var(--muted); font-weight: 500; }
.conn-detail-value { color: var(--text); word-break: break-all; }
.conn-card-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--border); }
.mb-16 { margin-bottom: 16px; }

/* Compact layout */
.conn-grid.layout-compact .conn-card { padding: 12px 14px; gap: 8px; border-radius: 10px; }
.conn-grid.layout-compact .conn-card-title { font-size: .9rem; }
.conn-grid.layout-compact .conn-card-details { grid-template-columns: 1fr; gap: 3px; }
.conn-grid.layout-compact .conn-detail { display: flex; gap: 6px; }
.conn-grid.layout-compact .conn-detail-label { min-width: 60px; }
.conn-grid.layout-compact .conn-card-actions button { padding: 4px 8px; font-size: .72rem; }

/* List layout */
.conn-grid.layout-list .conn-card {
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding: 12px 20px;
    border-radius: 10px;
}
.conn-grid.layout-list .conn-card-header {
    flex: 0 0 240px;
    min-width: 0;
    margin-right: 8px;
}
.conn-grid.layout-list .conn-card-title {
    min-width: 0;
}
.conn-grid.layout-list .conn-card-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.conn-grid.layout-list .conn-card-details {
    flex: 1;
    grid-template-columns: 160px 1.5fr 1fr;
    gap: 4px 24px;
}
.conn-grid.layout-list .conn-card-actions {
    border-top: none;
    padding-top: 0;
    flex-wrap: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}
.conn-grid.layout-list .conn-card-actions button {
    padding: 5px 10px;
    font-size: .76rem;
}

@media (max-width: 992px) {
    .conn-grid.layout-list .conn-card-details {
        grid-template-columns: 140px 1.2fr 1fr;
        gap: 4px 16px;
    }
    .conn-grid.layout-list .conn-card-header {
        flex: 0 0 200px;
    }
}

@media (max-width: 768px) {
    .conn-grid.layout-list .conn-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }
    .conn-grid.layout-list .conn-card-header {
        flex: none;
        width: 100%;
        margin-right: 0;
    }
    .conn-grid.layout-list .conn-card-details {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .conn-grid.layout-list .conn-card-actions {
        margin-left: 0;
        border-top: 1px solid var(--border);
        padding-top: 12px;
        justify-content: flex-end;
    }
}

/* View toggle */
.view-toggle { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.toggle-btn {
    background: transparent; border: none; border-right: 1px solid var(--border);
    color: var(--muted); padding: 6px 10px; cursor: pointer; display: flex; align-items: center;
    border-radius: 0;
}
.toggle-btn:last-child { border-right: none; }
.toggle-btn:hover { color: var(--text); background: rgba(255,255,255,.04); }
.toggle-btn.active { color: var(--primary); background: rgba(59,130,246,.1); }
.toggle-btn svg { width: 16px; height: 16px; }

.section-label {
    display: flex; align-items: center; gap: 8px;
    font-size: .9rem; font-weight: 600; margin: 18px 0 10px; padding: 0 4px;
}
.section-label.ok-label { color: var(--ok); }
.section-label.err-label { color: var(--danger); }
.section-ico { width: 18px; height: 18px; }

/* ===== Multi-progress ===== */
.multi-progress { display: flex; flex-direction: column; gap: 10px; }
.multi-progress .progress-wrap { padding: 8px 0; }

/* ===== Google Drive Accounts Pool ===== */
.drive-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}
.drive-account-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 20px;
    align-items: center;
}
.drive-account-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    grid-column: 1 / 2;
}
.drive-account-email {
    font-weight: 500;
}
.drive-account-quota {
    font-size: 0.8rem;
}
.drive-account-bar {
    grid-column: 1 / 2;
    height: 6px;
    background: #0f172a;
    border-radius: 3px;
    overflow: hidden;
}
.drive-account-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
}
.drive-disconnect-form {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
}
.drive-disconnect-form button {
    padding: 6px 12px;
    font-size: 0.78rem;
}
.drive-combined-quota {
    background: rgba(59, 130, 246, 0.04);
    border: 1px dashed var(--primary);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}
.drive-combined-label {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 4px;
}
.drive-combined-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 8px;
}
.drive-account-bar.combined {
    grid-column: span 1;
    height: 8px;
    background: rgba(15, 23, 42, 0.6);
}
.drive-account-bar.combined .drive-account-bar-fill {
    background: linear-gradient(90deg, var(--primary), #60a5fa);
}

@media (max-width: 600px) {
    .drive-account-row {
        grid-template-columns: 1fr;
    }
    .drive-disconnect-form {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
        width: 100%;
    }
    .drive-disconnect-form button {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Sidebar Storage Widget ===== */
.side-storage-widget {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.side-storage-widget.empty {
    background: transparent;
    border: 1px dashed var(--border);
    padding: 8px 12px;
}
.side-storage-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 500;
}
.side-storage-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
}
.side-storage-ico {
    width: 14px !important;
    height: 14px !important;
    color: var(--primary);
}
.side-storage-pct {
    color: var(--muted);
}
.side-storage-bar {
    height: 5px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    overflow: hidden;
}
.side-storage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
    border-radius: 3px;
}
.side-storage-details {
    font-size: 0.7rem;
    color: var(--muted);
    text-align: right;
}

/* ===== Login Page ===== */
.login-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 20px;
    background: radial-gradient(circle at 30% 20%, #1e293b, var(--bg) 60%);
}
.login-wrap { width: 100%; max-width: 400px; }
.login-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 16px;
    padding: 36px 32px; box-shadow: 0 20px 50px rgba(0,0,0,.4);
}
.login-brand {
    display: flex; align-items: center; gap: 10px; justify-content: center;
    font-weight: 700; font-size: 1.1rem; margin-bottom: 24px;
}
.login-brand svg { width: 26px; height: 26px; color: var(--primary); }
.login-title { margin: 0 0 4px; font-size: 1.5rem; font-weight: 600; text-align: center; }
.login-sub { margin: 0 0 24px; color: var(--muted); font-size: .88rem; text-align: center; }
.login-card form label {
    display: block; font-size: .82rem; color: var(--muted); margin-bottom: 14px; font-weight: 500;
}
.login-card form input {
    width: 100%; margin-top: 6px; padding: 11px 13px; border-radius: 8px;
    border: 1px solid var(--border); background: #0f172a; color: var(--text);
    font-size: .92rem; font-family: inherit;
}
.login-card form input:focus { outline: none; border-color: var(--primary); }
.login-btn { width: 100%; justify-content: center; padding: 11px; margin-top: 6px; font-size: .95rem; }
.login-error {
    display: flex; align-items: center; gap: 8px;
    background: rgba(239,68,68,.12); color: #fca5a5; border: 1px solid rgba(239,68,68,.3);
    padding: 11px 14px; border-radius: 8px; font-size: .85rem; margin-bottom: 18px;
}
.login-error svg { width: 18px; height: 18px; flex-shrink: 0; }
.login-foot { text-align: center; margin-top: 20px; font-size: .8rem; }

/* ===== User badge / logout in sidebar ===== */
.user-box {
    display: flex; align-items: center; gap: 10px; justify-content: space-between;
    font-size: .82rem; color: var(--muted);
}
.user-box .user-name { display: flex; align-items: center; gap: 7px; }
.user-box .user-name svg { width: 16px; height: 16px; }
.logout-btn {
    background: transparent; border: 1px solid var(--border); color: var(--text);
    padding: 5px 10px; border-radius: 7px; font-size: .78rem; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
}
.logout-btn:hover { border-color: var(--danger); color: var(--danger); }
.logout-btn svg { width: 14px; height: 14px; }
