/* ==========================================================================
   PERSONAL GOOGLE DRIVE MANAGER — PREMIUM UI v2.0
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── Design Tokens ─────────────────────────────────────────────────────── */
:root {
    --bg-base:        #0b0d14;
    --bg-surface:     #111420;
    --bg-elevated:    #171b2d;
    --bg-card:        rgba(255,255,255,0.04);
    --bg-hover:       rgba(255,255,255,0.06);
    --bg-active:      rgba(255,255,255,0.10);

    --primary:        #6366f1;
    --primary-dim:    rgba(99,102,241,0.18);
    --primary-glow:   rgba(99,102,241,0.40);
    --primary-hover:  #818cf8;
    --accent:         #06b6d4;
    --accent-dim:     rgba(6,182,212,0.18);

    --success:        #10b981;
    --warning:        #f59e0b;
    --danger:         #ef4444;
    --danger-dim:     rgba(239,68,68,0.18);

    --text-1:         #f1f5f9;
    --text-2:         #94a3b8;
    --text-3:         #475569;

    --border:         rgba(255,255,255,0.07);
    --border-focus:   rgba(99,102,241,0.55);

    --shadow-sm:      0 1px 3px rgba(0,0,0,.25);
    --shadow-md:      0 4px 16px rgba(0,0,0,.35);
    --shadow-lg:      0 12px 40px rgba(0,0,0,.45);
    --shadow-glow:    0 0 30px rgba(99,102,241,0.20);

    --sidebar-w:      256px;
    --topbar-h:       64px;
    --radius-sm:      6px;
    --radius-md:      10px;
    --radius-lg:      16px;
    --radius-xl:      22px;
    --ease:           cubic-bezier(.25,.46,.45,.94);
    --dur:            .2s;
}

/* ─── Global Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--bg-base);
    color: var(--text-1);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-hover); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: #c7d2fe; }

button, input, select, textarea {
    font-family: inherit;
    background: transparent;
    border: none;
    outline: none;
    color: inherit;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ─── App Shell ──────────────────────────────────────────────────────────── */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 200;
    transition: transform .3s var(--ease);
}

/* Brand */
.sidebar-brand {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-brand-icon {
    width: 34px; height: 34px;
    background: var(--primary-dim);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-hover);
    font-size: 16px;
    flex-shrink: 0;
}
.sidebar-brand-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.3px;
    background: linear-gradient(135deg, #fff 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Upload Button */
.sidebar-upload-wrap { padding: 14px 14px 8px; }
.btn-upload-new {
    width: 100%;
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-upload-new:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-upload-new i { font-size: 14px; }

/* Nav */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 10px; }

.nav-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-3);
    padding: 14px 8px 6px;
}

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    margin-bottom: 2px;
    position: relative;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-1); }
.nav-item.active {
    background: var(--primary-dim);
    color: var(--primary-hover);
    font-weight: 600;
}
.nav-item.active::before {
    content: '';
    position: absolute; left: 0; top: 20%; bottom: 20%;
    width: 3px; border-radius: 0 3px 3px 0;
    background: var(--primary);
}

/* Storage bar */
.sidebar-storage {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.storage-header {
    display: flex; justify-content: space-between;
    font-size: 11.5px; color: var(--text-2);
    margin-bottom: 8px;
}
.storage-track {
    height: 4px; background: rgba(255,255,255,0.08);
    border-radius: 99px; overflow: hidden; margin-bottom: 4px;
}
.storage-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 99px;
    transition: width .6s var(--ease);
}

/* User Footer */
.sidebar-user {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0;
}
.user-avatar {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff;
    flex-shrink: 0;
}
.user-meta { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.btn-logout {
    color: var(--text-3); font-size: 15px; cursor: pointer;
    padding: 4px; border-radius: 6px;
    transition: all var(--dur) var(--ease);
    flex-shrink: 0;
}
.btn-logout:hover { color: var(--danger); background: var(--danger-dim); }

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

/* Topbar */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 12px;
    padding: 0 24px;
    flex-shrink: 0;
    z-index: 10;
}
.topbar-menu-toggle {
    display: none; font-size: 18px; cursor: pointer; color: var(--text-2);
    padding: 6px; border-radius: var(--radius-sm);
    transition: all var(--dur) var(--ease);
}
.topbar-menu-toggle:hover { background: var(--bg-hover); color: var(--text-1); }

.search-wrap {
    flex: 1; max-width: 520px;
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 14px; height: 38px;
    transition: all var(--dur) var(--ease);
}
.search-wrap:focus-within {
    border-color: var(--border-focus);
    background: rgba(0,0,0,0.2);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.14);
}
.search-wrap i { color: var(--text-3); font-size: 13px; flex-shrink: 0; }
.search-wrap input { flex: 1; font-size: 13.5px; color: var(--text-1); background: transparent; }
.search-wrap input::placeholder { color: var(--text-3); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-btn {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-2); cursor: pointer; font-size: 14px;
    transition: all var(--dur) var(--ease);
}
.topbar-btn:hover { background: var(--bg-hover); color: var(--text-1); }

/* ─── Content Page Area ──────────────────────────────────────────────────── */
.page-body {
    flex: 1; overflow-y: auto; overflow-x: hidden;
}

/* Toolbar strip */
.drive-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    padding: 12px 24px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.breadcrumb-trail { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bc-item {
    font-size: 13.5px; font-weight: 500;
    color: var(--text-2); cursor: pointer;
    padding: 3px 6px; border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 5px;
    transition: all var(--dur) var(--ease);
}
.bc-item:hover { color: var(--text-1); background: var(--bg-hover); }
.bc-item.active { color: var(--text-1); font-weight: 600; cursor: default; }
.bc-item.active:hover { background: transparent; }
.bc-sep { color: var(--text-3); font-size: 10px; }

.toolbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.tb-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 13px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 12.5px; font-weight: 500;
    color: var(--text-2); cursor: pointer;
    transition: all var(--dur) var(--ease);
}
.tb-btn:hover { background: var(--bg-hover); color: var(--text-1); border-color: rgba(255,255,255,0.14); }
.tb-btn.active { background: var(--primary-dim); color: var(--primary-hover); border-color: rgba(99,102,241,.3); }
.tb-btn i { font-size: 13px; }

.view-toggle { display: flex; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.view-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; color: var(--text-3); cursor: pointer; font-size: 13px;
    transition: all var(--dur) var(--ease);
}
.view-btn:hover { background: var(--bg-hover); color: var(--text-1); }
.view-btn.active { background: var(--primary-dim); color: var(--primary-hover); }

.sort-sel {
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 6px 12px; border-radius: var(--radius-md);
    font-size: 12.5px; color: var(--text-2); cursor: pointer;
    transition: all var(--dur) var(--ease);
}
.sort-sel:hover { border-color: rgba(255,255,255,0.14); color: var(--text-1); }

/* ─── Files Workspace ────────────────────────────────────────────────────── */
.drive-workspace {
    padding: 22px 24px;
}

/* Grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.file-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 14px 14px;
    display: flex; flex-direction: column; align-items: center;
    position: relative; cursor: pointer;
    transition: all .22s var(--ease);
    user-select: none;
    overflow: hidden;
}
.file-card::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.03) 0%, transparent 60%);
    pointer-events: none;
}
.file-card:hover {
    border-color: rgba(99,102,241,.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.35), var(--shadow-glow);
    background: rgba(24,28,48,.9);
}
.file-card.selected {
    border-color: var(--primary);
    background: rgba(99,102,241,.10);
    box-shadow: 0 0 0 2px rgba(99,102,241,.2);
}

.file-card-thumb {
    width: 100%; height: 80px;
    object-fit: cover; border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.file-card-icon {
    font-size: 44px; margin-bottom: 12px;
    height: 54px; display: flex; align-items: center; justify-content: center;
    line-height: 1;
}

.file-card-name {
    font-size: 12.5px; font-weight: 500;
    text-align: center; width: 100%;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--text-1); margin-bottom: 4px;
}
.file-card-meta { font-size: 10.5px; color: var(--text-3); text-align: center; }

.file-card-opts {
    position: absolute; top: 8px; right: 8px;
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.4); color: var(--text-2);
    font-size: 12px; cursor: pointer; opacity: 0;
    transition: all var(--dur) var(--ease);
    backdrop-filter: blur(6px);
}
.file-card:hover .file-card-opts { opacity: 1; }
.file-card-opts:hover { background: rgba(255,255,255,.15); color: var(--text-1); }

/* List View */
.file-list-view {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.file-list-head {
    display: grid;
    grid-template-columns: minmax(200px,3fr) 120px 100px 80px;
    padding: 10px 18px;
    background: rgba(0,0,0,.15);
    border-bottom: 1px solid var(--border);
    font-size: 11.5px; font-weight: 600; color: var(--text-3);
    text-transform: uppercase; letter-spacing: .8px;
}
.file-list-row {
    display: grid;
    grid-template-columns: minmax(200px,3fr) 120px 100px 80px;
    padding: 10px 18px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    font-size: 13px; cursor: pointer;
    transition: background var(--dur) var(--ease);
}
.file-list-row:last-child { border-bottom: none; }
.file-list-row:hover { background: var(--bg-hover); }
.file-list-row.selected { background: var(--primary-dim); }

.list-cell-name {
    display: flex; align-items: center; gap: 10px;
    font-weight: 500; overflow: hidden;
}
.list-cell-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-cell-name i { font-size: 17px; flex-shrink: 0; }
.list-cell-meta { color: var(--text-2); font-size: 12.5px; }
.list-cell-actions { display: flex; justify-content: flex-end; gap: 4px; }
.list-action-btn {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); color: var(--text-3); cursor: pointer;
    font-size: 13px; transition: all var(--dur) var(--ease);
}
.list-action-btn:hover { background: var(--bg-hover); color: var(--text-1); }

/* Icon colours */
.ic-folder   { color: #f59e0b; }
.ic-image    { color: #10b981; }
.ic-video    { color: #ef4444; }
.ic-pdf      { color: #f43f5e; }
.ic-word     { color: #3b82f6; }
.ic-excel    { color: #22c55e; }
.ic-archive  { color: #a855f7; }
.ic-other    { color: #64748b; }

/* Empty state */
.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 80px 20px; text-align: center; color: var(--text-2);
    gap: 12px;
}
.empty-icon { font-size: 56px; color: var(--text-3); margin-bottom: 4px; }
.empty-state h3 { font-size: 17px; font-weight: 600; color: var(--text-1); }
.empty-state p { font-size: 13.5px; color: var(--text-2); }

/* Loading Spinner */
.loading-spinner {
    display: none;
    flex-direction: column; align-items: center; justify-content: center;
    padding: 80px 20px; gap: 14px; color: var(--text-2);
}
.spinner-ring {
    width: 40px; height: 40px;
    border: 3px solid rgba(255,255,255,.08);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 18px; border-radius: var(--radius-md);
    font-size: 13.5px; font-weight: 600; cursor: pointer;
    transition: all var(--dur) var(--ease);
}
.btn-primary {
    background: var(--primary); color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px var(--primary-glow);
    transform: translateY(-1px);
}
.btn-secondary {
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text-2);
}
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-1); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; box-shadow: 0 4px 14px rgba(239,68,68,.4); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-1); }
.btn-success { background: var(--success); color: #fff; box-shadow: 0 4px 12px rgba(16,185,129,.3); }
.btn-success:hover { background: #059669; box-shadow: 0 6px 18px rgba(16,185,129,.4); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   SHARE MODAL — link rows
   ═══════════════════════════════════════════════════════════════════════════ */
.share-links-list { display: flex; flex-direction: column; gap: 0; }
.share-link-row {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.share-link-row:last-child { border-bottom: none; }
.share-link-label {
    font-size: 11.5px; font-weight: 600; color: var(--text-3);
    width: 80px; flex-shrink: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.share-link-input {
    flex: 1;
    background: rgba(0,0,0,.25);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    font-size: 12px; color: var(--text-2);
    font-family: monospace;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.share-copy-btn {
    width: 30px; height: 30px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-2); cursor: pointer; font-size: 12px;
    transition: all var(--dur) var(--ease);
}
.share-copy-btn:hover { background: var(--primary-dim); color: var(--primary-hover); border-color: rgba(99,102,241,.3); }

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 900;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity .25s var(--ease);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%; max-width: 460px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: scale(.93) translateY(12px);
    transition: transform .25s var(--ease);
    overflow: hidden;
}
.modal-overlay.active .modal-box { transform: scale(1) translateY(0); }
.modal-box.modal-lg { max-width: 640px; }

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close-btn {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--bg-hover);
    color: var(--text-2); font-size: 16px; cursor: pointer;
    transition: all var(--dur) var(--ease);
}
.modal-close-btn:hover { background: var(--danger-dim); color: var(--danger); }

.modal-body { padding: 22px; }
.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 10px;
    background: rgba(0,0,0,.1);
}

/* Form elements inside modal */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.form-input {
    width: 100%;
    background: rgba(0,0,0,.25);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px; font-size: 13.5px; color: var(--text-1);
    transition: all var(--dur) var(--ease);
}
.form-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99,102,241,.14);
    background: rgba(0,0,0,.35);
}
.form-input::placeholder { color: var(--text-3); }

/* ═══════════════════════════════════════════════════════════════════════════
   CONTEXT MENU
   ═══════════════════════════════════════════════════════════════════════════ */
.ctx-menu {
    position: fixed; z-index: 1000;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 6px;
    min-width: 190px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    animation: ctxFade .14s var(--ease) both;
}
@keyframes ctxFade {
    from { opacity: 0; transform: scale(.95) translateY(-4px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.ctx-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-md);
    font-size: 13px; font-weight: 500; color: var(--text-1);
    cursor: pointer; transition: background var(--dur) var(--ease);
}
.ctx-item i { width: 16px; text-align: center; font-size: 13px; color: var(--text-2); }
.ctx-item:hover { background: var(--primary-dim); }
.ctx-item:hover i { color: var(--primary-hover); }
.ctx-item.danger { color: var(--danger); }
.ctx-item.danger i { color: var(--danger); }
.ctx-item.danger:hover { background: var(--danger-dim); }
.ctx-sep { height: 1px; background: var(--border); margin: 5px 8px; }

/* ═══════════════════════════════════════════════════════════════════════════
   UPLOAD PROGRESS PANEL
   ═══════════════════════════════════════════════════════════════════════════ */
.upload-panel {
    position: fixed; bottom: 20px; right: 20px;
    width: 340px; z-index: 800;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: none;
}
.upload-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0,0,0,.2);
    border-bottom: 1px solid var(--border);
    font-size: 13px; font-weight: 600;
}
.upload-panel-toggle { cursor: pointer; color: var(--text-2); font-size: 13px; }
.upload-panel-toggle:hover { color: var(--text-1); }
.upload-panel-body { padding: 12px 16px; max-height: 260px; overflow-y: auto; }

.upload-item { margin-bottom: 12px; }
.upload-item:last-child { margin-bottom: 0; }
.upload-item-row { display: flex; justify-content: space-between; margin-bottom: 5px; }
.upload-item-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; color: var(--text-1); }
.upload-item-pct { font-size: 11.5px; font-weight: 700; color: var(--primary-hover); }
.upload-track { height: 4px; background: rgba(255,255,255,.07); border-radius: 99px; overflow: hidden; }
.upload-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; transition: width .12s linear; }

/* ═══════════════════════════════════════════════════════════════════════════
   DRAG OVERLAY
   ═══════════════════════════════════════════════════════════════════════════ */
.drag-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(10,12,20,.8);
    backdrop-filter: blur(8px);
    display: none; flex-direction: column;
    align-items: center; justify-content: center; gap: 16px;
    border: 3px dashed rgba(99,102,241,.5);
}
.drag-overlay.active { display: flex; }
.drag-overlay i { font-size: 64px; color: var(--primary-hover); animation: float 2s ease-in-out infinite; }
.drag-overlay h2 { font-size: 22px; font-weight: 700; color: var(--text-1); }
.drag-overlay p { font-size: 14px; color: var(--text-2); }
@keyframes float {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILE PREVIEWER (LIGHTBOX)
   ═══════════════════════════════════════════════════════════════════════════ */
.previewer-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(4, 5, 12, 0.97);
    display: none; flex-direction: column;
    animation: pvFadeIn .2s ease both;
}
.previewer-overlay.open { display: flex; }
@keyframes pvFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Top bar ── */
.previewer-bar {
    height: 64px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px 0 12px;
    background: linear-gradient(to bottom, rgba(0,0,0,.85) 0%, transparent 100%);
    position: absolute; top: 0; left: 0; right: 0; z-index: 10;
    gap: 12px;
}
.previewer-bar-left {
    display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1;
}
.previewer-bar-center {
    font-size: 13px; font-weight: 600; color: rgba(255,255,255,.55);
    white-space: nowrap; flex-shrink: 0;
    background: rgba(255,255,255,.07);
    padding: 4px 12px; border-radius: 99px;
}
.previewer-file-info { min-width: 0; }
.previewer-title {
    display: block; font-size: 14px; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px;
}
.previewer-subtitle {
    display: block; font-size: 11.5px; color: rgba(255,255,255,.4);
    margin-top: 1px;
}
.previewer-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.previewer-action-btn {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.75); font-size: 15px; cursor: pointer;
    transition: all .18s ease;
    border: 1px solid rgba(255,255,255,.08);
}
.previewer-action-btn:hover { background: rgba(255,255,255,.18); color: #fff; }

.previewer-close {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    background: rgba(255,255,255,.08); color: rgba(255,255,255,.75);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; cursor: pointer;
    transition: all .18s ease;
    border: 1px solid rgba(255,255,255,.08);
}
.previewer-close:hover { background: rgba(239,68,68,.5); color: #fff; border-color: transparent; }

/* ── Nav arrows ── */
.previewer-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 10; width: 52px; height: 52px; border-radius: 50%;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff; font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s ease;
    backdrop-filter: blur(8px);
}
.previewer-nav:hover { background: rgba(99,102,241,.7); border-color: rgba(99,102,241,.6); transform: translateY(-50%) scale(1.08); }
.previewer-nav:active { transform: translateY(-50%) scale(.95); }
.previewer-nav.prev { left: 18px; }
.previewer-nav.next { right: 18px; }
.previewer-nav:disabled { opacity: .2; cursor: not-allowed; }
.previewer-nav:disabled:hover { background: rgba(255,255,255,.1); transform: translateY(-50%); }

/* ── Body ── */
.previewer-body {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 72px 90px 110px;
    overflow: hidden; position: relative;
}
.preview-img {
    max-width: 100%; max-height: 100%;
    object-fit: contain; border-radius: 8px;
    cursor: zoom-in;
    transition: transform .25s ease;
    transform-origin: center center;
    user-select: none;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.preview-img.zoomed { cursor: zoom-out; }
.preview-video {
    width: 100%; max-width: 960px; max-height: 100%;
    outline: none; border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.preview-iframe {
    width: 100%; height: 100%; min-height: 70vh;
    border: none; border-radius: 8px;
    background: #fff;
}
.preview-unsupported {
    text-align: center; color: rgba(255,255,255,.5);
    display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.preview-unsupported i { font-size: 72px; color: rgba(255,255,255,.15); }
.preview-unsupported h3 { font-size: 18px; font-weight: 600; color: rgba(255,255,255,.7); }
.preview-unsupported p { font-size: 13.5px; }

/* loading state */
.preview-loading {
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    color: rgba(255,255,255,.4);
}
.preview-loading .spinner-ring {
    width: 48px; height: 48px;
    border: 3px solid rgba(255,255,255,.08);
    border-top-color: var(--primary);
}
.preview-loading p { font-size: 13.5px; }

/* ── Thumbnail strip ── */
.previewer-strip {
    height: 90px; flex-shrink: 0;
    background: rgba(0,0,0,.6);
    border-top: 1px solid rgba(255,255,255,.06);
    backdrop-filter: blur(12px);
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.15) transparent;
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 10;
    display: flex; align-items: center;
}
.previewer-strip::-webkit-scrollbar { height: 4px; }
.previewer-strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 99px; }
.previewer-strip-inner {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; min-width: max-content;
}
.strip-thumb {
    width: 68px; height: 68px; flex-shrink: 0;
    border-radius: 8px; overflow: hidden; cursor: pointer;
    border: 2px solid transparent;
    background: rgba(255,255,255,.06);
    display: flex; align-items: center; justify-content: center;
    transition: all .18s ease;
    position: relative;
}
.strip-thumb:hover { border-color: rgba(255,255,255,.35); transform: scale(1.06); }
.strip-thumb.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(99,102,241,.4); }
.strip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.strip-thumb .strip-icon { font-size: 26px; }

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
#toast-container {
    position: fixed; top: 18px; right: 18px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
}
.toast {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    min-width: 260px; max-width: 360px;
    animation: toastIn .3s var(--ease) both;
    font-size: 13.5px; font-weight: 500;
}
.toast.removing { animation: toastOut .25s var(--ease) both; }
@keyframes toastIn  { from { transform: translateX(110%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { from { transform: none; opacity: 1; }  to { transform: translateX(110%); opacity: 0; } }
.toast i { font-size: 18px; flex-shrink: 0; }
.toast.success i { color: var(--success); }
.toast.error   i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info    i { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 99px;
    font-size: 11px; font-weight: 600;
}
.badge-success { background: rgba(16,185,129,.18); color: #34d399; }
.badge-danger  { background: rgba(239,68,68,.18);  color: #f87171; }
.badge-primary { background: var(--primary-dim); color: var(--primary-hover); }
.badge-public  { background: rgba(6,182,212,.18); color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   AUTH PAGES
   ═══════════════════════════════════════════════════════════════════════════ */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at 60% 40%, rgba(99,102,241,.15) 0%, transparent 60%),
                var(--bg-base);
    overflow-y: auto;
}
.auth-card {
    width: 100%; max-width: 400px; margin: 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.auth-logo {
    width: 56px; height: 56px;
    background: var(--primary-dim);
    border: 1px solid rgba(99,102,241,.3);
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: var(--primary-hover);
    margin: 0 auto 18px;
}
.auth-title { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth-subtitle { font-size: 13.5px; color: var(--text-2); text-align: center; margin-bottom: 28px; }

.auth-form .form-group { margin-bottom: 16px; }
.auth-form .form-label { font-size: 12px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 7px; }
.auth-form .form-input {
    width: 100%;
    background: rgba(0,0,0,.22);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 11px 14px; font-size: 13.5px; color: var(--text-1);
    transition: all var(--dur) var(--ease);
}
.auth-form .form-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99,102,241,.14);
}
.auth-form .form-input::placeholder { color: var(--text-3); }
.auth-footer { text-align: center; margin-top: 22px; font-size: 13px; color: var(--text-2); }

/* Alert in auth */
.auth-alert {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; border-radius: var(--radius-md);
    font-size: 13px; margin-bottom: 16px;
}
.auth-alert.error   { background: rgba(239,68,68,.1);  color: #fca5a5; border: 1px solid rgba(239,68,68,.2); }
.auth-alert.success { background: rgba(16,185,129,.1); color: #a7f3d0; border: 1px solid rgba(16,185,129,.2); }

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */
.dash-body { padding: 24px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 16px; margin-bottom: 24px; }

.stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex; align-items: center; gap: 16px;
    transition: all .22s var(--ease);
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; top: -20px; right: -20px;
    width: 80px; height: 80px; border-radius: 50%;
    opacity: .08;
}
.stat-card:nth-child(1)::before { background: var(--primary); }
.stat-card:nth-child(2)::before { background: var(--success); }
.stat-card:nth-child(3)::before { background: var(--accent); }
.stat-card:nth-child(4)::before { background: var(--warning); }

.stat-icon {
    width: 46px; height: 46px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.stat-card:nth-child(1) .stat-icon { background: var(--primary-dim); color: var(--primary-hover); }
.stat-card:nth-child(2) .stat-icon { background: rgba(16,185,129,.18); color: var(--success); }
.stat-card:nth-child(3) .stat-icon { background: var(--accent-dim); color: var(--accent); }
.stat-card:nth-child(4) .stat-icon { background: rgba(245,158,11,.18); color: var(--warning); }

.stat-label { font-size: 12px; color: var(--text-2); margin-bottom: 3px; }
.stat-value { font-size: 20px; font-weight: 800; }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.dash-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel-title { font-size: 15px; font-weight: 700; }
.chart-wrap { height: 220px; display: flex; align-items: center; justify-content: center; }

/* ═══════════════════════════════════════════════════════════════════════════
   SETTINGS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.settings-body { padding: 28px 24px; }
.settings-header { margin-bottom: 24px; }
.settings-header h1 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.settings-header p { font-size: 13.5px; color: var(--text-2); }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-card {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 22px;
}
.settings-card h2 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.info-row {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 10px 0; border-bottom: 1px solid var(--border);
    font-size: 13px; gap: 16px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-2); flex-shrink: 0; }
.info-value { color: var(--text-1); font-weight: 500; text-align: right; word-break: break-all; }
code { background: rgba(99,102,241,.12); color: var(--primary-hover); padding: 2px 6px; border-radius: 4px; font-size: 12px; }

/* ═══════════════════════════════════════════════════════════════════════════
   PUBLIC DOWNLOAD PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.dl-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: radial-gradient(ellipse at 50% 30%, rgba(99,102,241,.15) 0%, transparent 65%), var(--bg-base);
}
.dl-card {
    width: 100%; max-width: 660px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 36px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.dl-file-row { display: flex; align-items: center; gap: 18px; padding-bottom: 24px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.dl-file-icon { font-size: 52px; }
.dl-file-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.dl-file-size { font-size: 13px; color: var(--text-2); }
.dl-mirrors h3 { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.dl-mirror-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 16px; border-radius: var(--radius-md);
    border: 1px solid var(--border); background: var(--bg-card);
    margin-bottom: 10px; transition: all var(--dur) var(--ease);
}
.dl-mirror-item:hover { border-color: var(--primary); background: var(--primary-dim); }
.dl-mirror-name { font-size: 13.5px; font-weight: 600; }
.dl-mirror-status { font-size: 12px; color: var(--success); display: flex; align-items: center; gap: 5px; }

/* ═══════════════════════════════════════════════════════════════════════════
   FOLDER PICKER TREE (Move Modal)
   ═══════════════════════════════════════════════════════════════════════════ */
.folder-tree { max-height: 240px; overflow-y: auto; }
.folder-tree-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: var(--radius-md);
    font-size: 13px; cursor: pointer; color: var(--text-2);
    transition: all var(--dur) var(--ease);
}
.folder-tree-item:hover { background: var(--bg-hover); color: var(--text-1); }
.folder-tree-item.selected { background: var(--primary-dim); color: var(--primary-hover); }

/* Share links */
.share-links-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.share-link-row { display: flex; gap: 8px; align-items: center; }
.share-link-label { font-size: 11.5px; font-weight: 600; color: var(--text-3); width: 72px; flex-shrink: 0; }
.share-link-input {
    flex: 1; padding: 7px 10px; font-size: 12px;
    background: rgba(0,0,0,.25); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-2);
}
.share-copy-btn {
    padding: 7px 10px; border-radius: var(--radius-sm);
    background: var(--bg-hover); border: 1px solid var(--border);
    color: var(--text-2); cursor: pointer; font-size: 12px;
    transition: all var(--dur) var(--ease); flex-shrink: 0;
}
.share-copy-btn:hover { background: var(--primary-dim); color: var(--primary-hover); }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .dash-grid { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0;
        transform: translateX(-100%);
        transition: transform .3s var(--ease);
    }
    .sidebar.open { transform: none; }
    .topbar-menu-toggle { display: flex; }

    .file-grid { grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 10px; }
    .file-list-head { display: none; }
    .file-list-row { grid-template-columns: 1fr 60px; }
    .list-cell-meta { display: none; }

    .drive-workspace { padding: 14px 16px; }
    .drive-toolbar { padding: 10px 16px; }
    .dash-body { padding: 14px 16px; }
}

/* ─── OAuth2 Connect Screen ────────────────────────────────────────────────── */
.oauth-connect-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--topbar-h) - 40px);
    padding: 20px;
}
.oauth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.oauth-glow {
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(99,102,241,0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}
.oauth-icon {
    width: 80px; height: 80px;
    background: var(--primary-dim);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-hover);
    font-size: 38px;
    margin: 0 auto 24px;
    box-shadow: 0 0 20px rgba(99,102,241,0.15);
    position: relative;
    z-index: 1;
}
.oauth-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-1);
    position: relative;
    z-index: 1;
}
.oauth-card p {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}
.oauth-features {
    text-align: left;
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}
.feature-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.feature-item i {
    font-size: 18px;
    color: var(--accent);
    margin-top: 3px;
}
.feature-item strong {
    display: block;
    font-size: 13.5px;
    color: var(--text-1);
    margin-bottom: 2px;
}
.feature-item span {
    font-size: 12.5px;
    color: var(--text-2);
    line-height: 1.4;
}
.btn-google-connect {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 24px;
    background: #fff;
    color: #1f2937;
    border-radius: var(--radius-md);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
    border: 1px solid #e5e7eb;
}
.btn-google-connect:hover {
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.oauth-connected-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.16);
    border-radius: 99px;
    color: #34d399;
    font-size: 12px;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES & CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin: 24px;
    overflow: hidden;
}
.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,0.15);
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-1);
}
.card-body {
    padding: 24px;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.table th, .table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.table th {
    background: rgba(0,0,0,0.2);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.table tbody tr {
    transition: background var(--dur) var(--ease);
}
.table tbody tr:hover {
    background: var(--bg-hover);
}
.table tbody tr:last-child td {
    border-bottom: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM SWITCH TOGGLE & ACCOUNTS STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    transition: .3s var(--ease);
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-2);
    transition: .3s var(--ease);
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--primary);
    border-color: var(--primary-hover);
    box-shadow: 0 0 10px rgba(99,102,241,0.4);
}
input:checked + .slider:before {
    transform: translateX(20px);
    background-color: #fff;
}
.pulsate-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 8px var(--success);
    animation: pulse 1.8s infinite ease-in-out;
}
@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px var(--success); }
    100% { transform: scale(0.9); opacity: 0.7; }
}


