/* ==========================================================================
   KCLOUD — ALL-IN-ONE MULTI-CLOUD HUB DESIGN SYSTEM (LIGHT THEME)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ─── Design Tokens ─────────────────────────────────────────────────────── */
:root {
    --bg-base:        #f1f5f9; /* Slate 100 canvas */
    --bg-surface:     #ffffff; /* Pure white panels */
    --bg-elevated:    #ffffff;
    --bg-card:        #ffffff;
    --bg-hover:       #f8fafc; /* Subtle slate 50 hover */
    --bg-active:      #eff6ff; /* Soft blue tint */

    --primary:        #2563eb; /* Brand Blue */
    --primary-dim:    #eff6ff; /* Soft Blue tint */
    --primary-glow:   rgba(37, 99, 235, 0.20);
    --primary-hover:  #1d4ed8;
    --accent:         #3b82f6;
    --accent-dim:     #dbeafe;

    --success:        #10b981;
    --success-dim:    #ecfdf5;
    --warning:        #f59e0b;
    --warning-dim:    #fffbeb;
    --danger:         #ef4444;
    --danger-dim:     #fef2f2;

    --text-1:         #0f172a; /* Slate 900 - High Contrast Title */
    --text-2:         #334155; /* Slate 700 - Body text */
    --text-3:         #64748b; /* Slate 500 - Secondary text */
    --text-muted:     #94a3b8; /* Slate 400 */

    --border:         #cbd5e1; /* Slate 300 - Crisp, clear borders */
    --border-light:   #e2e8f0; /* Slate 200 */
    --border-focus:   #2563eb;

    --shadow-sm:      0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md:      0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg:      0 12px 28px -4px rgba(15, 23, 42, 0.08);
    --shadow-glow:    0 0 20px rgba(37, 99, 235, 0.12);

    --sidebar-w:      260px;
    --topbar-h:       64px;
    --radius-sm:      6px;
    --radius-md:      10px;
    --radius-lg:      14px;
    --radius-xl:      20px;
    --ease:           cubic-bezier(0.16, 1, 0.3, 1);
    --dur:            0.18s;
}

/* ─── Global Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-base);
    color: var(--text-1);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--primary-hover); }

button, input, select, textarea {
    font-family: inherit;
    background: transparent;
    border: none;
    outline: none;
    color: inherit;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ─── App Shell ──────────────────────────────────────────────────────────── */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-base);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-w);
    background: #ffffff;
    border-right: 1px solid var(--border-light);
    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;
    padding: 0 18px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    background: #ffffff;
}
.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}
.sidebar-brand-img {
    height: 38px;
    width: auto;
    max-width: 175px;
    object-fit: contain;
    display: block;
}
.sidebar-logo-k {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: #2563eb;
    color: white;
    font-weight: 800;
    font-size: 17px;
    border-radius: 9px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.sidebar-brand-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.sidebar-brand-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.sidebar-brand-name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.sidebar-brand-badge {
    font-size: 10px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 1px 6px;
    border-radius: 4px;
}
.sidebar-brand-sub {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

/* Upload Button */
.sidebar-upload-wrap { padding: 14px 14px 8px; }
.btn-upload-new {
    width: 100%;
    display: flex; align-items: center; justify-content: 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 2px 8px rgba(37,99,235,0.25);
}
.btn-upload-new:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}
.btn-upload-new i { font-size: 14px; }

/* Nav */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 10px; }

.nav-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    padding: 14px 10px 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: #334155;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    margin-bottom: 2px;
    position: relative;
    text-decoration: none;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; color: #64748b; transition: color var(--dur) ease; }
.nav-item:hover { background: #f1f5f9; color: #0f172a; }
.nav-item:hover i { color: #2563eb; }
.nav-item.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}
.nav-item.active i { color: #2563eb; }
.nav-item.active::before {
    content: '';
    position: absolute; left: 0; top: 18%; bottom: 18%;
    width: 3px; border-radius: 0 3px 3px 0;
    background: #2563eb;
}

/* Storage bar */
.sidebar-storage {
    padding: 12px 14px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
    background: #ffffff;
}
.storage-header {
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--text-2);
    margin-bottom: 8px; font-weight: 600;
}
.storage-track {
    height: 6px; background: #e2e8f0;
    border-radius: 99px; overflow: hidden; margin-bottom: 4px;
}
.storage-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 99px;
    transition: width .6s var(--ease);
}

/* Connection status widget */
.sidebar-conn-card {
    margin: 8px 10px 12px;
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid var(--border-light);
    background: #f8fafc;
}
.sidebar-conn-card.connected {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.sidebar-conn-card.unlinked {
    background: #f8fafc;
    border-color: var(--border-light);
}
.conn-card-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.conn-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.conn-status-dot.online {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}
.conn-status-dot.pending {
    background: #f59e0b;
}
.conn-card-email {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.conn-card-action {
    font-size: 11px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.conn-card-action:hover { text-decoration: underline; }

/* Sidebar Nav multi-account enhancements */
.nav-label-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}
.nav-label-sub {
    font-size: 10px;
    color: #64748b;
    font-weight: 500;
}
.nav-item.active .nav-label-sub {
    color: #3b82f6;
    font-weight: 600;
}
.nav-count-badge {
    background: #eff6ff;
    color: #2563eb;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
}
.nav-item.active .nav-count-badge {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Sidebar multi-drive connection lines */
.conn-card-emails-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 3px 0;
}
.conn-card-email-line {
    font-size: 11.5px;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.conn-card-email-line i {
    color: #2563eb;
    font-size: 11px;
    flex-shrink: 0;
}
.conn-card-cta {
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.conn-card-cta:hover { text-decoration: underline; }

/* User Footer */
.sidebar-user {
    padding: 12px 14px;
    border-top: 1px solid var(--border-light);
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0;
    background: #ffffff;
}
.user-avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(37,99,235,0.2);
}
.user-meta { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role-row { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.user-role { font-size: 11px; color: #64748b; }
.user-plan-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 9999px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.pill-free { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.pill-pro  { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.pill-max  { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }

.sidebar-quota-box {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(100, 116, 139, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
}
.quota-label { color: #64748b; font-weight: 500; }
.quota-badge { font-weight: 700; color: #0f172a; }
.quota-badge.is-full { color: #dc2626; }
.btn-upgrade-mini {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-upgrade-mini:hover { background: #2563eb; color: #ffffff; }

/* ═══ UPGRADE / UPSELL MODAL OVERLAY ═══ */
.kdrive-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.upgrade-modal-card {
    background: #ffffff;
    border-radius: 24px;
    max-width: 780px;
    width: 100%;
    padding: 34px 32px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3);
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
    animation: kdriveModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes kdriveModalPop {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 26px;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
    z-index: 10;
}
.modal-close-btn:hover { color: #0f172a; }
.upgrade-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 10px;
    border: 1px solid #bfdbfe;
}
.upgrade-modal-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}
.upgrade-modal-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 20px;
}

/* Dual Plans Grid */
.upgrade-plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}
.upgrade-plan-item {
    border-radius: 18px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.25s ease;
}
.upgrade-plan-item.plan-pro {
    background: #ffffff;
    border: 2px solid #2563eb;
    box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.15);
}
.upgrade-plan-item.plan-max {
    background: linear-gradient(180deg, #ffffff 0%, #fffbf2 100%);
    border: 2px solid #f59e0b;
    box-shadow: 0 8px 24px -4px rgba(245, 158, 11, 0.18);
}
.plan-item-badge {
    position: absolute;
    top: -11px;
    left: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 9999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
}
.plan-pro .plan-item-badge {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.plan-max .plan-item-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}
.plan-item-head {
    margin-bottom: 12px;
}
.plan-item-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
}
.plan-drives-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    background: #eff6ff;
    color: #1e40af;
}
.plan-drives-tag.tag-amber {
    background: #fef3c7;
    color: #b45309;
}
.plan-item-price {
    margin: 12px 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}
.plan-item-price .amount {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}
.plan-item-price .period {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}
.plan-item-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}
.plan-item-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    color: #334155;
    line-height: 1.4;
}
.plan-item-features li i {
    color: #16a34a;
    font-size: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}
.plan-max .plan-item-features li i.icon-amber {
    color: #d97706;
}
.btn-plan-select {
    display: block;
    width: 100%;
    text-align: center;
    padding: 11px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none !important;
    transition: all 0.2s;
}
.btn-plan-select.btn-pro {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.btn-plan-select.btn-pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}
.btn-plan-select.btn-max {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}
.btn-plan-select.btn-max:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}
@media (max-width: 680px) {
    .upgrade-plans-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .upgrade-modal-card {
        padding: 24px 18px;
    }
}
.btn-logout {
    color: #94a3b8; font-size: 15px; cursor: pointer;
    padding: 6px; border-radius: 6px;
    transition: all var(--dur) var(--ease);
    flex-shrink: 0;
    text-decoration: none;
}
.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;
    background: var(--bg-base);
}

/* Topbar */
.topbar {
    height: var(--topbar-h);
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
    padding: 0 24px;
    flex-shrink: 0;
    z-index: 10;
}
.topbar-left {
    display: flex; align-items: center; gap: 12px;
    flex: 1; max-width: 520px;
}
.topbar-menu-toggle {
    display: none; font-size: 16px; cursor: pointer; color: #475569;
    padding: 8px; border-radius: 6px;
    background: #f1f5f9; border: 1px solid var(--border-light);
    transition: all var(--dur) var(--ease);
}
.topbar-menu-toggle:hover { background: #e2e8f0; color: var(--text-1); }

.search-wrap {
    flex: 1;
    display: flex; align-items: center; gap: 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 14px; height: 40px;
    transition: all var(--dur) var(--ease);
}
.search-wrap:focus-within {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.search-wrap i { color: #94a3b8; 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: #94a3b8; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-link-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; background: #eff6ff; border: 1px solid #bfdbfe;
    color: #2563eb; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
    text-decoration: none; transition: all var(--dur) var(--ease);
}
.topbar-link-btn:hover { background: #dbeafe; color: #1d4ed8; }
.topbar-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: #475569; cursor: pointer; font-size: 13px;
    text-decoration: none;
    transition: all var(--dur) var(--ease);
}
.topbar-btn:hover { background: #f8fafc; color: var(--text-1); border-color: #94a3b8; }

/* ─── Content Page Area ──────────────────────────────────────────────────── */
.page-body {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    background: var(--bg-base);
}

/* ═══════════════════════════════════════════════════════════════════════════
   UNIFIED STORAGE HUB BANNER — HIỂN THỊ KHO TỔNG HỢP & BỘ LỌC Ổ ĐĨA
   ═══════════════════════════════════════════════════════════════════════════ */
.unified-hub-banner {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.03);
}
.hub-banner-main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.hub-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
    border: 1px solid #bfdbfe;
}
.hub-info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hub-heading-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.hub-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.3px;
}
.hub-pill-active {
    background: #ecfdf5;
    color: #059669;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3.5px 10px;
    border-radius: 20px;
    border: 1px solid #a7f3d0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hub-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    animation: hubPulse 2s infinite;
}
@keyframes hubPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.hub-subtitle {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}
.hub-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 4px;
}
.hub-filter-label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hub-chips-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.hub-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.hub-chip:hover {
    border-color: #93c5fd;
    color: #1d4ed8;
    background: #f8fafc;
    transform: translateY(-1px);
}
.hub-chip.active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.hub-chip i.fa-brands.fa-google-drive {
    color: #2563eb;
    font-size: 13.5px;
}
.hub-chip.active i.fa-brands.fa-google-drive {
    color: #1d4ed8;
}
.hub-chip-count, .chip-badge {
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
}
.hub-chip.active .chip-badge {
    background: #2563eb;
    color: #ffffff;
}
.chip-storage {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
}
.hub-chip.active .chip-storage {
    color: #3b82f6;
    font-weight: 600;
}

/* File card account badges */
.file-card-conn {
    margin-top: 4px;
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 5px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-card-conn i {
    color: #2563eb;
    font-size: 11px;
}
.gallery-top-left-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.gallery-badge-conn {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: #e2e8f0;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2.5px 6px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.gallery-badge-conn i {
    color: #38bdf8;
    font-size: 10px;
}
.video-tag-right-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.video-tag-conn {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: #e2e8f0;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2.5px 6px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.video-tag-conn i {
    color: #38bdf8;
    font-size: 10px;
}
.list-badge-conn {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 5px;
}
.list-badge-conn i {
    color: #2563eb;
    font-size: 11px;
}

/* Toolbar strip */
.drive-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    padding: 12px 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    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: 4px 8px; border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 6px;
    transition: all var(--dur) var(--ease);
}
.bc-item:hover { color: var(--text-1); background: #f1f5f9; }
.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: 11px; }

/* Group & Dropdown Bộ lọc tài khoản Drive trên Toolbar */
.toolbar-left-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Toolbar Account Filter Container */
.toolbar-account-filter {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.acc-filter-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 0 14px 0 12px;
    height: 34px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    user-select: none;
}

.acc-filter-trigger-btn:hover {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.acc-filter-trigger-btn.active {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.acc-filter-brand-icon {
    font-size: 14px;
    color: #2563eb;
}

.acc-filter-label {
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acc-filter-arrow {
    font-size: 10px;
    color: #64748b;
    transition: transform 0.2s ease;
}

.acc-filter-trigger-btn.active .acc-filter-arrow {
    transform: rotate(180deg);
}

/* Custom Floating Dropdown Menu */
.acc-filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 320px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08);
    z-index: 1050;
    overflow: hidden;
    animation: accFilterFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes accFilterFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.acc-filter-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.acc-filter-menu-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 7px;
}

.acc-filter-toggle-all-btn {
    background: transparent;
    border: none;
    outline: none;
    font-size: 11.5px;
    font-weight: 600;
    color: #2563eb;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.acc-filter-toggle-all-btn:hover {
    background: #eff6ff;
    text-decoration: underline;
}

.acc-filter-items-list {
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
}

.acc-filter-items-list::-webkit-scrollbar {
    width: 5px;
}
.acc-filter-items-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.acc-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
    margin-bottom: 2px;
}

.acc-filter-item:hover {
    background: #f1f5f9;
}

.acc-filter-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.acc-custom-check {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    transition: all 0.15s ease;
    flex-shrink: 0;
    background: #ffffff;
}

.acc-filter-checkbox:checked + .acc-custom-check {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.acc-item-avatar {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.acc-item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.acc-item-email {
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acc-item-tag {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.acc-filter-menu-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.acc-filter-count-hint {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
}

.btn-acc-filter-apply {
    background: #2563eb;
    color: #ffffff;
    border: none;
    outline: none;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-acc-filter-apply:hover {
    background: #1d4ed8;
}

.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: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 12.5px; font-weight: 500;
    color: #475569; cursor: pointer;
    transition: all var(--dur) var(--ease);
}
.tb-btn:hover { background: #f8fafc; color: var(--text-1); border-color: #94a3b8; }
.tb-btn.active { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; font-weight: 600; }
.tb-btn i { font-size: 13px; }

.view-toggle { display: flex; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: #ffffff; }
.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: #f1f5f9; color: var(--text-1); }
.view-btn.active { background: #eff6ff; color: #2563eb; }

.sort-sel {
    background: #ffffff; 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: #94a3b8; 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: #ffffff;
    border: 1px solid var(--border-light);
    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;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.file-card:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -2px rgba(15, 23, 42, 0.08);
    background: #ffffff;
}
.file-card.selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

.file-card-thumb {
    width: 100%; height: 80px;
    object-fit: cover; border-radius: var(--radius-sm);
    margin-bottom: 12px;
    border: 1px solid #f1f5f9;
}

.file-card-icon {
    font-size: 42px; margin-bottom: 12px;
    height: 52px; display: flex; align-items: center; justify-content: center;
    line-height: 1;
}

.file-card-name {
    font-size: 13px; font-weight: 600;
    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: 11px; 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: #f1f5f9; color: #64748b;
    font-size: 12px; cursor: pointer; opacity: 0;
    transition: all var(--dur) var(--ease);
}
.file-card:hover .file-card-opts { opacity: 1; }
.file-card-opts:hover { background: #e2e8f0; color: #0f172a; }

/* List View */
.file-list-view {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.file-list-head {
    display: grid;
    grid-template-columns: minmax(200px,3fr) 120px 100px 80px;
    padding: 11px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light);
    font-size: 11.5px; font-weight: 700; color: #64748b;
    text-transform: uppercase; letter-spacing: .8px;
}
.file-list-row {
    display: grid;
    grid-template-columns: minmax(200px,3fr) 120px 100px 80px;
    padding: 11px 18px;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px; cursor: pointer;
    transition: background var(--dur) var(--ease);
    color: #1e293b;
}
.file-list-row:last-child { border-bottom: none; }
.file-list-row:hover { background: #f8fafc; }
.file-list-row.selected { background: #eff6ff; color: #2563eb; }

.list-cell-name {
    display: flex; align-items: center; gap: 10px;
    font-weight: 600; 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: #f1f5f9; 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: #2563eb; }
.ic-excel    { color: #16a34a; }
.ic-archive  { color: #9333ea; }
.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: #cbd5e1; margin-bottom: 4px; }
.empty-state h3 { font-size: 17px; font-weight: 700; 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: 36px; height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════════════════
   GALLERY VIEW — TRÌNH DUYỆT HÌNH ẢNH DẠNG LƯỚI THUMBNAIL VUÔNG & HOVER THÔNG MINH
   ═══════════════════════════════════════════════════════════════════════════ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 6px 0;
}
.gallery-card {
    position: relative;
    border-radius: 8px; /* Bo góc nhẹ 8px chuẩn yêu cầu */
    overflow: hidden;
    background: #f1f5f9;
    aspect-ratio: 1 / 1; /* Ô vuông (thumbnails) */
    cursor: pointer;
    box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.08);
    border: 1px solid #e2e8f0;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.2s ease;
    user-select: none;
}
.gallery-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.16);
    border-color: #93c5fd;
}
.gallery-card.selected {
    border: 2px solid #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.gallery-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
}
.gallery-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    transition: transform 0.35s ease;
}
.gallery-card:hover .gallery-thumb-img {
    transform: scale(1.06); /* Hiệu ứng zoom nhẹ khi hover */
}
.gallery-no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #64748b;
    font-size: 38px;
}

/* Thông tin thông minh: Chỉ hiện khi Hover bức ảnh */
.gallery-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0) 35%, rgba(15, 23, 42, 0.88) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    border-radius: 8px;
}
.gallery-card:hover .gallery-hover-overlay {
    opacity: 1;
    pointer-events: auto;
}
.gallery-hover-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gallery-badge-public {
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 5px;
}
.gallery-opt-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}
.gallery-opt-btn:hover {
    background: rgba(255, 255, 255, 0.45);
    transform: scale(1.08);
}
.gallery-hover-bottom {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gallery-hover-name {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    line-height: 1.3;
}
.gallery-hover-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.gallery-hover-size {
    color: #e2e8f0;
    font-size: 11.5px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.gallery-hover-size i {
    font-size: 10.5px;
    color: #93c5fd;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VIDEO CINEMA GRID — HIỂN THỊ DẠNG RẠP CHIẾU 16:9 & POSTER NÉT CAO
   ═══════════════════════════════════════════════════════════════════════════ */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
    padding: 6px 0;
}
.video-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px -4px rgba(15, 23, 42, 0.14);
    border-color: #93c5fd;
}
.video-card.selected {
    border: 2px solid #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.video-card-preview-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-card-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.video-card:hover .video-card-poster {
    transform: scale(1.06);
}
.video-card-no-poster {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #64748b;
    font-size: 40px;
}
.video-card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.45) 0%, transparent 40%, rgba(15, 23, 42, 0.75) 100%);
    pointer-events: none;
}
.video-card-top-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}
.video-tag-format {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    color: #f8fafc;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.video-tag-format i {
    color: #ef4444;
    font-size: 9px;
}
.video-tag-public {
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 5px;
}
.video-card-play-btn {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding-left: 3px;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.5), 0 0 0 4px rgba(255, 255, 255, 0.2);
    z-index: 3;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
    cursor: pointer;
}
.video-card:hover .video-card-play-btn {
    transform: scale(1.15);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.7), 0 0 0 6px rgba(255, 255, 255, 0.3);
}
.video-card-bottom-tags {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 2;
}
.video-tag-size {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    padding: 2.5px 7px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.video-tag-size i {
    color: #38bdf8;
    font-size: 9.5px;
}
.video-card-body {
    padding: 12px 14px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.video-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.video-card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.video-card-opt-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.video-card-opt-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.video-card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: #64748b;
}
.video-meta-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.video-card-quick-watch {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #2563eb;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}
.video-card-quick-watch:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Video thumbnail preview in default file card */
.file-card-video-thumb-wrap {
    position: relative;
    width: 100%;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
}
.file-card-video-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.file-card-video-play-badge {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.92);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    padding-left: 2px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    transition: transform 0.2s ease;
}
.file-card:hover .file-card-video-play-badge {
    transform: scale(1.15);
}

/* PDF & Audio thumbnail and badges in default file card */
.file-card-pdf-thumb-wrap {
    position: relative;
    width: 100%;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.file-card-pdf-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.file-card-pdf-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    border-radius: 5px;
    background: #ef4444;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.file-card-icon-pdf, .file-card-icon-audio {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.file-card-ext-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
.file-card-ext-badge.pdf {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.file-card-ext-badge.audio {
    background: #faf5ff;
    color: #9333ea;
    border: 1px solid #e9d5ff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VIDEO CINEMA GRID — HIỂN THỊ DẠNG RẠP CHIẾU 16:9 & POSTER NÉT CAO
   ═══════════════════════════════════════════════════════════════════════════ */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
    padding: 6px 0;
}
.video-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px -4px rgba(15, 23, 42, 0.14);
    border-color: #93c5fd;
}
.video-card.selected {
    border: 2px solid #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.video-card-preview-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-card-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.video-card:hover .video-card-poster {
    transform: scale(1.06);
}
.video-card-no-poster {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #64748b;
    font-size: 40px;
}
.video-card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.45) 0%, transparent 40%, rgba(15, 23, 42, 0.75) 100%);
    pointer-events: none;
}
.video-card-top-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}
.video-tag-format {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    color: #f8fafc;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.video-tag-format i {
    color: #ef4444;
    font-size: 9px;
}
.video-tag-public {
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 5px;
}
.video-card-play-btn {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding-left: 3px;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.5), 0 0 0 4px rgba(255, 255, 255, 0.2);
    z-index: 3;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
    cursor: pointer;
}
.video-card:hover .video-card-play-btn {
    transform: scale(1.15);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.7), 0 0 0 6px rgba(255, 255, 255, 0.3);
}
.video-card-bottom-tags {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 2;
}
.video-tag-size {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    padding: 2.5px 7px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.video-tag-size i {
    color: #38bdf8;
    font-size: 9.5px;
}
.video-card-body {
    padding: 12px 14px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.video-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.video-card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.video-card-opt-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.video-card-opt-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.video-card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: #64748b;
}
.video-meta-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.video-card-quick-watch {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #2563eb;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}
.video-card-quick-watch:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Video thumbnail preview in default file card */
.file-card-video-thumb-wrap {
    position: relative;
    width: 100%;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
}
.file-card-video-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.file-card-video-play-badge {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.92);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    padding-left: 2px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    transition: transform 0.2s ease;
}
.file-card:hover .file-card-video-play-badge {
    transform: scale(1.15);
}

/* PDF & Audio thumbnail and badges in default file card */
.file-card-pdf-thumb-wrap {
    position: relative;
    width: 100%;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.file-card-pdf-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.file-card-pdf-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    border-radius: 5px;
    background: #ef4444;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.file-card-icon-pdf, .file-card-icon-audio {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.file-card-ext-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
.file-card-ext-badge.pdf {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.file-card-ext-badge.audio {
    background: #faf5ff;
    color: #9333ea;
    border: 1px solid #e9d5ff;
}

/* Context Menu — Apple / Linear SaaS Style */
.ctx-menu, .context-menu {
    position: fixed;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08);
    padding: 6px;
    min-width: 230px;
    z-index: 999999;
    display: none;
    animation: ctxFadeIn 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes ctxFadeIn {
    from { opacity: 0; transform: scale(0.96) translateY(-4px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.ctx-item, .cm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.ctx-item i, .cm-item i {
    width: 20px;
    font-size: 15px;
    text-align: center;
    color: #64748b;
    flex-shrink: 0;
    transition: color 0.15s ease;
}
.ctx-item:hover, .cm-item:hover {
    background: #eff6ff;
    color: #1d4ed8;
}
.ctx-item:hover i, .cm-item:hover i {
    color: #2563eb;
}
.ctx-item .ic-folder, .cm-item .ic-folder {
    color: #f59e0b !important;
}
.ctx-item .fa-google-drive, .cm-item .fa-google-drive {
    color: #2563eb !important;
}
.ctx-item .fa-globe, .cm-item .fa-globe {
    color: #0284c7 !important;
}
.ctx-item .fa-right-left, .cm-item .fa-right-left {
    color: #059669 !important;
}
.ctx-item .fa-pen-to-square, .cm-item .fa-pen-to-square {
    color: #8b5cf6 !important;
}
.ctx-item.danger, .cm-item.danger {
    color: #dc2626;
}
.ctx-item.danger i, .cm-item.danger i {
    color: #ef4444;
}
.ctx-item.danger:hover, .cm-item.danger:hover {
    background: #fef2f2;
    color: #b91c1c;
}
.ctx-sep, .cm-sep {
    height: 1px;
    background: #e2e8f0;
    margin: 5px 4px;
}

/* Modals */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: none !important; align-items: center; justify-content: center;
    z-index: 1000; padding: 20px;
}
.modal-overlay.active {
    display: flex !important;
}
.modal-overlay.active .modal-box {
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 18px;
}
.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    color: #64748b;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.15s ease;
}
.modal-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.modal-body {
    margin-bottom: 20px;
}
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}
.btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: #64748b;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
}
.btn-ghost:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.modal-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    width: 100%; max-width: 480px;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.15);
}
.modal-box h3 { font-size: 17px; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.modal-box p { font-size: 13.5px; color: #64748b; margin-bottom: 18px; line-height: 1.5; }
.modal-input {
    width: 100%; padding: 10px 14px; font-size: 13.5px;
    background: #ffffff; border: 1px solid var(--border);
    border-radius: var(--radius-md); color: #0f172a; margin-bottom: 18px;
    transition: all 0.15s ease;
}
.modal-input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn-secondary {
    padding: 8px 16px; border-radius: var(--radius-md);
    background: #f1f5f9; border: 1px solid var(--border);
    color: #475569; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all var(--dur) var(--ease);
}
.btn-secondary:hover { background: #e2e8f0; color: #0f172a; }
.btn-primary {
    padding: 8px 18px; border-radius: var(--radius-md);
    background: var(--primary); color: #fff;
    font-size: 13px; font-weight: 600; cursor: pointer;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
    transition: all var(--dur) var(--ease);
}
.btn-primary:hover { background: var(--primary-hover); }

/* ─── OAuth2 Connect Screen (Stunning Clean Onboarding) ─────────────────── */
.oauth-connect-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--topbar-h) - 40px);
    padding: 36px 20px;
    background: #f1f5f9;
}
.oauth-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 36px;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
}
.oauth-card-hero {
    text-align: center;
    margin-bottom: 26px;
}
.oauth-brand-badge {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
}
.oauth-drive-icon {
    width: 72px;
    height: 72px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.oauth-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.oauth-desc {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    max-width: 460px;
    margin: 0 auto;
}

.oauth-value-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}
.oauth-value-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.15s ease;
}
.oauth-value-card:hover {
    border-color: var(--border);
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.val-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.val-icon.blue { background: #eff6ff; color: #2563eb; }
.val-icon.green { background: #ecfdf5; color: #059669; }
.val-icon.purple { background: #f5f3ff; color: #7c3aed; }
.val-content h4 {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 2px;
}
.val-content p {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.oauth-action-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.btn-connect-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    font-size: 14.5px;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
}
.btn-connect-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.32);
    transform: translateY(-1px);
    color: #ffffff;
}
.oauth-guarantee {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}
.oauth-guarantee i {
    color: #10b981;
    font-size: 11px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES & CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin: 24px;
    overflow: hidden;
}
.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    background: #f8fafc;
}
.card-title {
    font-size: 15.5px;
    font-weight: 700;
    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-light);
}
.table th {
    background: #f8fafc;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.table tbody tr {
    transition: background var(--dur) var(--ease);
}
.table tbody tr:hover {
    background: #f8fafc;
}
.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: #cbd5e1;
    border: 1px solid #cbd5e1;
    transition: .25s var(--ease);
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    transition: .25s var(--ease);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
input:checked + .slider {
    background-color: var(--primary);
    border-color: var(--primary);
}
input:checked + .slider:before {
    transform: translateX(20px);
}
.pulsate-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ALERTS / NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.alert {
    padding: 12px 18px;
    border-radius: 10px;
    margin: 16px 24px 0;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.5;
}
.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
.dash-body {
    padding: 24px;
    background: #f1f5f9;
    min-height: calc(100vh - var(--topbar-h));
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }
}
.stat-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}
.stat-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 20px;
    flex-shrink: 0;
}
.stat-card:nth-child(1) .stat-icon { background: #eff6ff; color: #2563eb; }
.stat-card:nth-child(2) .stat-icon { background: #ecfdf5; color: #059669; }
.stat-card:nth-child(3) .stat-icon { background: #fef3c7; color: #d97706; }
.stat-card:nth-child(4) .stat-icon { background: #f5f3ff; color: #7c3aed; }

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.dash-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
}
.dash-panel {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}
.panel-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.chart-wrap {
    height: 280px;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MULTI-DRIVE DASHBOARD V3 — EXPANDED COMMAND CENTER
   ═══════════════════════════════════════════════════════════════════════════ */
.dash-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}
.dash-page-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.4px;
    margin: 0 0 4px 0;
}
.dash-page-sub {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
}
.dash-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dash-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 28px 0 16px 0;
}
.dash-badge-count {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #e2e8f0;
    padding: 3px 10px;
    border-radius: 999px;
}

/* Account Cards Grid */
.account-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
    gap: 20px;
}
@media (max-width: 768px) {
    .account-cards-grid { grid-template-columns: 1fr; }
}
.account-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 4px 18px -3px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: all 0.2s ease;
}
.account-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 10px 28px -4px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}
.account-card.danger-border {
    border-color: #fca5a5 !important;
}
.account-card.danger-border:hover {
    border-color: #ef4444 !important;
    box-shadow: 0 10px 28px -4px rgba(239, 68, 68, 0.12);
}

/* Header inside Account Card */
.acc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
}
.acc-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}
.acc-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 22px;
    flex-shrink: 0;
}
.acc-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.acc-email {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    word-break: break-all;
}
.acc-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.acc-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.acc-badge.success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}
.acc-badge.success i { font-size: 7px; color: #10b981; }
.acc-badge.danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    animation: badgePulse 1.5s infinite;
}
.acc-badge.danger i { font-size: 7px; color: #ef4444; }
.acc-sub-text {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}
.acc-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.acc-btn-sub {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}
.acc-btn-sub:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.acc-btn-action {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}
.acc-btn-action:hover {
    background: #2563eb;
    color: #ffffff;
}
.acc-btn-action.alert-btn {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}
.acc-btn-action.alert-btn:hover {
    background: #dc2626;
    color: #ffffff;
}

/* Storage Bar inside Account Card */
.acc-storage-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.acc-storage-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
}
.acc-storage-label {
    color: #64748b;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.acc-storage-val {
    color: #0f172a;
    font-weight: 700;
}
.acc-progress-track {
    width: 100%;
    height: 7px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.acc-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: #10b981;
    transition: width 0.4s ease;
}
.acc-progress-bar.danger {
    background: #ef4444 !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}
.acc-alert-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    padding: 6px 10px;
    margin-top: 2px;
}
.acc-alert-box i {
    font-size: 13px;
    color: #ef4444;
}

/* Doughnut Chart inside Account Card (Matching User Image) */
.acc-chart-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.acc-chart-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.acc-chart-title {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.acc-chart-canvas-wrap {
    height: 190px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.acc-legend-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}
.acc-legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 11.5px;
    color: #334155;
    transition: background 0.15s ease;
}
.acc-legend-pill:hover {
    background: #f1f5f9;
}
.legend-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.legend-label {
    font-weight: 500;
    color: #64748b;
}
.legend-count {
    font-weight: 700;
    color: #0f172a;
}

/* Quick Hub Grid */
.quick-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.quick-hub-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.04);
    text-decoration: none;
    transition: all 0.2s ease;
}
.quick-hub-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 22px -3px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}
.quick-hub-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.quick-hub-icon.blue { background: #eff6ff; color: #2563eb; }
.quick-hub-icon.green { background: #ecfdf5; color: #059669; }
.quick-hub-icon.purple { background: #f5f3ff; color: #7c3aed; }
.quick-hub-icon.red { background: #fef2f2; color: #dc2626; }
.quick-hub-content {
    flex: 1;
    overflow: hidden;
}
.quick-hub-content h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}
.quick-hub-content p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.quick-hub-arrow {
    font-size: 13px;
    color: #94a3b8;
    transition: transform 0.15s ease, color 0.15s ease;
}
.quick-hub-card:hover .quick-hub-arrow {
    transform: translateX(3px);
    color: #2563eb;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN (DESKTOP, TABLET & MOBILE OPTIMIZATIONS)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tablet & Mobile Drawer Navigation (<= 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed !important;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        transform: translateX(-100%);
        transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 9999;
        box-shadow: none;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(15, 23, 42, 0.35);
    }
    .sidebar-close-btn {
        display: inline-flex !important;
        width: 32px;
        height: 32px;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: #f8fafc;
        color: #64748b;
        cursor: pointer;
        margin-left: auto;
        font-size: 14px;
        transition: all 0.2s ease;
    }
    .sidebar-close-btn:hover {
        background: #fee2e2;
        color: #ef4444;
        border-color: #fca5a5;
    }
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.55);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 9998;
        opacity: 0;
        transition: opacity .25s ease;
    }
    .sidebar.open + .sidebar-backdrop,
    .sidebar.open ~ .sidebar-backdrop {
        display: block !important;
        opacity: 1;
    }
    .topbar-menu-toggle {
        display: flex !important;
    }
    .main-content {
        width: 100% !important;
        min-width: 0 !important;
    }
    .dash-grid {
        grid-template-columns: 1fr;
    }
    .tm-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    .page-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Smartphone & Small Tablet Optimizations (<= 768px) */
@media (max-width: 768px) {
    .topbar {
        padding: 0 14px;
        height: 56px;
        gap: 10px;
    }
    .topbar-left {
        max-width: 100%;
        gap: 8px;
    }
    .search-wrap {
        height: 36px;
        padding: 0 10px;
    }
    .search-wrap input {
        font-size: 13px;
    }
    .search-wrap input::placeholder {
        font-size: 12.5px;
    }
    .topbar-link-btn span {
        display: none;
    }
    .topbar-link-btn {
        padding: 8px 10px;
    }
    .hide-mobile {
        display: none !important;
    }

    /* Dashboard Layout */
    .dash-body {
        padding: 16px 14px 28px;
    }
    .dash-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 18px;
    }
    .dash-header-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .dash-header-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
        margin-bottom: 18px;
    }
    .stat-card {
        padding: 14px 16px;
    }

    /* Migration Card & Setup Controls */
    .migration-card {
        margin-bottom: 20px;
        border-radius: 14px;
    }
    .mig-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px 16px 14px;
    }
    .mig-header-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .mig-header-right {
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }
    .mig-setup-wrap {
        padding: 14px 16px;
    }
    .mig-setup-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    .mig-arrow-center.mig-swap-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        height: 38px;
        border-radius: 10px;
        margin: 4px 0;
        background: #eff6ff;
        color: #2563eb;
        border: 1px dashed #bfdbfe;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
    }
    .mig-arrow-center.mig-swap-btn::after {
        content: 'Đảo chiều chuyển (Đổi vị trí 2 Drive)';
        font-size: 12.5px;
    }
    .mig-action-col {
        width: 100%;
        margin-top: 4px;
    }
    .btn-mig-action {
        width: 100% !important;
        height: 46px !important;
        justify-content: center;
        font-size: 14.5px;
    }
    .mig-progress-section {
        padding: 14px 16px;
    }
    .mig-progress-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .mig-stats-row {
        width: 100%;
        justify-content: space-between;
    }
    .mig-counts-badge {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }
    .mig-current-task {
        max-width: 100%;
        margin-left: 0;
        font-size: 12px;
    }
    .mig-console-wrap {
        border-radius: 10px;
    }
    .mig-console-header {
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .console-actions {
        width: 100%;
        justify-content: space-between;
    }
    .mig-console-body {
        max-height: 260px;
        font-size: 11.5px;
        padding: 10px 12px;
    }

    /* Unified Drive Banner & Explorer */
    .unified-hub-banner {
        padding: 14px 16px;
        gap: 10px;
    }
    .hub-banner-main {
        gap: 12px;
    }
    .hub-heading-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .hub-title {
        font-size: 16px;
    }
    .hub-chips-wrap {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        max-width: 100%;
    }
    .hub-chip {
        flex-shrink: 0;
    }
    .drive-workspace {
        padding: 12px 14px;
    }
    .drive-toolbar {
        padding: 8px 14px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .breadcrumb-trail {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        padding-bottom: 2px;
    }
    .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;
    }
}

/* Compact Smartphones (<= 480px) */
@media (max-width: 480px) {
    .oauth-card {
        padding: 24px 18px;
        border-radius: 16px;
        margin: 16px;
    }
    .oauth-title {
        font-size: 20px;
    }
    .btn-connect-primary {
        font-size: 14px;
        padding: 12px 16px;
        width: 100%;
        justify-content: center;
    }
    .kdrive-dialog-card {
        padding: 20px 16px;
        border-radius: 14px;
        max-width: calc(100% - 24px);
    }
    .kdrive-dialog-title {
        font-size: 1.05rem;
    }
    .kdrive-dialog-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }
    .kdrive-dialog-btn {
        width: 100%;
    }
    .upgrade-modal-card {
        padding: 20px 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILE PREVIEWER (LIGHTBOX MODAL)
   ═══════════════════════════════════════════════════════════════════════════ */
.previewer-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9999999 !important;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    color: #ffffff;
    user-select: none;
    animation: pvFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.previewer-overlay.open {
    display: flex !important;
}
@keyframes pvFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Top Bar */
.previewer-bar {
    height: 64px;
    padding: 0 24px;
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 100;
}
.previewer-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    max-width: 60%;
}
.previewer-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.previewer-close:hover {
    background: rgba(239, 68, 68, 0.85);
    transform: scale(1.08);
}
.previewer-file-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 2px;
}
.previewer-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.previewer-subtitle {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}
.previewer-bar-center {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 14px;
    border-radius: 999px;
    letter-spacing: 0.5px;
}
.previewer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.previewer-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}
.previewer-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: scale(1.06);
}

/* Nav Left / Right Buttons */
.previewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 50;
    transition: all 0.2s ease;
}
.previewer-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.1);
}
.previewer-nav:disabled {
    opacity: 0.15;
    cursor: not-allowed;
    pointer-events: none;
}
.previewer-nav.prev {
    left: 24px;
}
.previewer-nav.next {
    right: 24px;
}

/* Body */
.previewer-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 80px;
    position: relative;
    overflow: hidden;
}
.preview-img {
    max-width: 90vw;
    max-height: calc(100vh - 190px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease-out;
    cursor: zoom-in;
}
.preview-img.zoomed {
    cursor: grab;
}
.preview-video {
    max-width: 85vw;
    max-height: calc(100vh - 190px);
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    outline: none;
}
.preview-iframe {
    width: 85vw;
    height: calc(100vh - 190px);
    border: none;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CINEMA THEATER — TRẢI NGHIỆM XEM VIDEO ĐẲNG CẤP & KHÁC BIỆT
   ═══════════════════════════════════════════════════════════════════════════ */
.cinema-theater-wrap {
    position: relative;
    width: 100%;
    max-width: 1060px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    margin: auto;
}
.cinema-ambient-glow {
    position: absolute;
    top: -10%;
    left: -8%;
    right: -8%;
    bottom: -10%;
    background-size: cover;
    background-position: center;
    filter: blur(65px) opacity(0.35);
    border-radius: 36px;
    pointer-events: none;
    z-index: 1;
}
.cinema-frame {
    position: relative;
    z-index: 2;
    width: 100%;
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}
.cinema-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cinema-tag-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cinema-badge-live {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 3.5px 9px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}
.cinema-badge-res {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    padding: 3.5px 9px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.cinema-top-btn {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
}
.cinema-top-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}
.cinema-player-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - 280px);
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cinema-iframe {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: #000000;
}
.cinema-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 20px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.cinema-file-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 62%;
}
.cinema-file-name {
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 7px;
}
.cinema-file-name i {
    color: #ef4444;
}
.cinema-file-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    color: #94a3b8;
}
.cinema-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cinema-meta-dot {
    opacity: 0.35;
}
.cinema-meta-cdn {
    color: #38bdf8;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cinema-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-cinema-action {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
    border: none;
}
.btn-cinema-download {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.btn-cinema-download:hover {
    background: #1d4ed8;
    color: #ffffff;
    transform: translateY(-1px);
}
.btn-cinema-share {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-cinema-share:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PDF THEATER — XEM TÀI LIỆU TRỰC TIẾP KHÔNG BỊ TỰ ĐỘNG TẢI
   ═══════════════════════════════════════════════════════════════════════════ */
.pdf-theater-wrap {
    position: relative;
    width: 90vw;
    max-width: 1100px;
    height: calc(100vh - 170px);
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    margin: auto;
}
.pdf-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.pdf-tag-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pdf-badge-type {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}
.pdf-badge-size {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    padding: 3.5px 9px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.pdf-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pdf-action-btn {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
}
.pdf-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.pdf-action-btn.pdf-btn-dl {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}
.pdf-action-btn.pdf-btn-dl:hover {
    background: #1d4ed8;
}
.pdf-frame-box {
    flex: 1;
    width: 100%;
    height: 100%;
    background: #1e293b;
    overflow: hidden;
}
.pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: #ffffff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUDIO STUDIO PLAYER — PHÁT NHẠC ĐĨA THAN & EQUALIZER SỐNG ĐỘNG
   ═══════════════════════════════════════════════════════════════════════════ */
.audio-studio-wrap {
    position: relative;
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: auto;
    z-index: 10;
}
.audio-ambient-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, rgba(37, 99, 235, 0.2) 60%, transparent 100%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 1;
}
.audio-player-card {
    position: relative;
    z-index: 2;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    backdrop-filter: blur(16px);
}
.audio-player-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.audio-badge-format {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
}
.audio-badge-quality {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    padding: 3.5px 9px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.audio-vinyl-stage {
    position: relative;
    width: 190px;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
}
.audio-vinyl-disc {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, #1e293b 0%, #090d16 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 0 8px rgba(255, 255, 255, 0.05);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: vinylSpin 6s linear infinite;
    animation-play-state: paused;
}
.audio-vinyl-disc.playing {
    animation-play-state: running;
}
@keyframes vinylSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.audio-vinyl-grooves {
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.12);
}
.audio-vinyl-center {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.6);
}
.audio-eq-bars {
    position: absolute;
    bottom: -10px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 28px;
}
.eq-bar {
    width: 4px;
    height: 6px;
    background: #a855f7;
    border-radius: 2px;
    transition: height 0.2s ease;
}
.audio-eq-bars.playing .eq-bar {
    animation: eqBounce 0.8s ease-in-out infinite alternate;
}
.audio-eq-bars.playing .eq-1 { animation-delay: 0.1s; }
.audio-eq-bars.playing .eq-2 { animation-delay: 0.3s; }
.audio-eq-bars.playing .eq-3 { animation-delay: 0.15s; }
.audio-eq-bars.playing .eq-4 { animation-delay: 0.4s; }
.audio-eq-bars.playing .eq-5 { animation-delay: 0.25s; }
.audio-eq-bars.playing .eq-6 { animation-delay: 0.35s; }
.audio-eq-bars.playing .eq-7 { animation-delay: 0.18s; }
.audio-eq-bars.playing .eq-8 { animation-delay: 0.28s; }
@keyframes eqBounce {
    0% { height: 4px; background: #a855f7; }
    50% { height: 26px; background: #38bdf8; }
    100% { height: 10px; background: #ec4899; }
}
.audio-track-info {
    text-align: center;
    width: 100%;
}
.audio-track-title {
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.audio-track-sub {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}
.audio-ctl-wrap {
    width: 100%;
}
.preview-audio-player {
    width: 100%;
    outline: none;
    border-radius: 30px;
    filter: invert(0.9) hue-rotate(180deg);
}
.audio-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 4px;
}
.btn-audio-action {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
    border: none;
}
.btn-audio-dl {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.btn-audio-dl:hover {
    background: #1d4ed8;
    color: #ffffff;
}
.btn-audio-share {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-audio-share:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CINEMA THEATER — TRẢI NGHIỆM XEM VIDEO ĐẲNG CẤP & KHÁC BIỆT
   ═══════════════════════════════════════════════════════════════════════════ */
.cinema-theater-wrap {
    position: relative;
    width: 100%;
    max-width: 1060px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    margin: auto;
}
.cinema-ambient-glow {
    position: absolute;
    top: -10%;
    left: -8%;
    right: -8%;
    bottom: -10%;
    background-size: cover;
    background-position: center;
    filter: blur(65px) opacity(0.35);
    border-radius: 36px;
    pointer-events: none;
    z-index: 1;
}
.cinema-frame {
    position: relative;
    z-index: 2;
    width: 100%;
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}
.cinema-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cinema-tag-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cinema-badge-live {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 3.5px 9px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}
.cinema-badge-res {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    padding: 3.5px 9px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.cinema-top-btn {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
}
.cinema-top-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}
.cinema-player-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - 280px);
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cinema-iframe {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: #000000;
}
.cinema-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 20px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.cinema-file-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 62%;
}
.cinema-file-name {
    font-size: 14px;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 7px;
}
.cinema-file-name i {
    color: #ef4444;
}
.cinema-file-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    color: #94a3b8;
}
.cinema-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cinema-meta-dot {
    opacity: 0.35;
}
.cinema-meta-cdn {
    color: #38bdf8;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cinema-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-cinema-action {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
    border: none;
}
.btn-cinema-download {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.btn-cinema-download:hover {
    background: #1d4ed8;
    color: #ffffff;
    transform: translateY(-1px);
}
.btn-cinema-share {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-cinema-share:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PDF THEATER — XEM TÀI LIỆU TRỰC TIẾP KHÔNG BỊ TỰ ĐỘNG TẢI
   ═══════════════════════════════════════════════════════════════════════════ */
.pdf-theater-wrap {
    position: relative;
    width: 90vw;
    max-width: 1100px;
    height: calc(100vh - 170px);
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 65px -10px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    margin: auto;
}
.pdf-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.pdf-tag-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pdf-badge-type {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}
.pdf-badge-size {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    padding: 3.5px 9px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.pdf-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pdf-action-btn {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
}
.pdf-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.pdf-action-btn.pdf-btn-dl {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}
.pdf-action-btn.pdf-btn-dl:hover {
    background: #1d4ed8;
}
.pdf-frame-box {
    flex: 1;
    width: 100%;
    height: 100%;
    background: #1e293b;
    overflow: hidden;
}
.pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: #ffffff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUDIO STUDIO PLAYER — PHÁT NHẠC ĐĨA THAN & EQUALIZER SỐNG ĐỘNG
   ═══════════════════════════════════════════════════════════════════════════ */
.audio-studio-wrap {
    position: relative;
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: auto;
    z-index: 10;
}
.audio-ambient-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, rgba(37, 99, 235, 0.2) 60%, transparent 100%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 1;
}
.audio-player-card {
    position: relative;
    z-index: 2;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    backdrop-filter: blur(16px);
}
.audio-player-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.audio-badge-format {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
}
.audio-badge-quality {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    padding: 3.5px 9px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.audio-vinyl-stage {
    position: relative;
    width: 190px;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
}
.audio-vinyl-disc {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, #1e293b 0%, #090d16 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 0 8px rgba(255, 255, 255, 0.05);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: vinylSpin 6s linear infinite;
    animation-play-state: paused;
}
.audio-vinyl-disc.playing {
    animation-play-state: running;
}
@keyframes vinylSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.audio-vinyl-grooves {
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.12);
}
.audio-vinyl-center {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.6);
}
.audio-eq-bars {
    position: absolute;
    bottom: -10px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 28px;
}
.eq-bar {
    width: 4px;
    height: 6px;
    background: #a855f7;
    border-radius: 2px;
    transition: height 0.2s ease;
}
.audio-eq-bars.playing .eq-bar {
    animation: eqBounce 0.8s ease-in-out infinite alternate;
}
.audio-eq-bars.playing .eq-1 { animation-delay: 0.1s; }
.audio-eq-bars.playing .eq-2 { animation-delay: 0.3s; }
.audio-eq-bars.playing .eq-3 { animation-delay: 0.15s; }
.audio-eq-bars.playing .eq-4 { animation-delay: 0.4s; }
.audio-eq-bars.playing .eq-5 { animation-delay: 0.25s; }
.audio-eq-bars.playing .eq-6 { animation-delay: 0.35s; }
.audio-eq-bars.playing .eq-7 { animation-delay: 0.18s; }
.audio-eq-bars.playing .eq-8 { animation-delay: 0.28s; }
@keyframes eqBounce {
    0% { height: 4px; background: #a855f7; }
    50% { height: 26px; background: #38bdf8; }
    100% { height: 10px; background: #ec4899; }
}
.audio-track-info {
    text-align: center;
    width: 100%;
}
.audio-track-title {
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.audio-track-sub {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}
.audio-ctl-wrap {
    width: 100%;
}
.preview-audio-player {
    width: 100%;
    outline: none;
    border-radius: 30px;
    filter: invert(0.9) hue-rotate(180deg);
}
.audio-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 4px;
}
.btn-audio-action {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
    border: none;
}
.btn-audio-dl {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.btn-audio-dl:hover {
    background: #1d4ed8;
    color: #ffffff;
}
.btn-audio-share {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-audio-share:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.preview-unsupported {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    color: #ffffff;
    max-width: 420px;
}
.preview-unsupported i {
    font-size: 58px;
    color: #64748b;
}
.preview-unsupported h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}
.preview-unsupported p {
    font-size: 13.5px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}
.preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: #94a3b8;
    font-size: 13.5px;
}

/* Bottom Strip */
.previewer-strip {
    height: 84px;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    padding: 10px 24px;
    flex-shrink: 0;
    z-index: 100;
}
.previewer-strip-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}
.strip-thumb {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 8px;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.45;
    transition: all 0.18s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
}
.strip-vid-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 1px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    z-index: 2;
}
.strip-pdf-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    z-index: 2;
}
.strip-doc-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
}
.strip-doc-badge i {
    font-size: 20px;
}
.strip-doc-badge span {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.strip-doc-badge.pdf {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}
.strip-doc-badge.audio {
    color: #a855f7;
    background: rgba(168, 85, 247, 0.15);
}
.strip-vid-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 1px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    z-index: 2;
}
.strip-pdf-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    z-index: 2;
}
.strip-doc-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
}
.strip-doc-badge i {
    font-size: 20px;
}
.strip-doc-badge span {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.strip-doc-badge.pdf {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}
.strip-doc-badge.audio {
    color: #a855f7;
    background: rgba(168, 85, 247, 0.15);
}
.strip-thumb:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}
.strip-thumb.active {
    opacity: 1;
    border-color: #2563eb;
    box-shadow: 0 0 14px rgba(37, 99, 235, 0.7);
    transform: scale(1.08);
}
.strip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.strip-icon {
    font-size: 20px;
    color: #cbd5e1;
}
.strip-icon.ic-pdf   { color: #ef4444; }
.strip-icon.ic-image { color: #10b981; }
.strip-icon.ic-video { color: #ef4444; }
.strip-icon.ic-word  { color: #2563eb; }
.strip-icon.ic-excel { color: #16a34a; }

/* Drag overlay global */
.drag-overlay {
    position: fixed; inset: 0;
    background: rgba(37, 99, 235, 0.92);
    backdrop-filter: blur(8px);
    z-index: 9999999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    gap: 14px;
    pointer-events: none;
}
.drag-overlay.active {
    display: flex;
}
.drag-overlay i {
    font-size: 54px;
}
.drag-overlay h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}
.drag-overlay p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}


/* ══════════════════════════════════════════════════════════════════════════
   FULL DRIVE MIGRATION (BACKGROUND DAEMON & LIVE TERMINAL CONSOLE)
   ══════════════════════════════════════════════════════════════════════════ */
.migration-section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.mig-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.mig-header-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.mig-icon-badge {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.mig-header-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mig-daemon-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mig-header-desc {
    font-size: 13px;
    color: #64748b;
    margin: 6px 0 0 0;
    line-height: 1.5;
}

.mig-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    flex-shrink: 0;
}

.mig-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.mig-status-dot.idle {
    background: #94a3b8;
}
.mig-status-dot.running {
    background: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
    animation: migPulse 1.5s infinite;
}
.mig-status-dot.completed {
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}
.mig-status-dot.paused {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25);
    animation: migPulse 2s infinite;
}
.mig-status-dot.stopped {
    background: #f59e0b;
}
.mig-status-dot.error {
    background: #ef4444;
}

@keyframes migPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.mig-setup-wrap {
    padding: 20px 0 16px 0;
}

.mig-setup-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    gap: 16px;
    align-items: center;
}

@media (max-width: 900px) {
    .mig-setup-grid {
        grid-template-columns: 1fr;
    }
    .mig-arrow-center.mig-swap-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        height: 38px;
        border-radius: 10px;
        margin: 4px 0;
        background: #eff6ff;
        color: #2563eb;
        border: 1px dashed #bfdbfe;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODERN AIRDROP-INSPIRED CENTER TRANSFER HUB
   ═══════════════════════════════════════════════════════════════════════════ */
.mig-center-hub-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px 32px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
    margin-bottom: 24px;
}

.mig-hub-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.mig-hub-tech-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 20px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
}

.mig-transfer-symmetric-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: stretch;
    position: relative;
    z-index: 50;
}

.mig-party-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.25s ease;
    position: relative;
    z-index: 10;
}

.mig-party-card.dropdown-open {
    z-index: 9999 !important;
}

.mig-party-card.source {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.mig-party-card.target {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #ffffff 0%, #f7fdf9 100%);
}

.mig-party-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transform: translateY(-2px);
}

.mig-party-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.party-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.party-card-badge.source {
    color: #2563eb;
}

.party-card-badge.target {
    color: #15803d;
}

.party-card-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.party-card-status-pill.source {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.party-card-status-pill.target.ok {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.party-card-status-pill.target.danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.party-card-status-pill .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.party-select-wrap {
    width: 100%;
    position: relative;
}

/* Custom Modern Select Component for Migration Hub */
.mig-custom-select-wrap {
    position: relative;
    width: 100%;
}

.mig-custom-trigger {
    width: 100%;
    min-height: 52px;
    padding: 7px 14px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    text-align: left;
    user-select: none;
    box-sizing: border-box;
}

.mig-custom-trigger:hover {
    border-color: #2563eb;
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.mig-custom-trigger.active {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.mig-custom-trigger.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    background: #f1f5f9;
}

.mig-trigger-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.mig-trigger-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.mig-trigger-avatar.source {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.mig-trigger-avatar.target {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.mig-trigger-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.mig-trigger-email {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.mig-trigger-storage-sub {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.mig-trigger-right {
    display: flex;
    align-items: center;
    margin-left: 8px;
    flex-shrink: 0;
}

.mig-trigger-arrow {
    font-size: 12px;
    color: #64748b;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.mig-custom-trigger.active .mig-trigger-arrow {
    transform: rotate(180deg);
    color: #2563eb;
}

/* Floating Dropdown Menu (Z-INDEX 99999 + SHADOW ĐỘ NỔI CAO) */
.mig-custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.24), 0 4px 14px rgba(15, 23, 42, 0.08);
    z-index: 99999 !important;
    padding: 6px;
    animation: migMenuSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

@keyframes migMenuSlide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mig-menu-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 4px;
}

.mig-menu-list {
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 2px;
}

.mig-menu-list::-webkit-scrollbar {
    width: 5px;
}
.mig-menu-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.mig-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1.5px solid transparent;
    user-select: none;
}

.mig-menu-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.mig-menu-item.selected {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.mig-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.mig-item-avatar.source {
    background: #dbeafe;
    color: #1d4ed8;
}

.mig-item-avatar.target {
    background: #dcfce7;
    color: #15803d;
}

.mig-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mig-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mig-item-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mig-item-check {
    font-size: 15px;
    color: #2563eb;
    opacity: 0;
    transition: opacity 0.15s ease;
    flex-shrink: 0;
}

.mig-menu-item.selected .mig-item-check {
    opacity: 1;
}

/* Dark mode adjustments */
.dark-mode .mig-custom-trigger {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

.dark-mode .mig-custom-trigger:hover {
    background: #0f172a;
    border-color: #3b82f6;
}

.dark-mode .mig-custom-trigger.active {
    background: #1e293b;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.dark-mode .mig-trigger-email {
    color: #f1f5f9;
}

.dark-mode .mig-trigger-storage-sub {
    color: #94a3b8;
}

.dark-mode .mig-custom-dropdown-menu {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.dark-mode .mig-menu-header {
    border-color: #334155;
    color: #94a3b8;
}

.dark-mode .mig-menu-item:hover {
    background: #334155;
    border-color: #475569;
}

.dark-mode .mig-menu-item.selected {
    background: rgba(37, 99, 235, 0.22);
    border-color: #3b82f6;
}

.dark-mode .mig-item-title {
    color: #f1f5f9;
}

.dark-mode .mig-item-sub {
    color: #94a3b8;
}

.party-select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.party-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Seamless Card Stat Box */
.mig-card-stat-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.msh-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.msh-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
}

.msh-val {
    font-size: 18px;
    font-weight: 800;
}

.msh-sub-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: #64748b;
}

.party-track {
    width: 100%;
    height: 7px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.party-bar {
    height: 100%;
    border-radius: 4px;
    background: #2563eb;
    transition: width 0.4s ease;
}

.party-bar.danger {
    background: #ef4444;
}

.party-pct {
    font-weight: 700;
    color: #0f172a;
}

/* Symmetrical Swap Circle Button & Flow Divider */
.mig-swap-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    z-index: 5;
}

.mig-swap-circle-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    color: #2563eb;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.mig-swap-circle-btn:hover {
    background: #eff6ff;
    border-color: #2563eb;
    transform: scale(1.12) rotate(180deg);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
}

.mig-swap-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.3px;
    user-select: none;
}

/* Destination Folder Input Box */
.mig-dest-folder-box {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.dest-folder-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.dest-folder-input-wrap {
    position: relative;
    max-width: 500px;
    z-index: 1;
}

.input-folder-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 15px;
}

.dest-folder-input {
    width: 100%;
    height: 44px;
    padding-left: 40px;
    padding-right: 14px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
}

.dest-folder-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.dest-folder-hint {
    font-size: 12px;
    color: #64748b;
}

/* Center Hero CTA Button */
.mig-hub-action-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.btn-mig-hero-start {
    height: 52px;
    padding: 0 34px;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.btn-mig-hero-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.btn-mig-sub-action {
    height: 48px;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-mig-sub-action:hover {
    transform: translateY(-2px);
}

.mig-guarantee-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 12.5px;
    color: #64748b;
    text-align: center;
}

@media (max-width: 860px) {
    .mig-transfer-symmetric-grid {
        grid-template-columns: 1fr;
    }
    .mig-swap-circle-btn {
        margin: 6px auto;
        transform: rotate(90deg);
    }
    .mig-swap-circle-btn:hover {
        transform: scale(1.15) rotate(270deg);
    }
}

.mig-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mig-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mig-select {
    height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
}
.mig-select:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.mig-hint {
    font-size: 11.5px;
    color: #94a3b8;
}

.mig-arrow-center {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 15px;
    margin-top: 14px;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
    cursor: pointer;
    outline: none;
}
.mig-arrow-center:hover {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #bae6fd;
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}
.mig-arrow-center.rotate-anim {
    transform: rotate(180deg) scale(1.15);
}

.mig-action-col {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.btn-mig-action {
    height: 42px;
    padding: 0 18px;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}
.btn-mig-action:hover {
    transform: translateY(-1px);
}

.mig-alert-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    color: #b45309;
    font-size: 13px;
}

/* Progress bar section */
.mig-progress-section {
    margin-top: 14px;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.mig-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.mig-progress-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.mig-pct-text {
    font-size: 20px;
    font-weight: 800;
    color: #1d4ed8;
}

.mig-frac-text {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.mig-current-task {
    font-size: 12.5px;
    color: #334155;
    margin-left: 10px;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mig-counts-badge {
    display: flex;
    gap: 10px;
}

.mig-badge {
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
}
.mig-badge.success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.mig-badge.error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.mig-progress-track {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.mig-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
    transition: width 0.4s ease;
    position: relative;
    overflow: hidden;
}

.mig-progress-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    animation: migShimmer 2s infinite;
}

@keyframes migShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.mig-stage-label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 4px;
}

/* Dual Progress: Current file row */
.mig-file-progress-row {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mig-file-info-col {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mig-file-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mig-file-pct-tag {
    font-size: 11.5px;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

.mig-file-track {
    width: 100%;
    height: 7px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.mig-file-fill {
    height: 100%;
    border-radius: 999px;
    background: #0284c7;
    transition: width 0.3s ease;
}

/* Button variants for Pause & Resume */
.btn-warning {
    background: #f59e0b !important;
    color: #ffffff !important;
    border: none !important;
}
.btn-warning:hover {
    background: #d97706 !important;
}

.btn-success {
    background: #10b981 !important;
    color: #ffffff !important;
    border: none !important;
}
.btn-success:hover {
    background: #059669 !important;
}

/* Console Terminal Dark macOS Style */
.mig-console-wrap {
    margin-top: 18px;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid #1e293b;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.mig-console-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.console-mac-dots {
    display: flex;
    gap: 6px;
}
.console-mac-dots .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}
.console-mac-dots .dot.red { background: #ef4444; }
.console-mac-dots .dot.yellow { background: #f59e0b; }
.console-mac-dots .dot.green { background: #10b981; }

.console-title {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.console-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.console-live-pill {
    font-size: 11px;
    color: #cbd5e1;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 3px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.mig-console-body {
    height: 240px;
    overflow-y: auto;
    padding: 12px 16px;
    font-family: 'Consolas', 'Fira Code', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.6;
    scroll-behavior: smooth;
}

.mig-console-body::-webkit-scrollbar {
    width: 6px;
}
.mig-console-body::-webkit-scrollbar-track {
    background: #0f172a;
}
.mig-console-body::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

.console-line {
    display: flex;
    gap: 8px;
    word-break: break-all;
    margin-bottom: 2px;
}

.console-line .c-time {
    color: #64748b;
    flex-shrink: 0;
    font-size: 11.5px;
}

.console-line.info .c-msg {
    color: #e2e8f0;
}
.console-line.success .c-msg {
    color: #4ade80;
}
.console-line.warning .c-msg {
    color: #fcd34d;
}
.console-line.error .c-msg {
    color: #f87171;
    font-weight: 600;
}
.console-line.copy .c-msg {
    color: #60a5fa;
}
.console-line.scan .c-msg {
    color: #c084fc;
}


/* ══════════════════════════════════════════════════════════════════════════
   MIGRATION STORAGE CARDS, CAPACITY COMPARISON & MODAL
   ══════════════════════════════════════════════════════════════════════════ */
.mig-storage-pill-card {
    margin-top: 10px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s ease;
}
.mig-storage-pill-card:hover {
    background: #f1f5f9;
}
.mig-storage-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}
.mig-storage-label {
    color: #64748b;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.mig-storage-val {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}
.mig-mini-track {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.mig-mini-bar {
    height: 100%;
    border-radius: 999px;
    background: #10b981;
    transition: width 0.35s ease;
}
.mig-mini-bar.danger {
    background: #ef4444 !important;
}
.mig-storage-sub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #64748b;
}
.mig-pct-badge {
    font-weight: 700;
    color: #334155;
    background: #e2e8f0;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10.5px;
}

/* Banner so sánh dung lượng */
.mig-capacity-banner {
    margin-top: 14px;
}
.mig-cap-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.5;
}
.mig-cap-alert.ok {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.mig-cap-alert.ok i {
    color: #16a34a;
    font-size: 15px;
    flex-shrink: 0;
}
.mig-cap-alert.danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.mig-cap-alert.danger i {
    color: #dc2626;
    font-size: 15px;
    flex-shrink: 0;
}

/* Modal Confirmation Box */
.modal-migration-box {
    max-width: 580px !important;
    padding: 24px 28px !important;
}
.modal-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.modal-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.modal-icon-badge.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.modal-subtitle {
    font-size: 12.5px;
    color: #64748b;
    margin: 3px 0 0 0;
}
.modal-compare-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: center;
    margin: 18px 0 14px 0;
}
@media (max-width: 600px) {
    .modal-compare-grid {
        grid-template-columns: 1fr;
    }
    .modal-compare-arrow {
        display: none !important;
    }
}
.modal-compare-col {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.modal-compare-col.source {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.modal-compare-col.target {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.modal-compare-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}
.modal-compare-email {
    font-size: 13.5px;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.modal-compare-metric {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.modal-compare-metric .m-label {
    font-size: 11px;
    color: #64748b;
}
.modal-compare-metric .m-val {
    font-size: 14px;
    font-weight: 700;
}
.modal-compare-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 14px;
}
.modal-safety-notice {
    margin-bottom: 14px;
}
.m-safety-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.5;
}
.m-safety-box.ok {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #14532d;
}
.m-safety-box.ok i {
    color: #16a34a;
    font-size: 15px;
    margin-top: 2px;
}
.m-safety-box.warning {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #7f1d1d;
}
.m-safety-box.warning i {
    color: #dc2626;
    font-size: 15px;
    margin-top: 2px;
}
.modal-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 12.5px;
}
.modal-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.modal-info-item i {
    font-size: 15px;
    margin-top: 2px;
}

/* Modal Icon Badge Red */
.modal-icon-badge.red {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* Duration Badge */
.mig-duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-left: 8px;
}

.mig-eta-badge {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

/* Error badge cursor & hover */
.mig-badge.error[onclick] {
    cursor: pointer;
    transition: all 0.15s ease;
}
.mig-badge.error[onclick]:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    transform: translateY(-1px);
}

/* Failed Banner below progress */
.mig-failed-banner {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    color: #9f1239;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.mig-failed-banner:hover {
    background: #ffe4e6;
    border-color: #fda4af;
}
.mig-failed-banner-btn {
    font-size: 11.5px;
    font-weight: 700;
    color: #e11d48;
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #fecdd3;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Failed item card in modal */
.mig-failed-item-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.15s ease;
}
.mig-failed-item-card:hover {
    border-color: #cbd5e1;
}
.mig-failed-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.mig-failed-item-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    word-break: break-all;
}
.mig-failed-item-meta {
    font-size: 11.5px;
    color: #64748b;
    white-space: nowrap;
}
.mig-failed-item-reason {
    font-size: 12px;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.45;
}
.mig-failed-summary-box {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    padding: 12px 14px;
    color: #9f1239;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}


/* ═══════════════ KDRIVE CUSTOM WEB DIALOG (CONFIRM / PROMPT) ═══════════════ */
.kdrive-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.kdrive-dialog-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.kdrive-dialog-card {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    padding: 24px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.kdrive-dialog-overlay.active .kdrive-dialog-card {
    transform: scale(1) translateY(0);
}

.kdrive-dialog-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.kdrive-dialog-icon-wrap.danger {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
}

.kdrive-dialog-icon-wrap.warning {
    background: #fffbeb;
    color: #f59e0b;
    border: 1px solid #fde68a;
}

.kdrive-dialog-icon-wrap.primary {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.kdrive-dialog-icon-wrap.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.kdrive-dialog-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.35;
}

.kdrive-dialog-message {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.55;
    margin: 0 0 20px 0;
    word-break: break-word;
}

.kdrive-dialog-input-wrap {
    width: 100%;
    margin-bottom: 20px;
}

.kdrive-dialog-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.kdrive-dialog-input:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.kdrive-dialog-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: flex-end;
}

.kdrive-dialog-btn {
    flex: 1;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.kdrive-dialog-btn.btn-dialog-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.kdrive-dialog-btn.btn-dialog-cancel:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.kdrive-dialog-btn.btn-dialog-confirm {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.kdrive-dialog-btn.btn-dialog-confirm:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.kdrive-dialog-btn.btn-dialog-confirm.danger {
    background: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.kdrive-dialog-btn.btn-dialog-confirm.danger:hover {
    background: #dc2626;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

/* ═══════════════ SETTINGS PAGE & SYSTEM CONFIG RESPONSIVE ═══════════════ */
.settings-body {
    padding: 24px;
    max-width: 900px;
    margin: 0 auto;
}
.settings-header {
    margin-bottom: 24px;
}
.settings-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}
.settings-header p {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
}
.settings-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
}
.settings-card h2 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13.5px;
    gap: 12px;
    flex-wrap: wrap;
}
.info-label {
    font-weight: 600;
    color: #475569;
}
.info-value {
    color: #0f172a;
    word-break: break-all;
}

@media (max-width: 768px) {
    .settings-body {
        padding: 16px;
    }
    .settings-card {
        padding: 18px 16px;
        border-radius: 12px;
    }
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* ═══════════════ CLOUD-TO-CLOUD NOTE BANNERS ═══════════════ */
.mig-browser-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    margin: 0 0 16px 0;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    color: #1e40af;
    font-size: 13px;
    line-height: 1.55;
}
.mig-browser-note i {
    font-size: 16px;
    color: #2563eb;
    margin-top: 2px;
    flex-shrink: 0;
}
.mig-browser-note strong {
    color: #1e3a8a;
}

/* ═══════════════ KONGREAL BESPOKE ADMIN PANEL ═══════════════ */
body.admin-body-wrap {
    margin: 0;
    padding: 0;
    background: #09090b;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #09090b;
    -webkit-font-smoothing: antialiased;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
    background: #09090b;
}

/* ═══ SIDEBAR ═══ */
.admin-sidebar {
    width: 240px;
    background: #0c0d12;
    border-right: 1px solid #1e222e;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.2s ease;
}

.admin-brand {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #171b26;
}
.admin-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.admin-brand-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #181b24;
    border: 1px solid #272c3d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #f59e0b;
}
.admin-brand-title {
    font-size: 14px;
    font-weight: 700;
    color: #f4f4f5;
    letter-spacing: -0.01em;
}
.admin-brand-sub {
    font-size: 10.5px;
    color: #71717a;
    margin-left: 4px;
    font-weight: 500;
}
.admin-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: #71717a;
    font-size: 16px;
    cursor: pointer;
}

/* Nav Menu */
.admin-nav {
    flex: 1;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #a1a1aa;
    text-decoration: none;
    transition: all 0.12s ease;
}
.admin-nav-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    color: #71717a;
    transition: color 0.12s ease;
}
.admin-nav-item:hover {
    background: #181b24;
    color: #ffffff;
}
.admin-nav-item:hover i {
    color: #d4d4d8;
}
.admin-nav-item.active {
    background: #1e222e;
    color: #ffffff;
    font-weight: 600;
}
.admin-nav-item.active i {
    color: #f59e0b;
}
.admin-nav-count {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #1c202d;
    color: #a1a1aa;
    border: 1px solid #282e3f;
}

/* Sidebar Footer */
.admin-sidebar-footer {
    padding: 12px 14px;
    border-top: 1px solid #171b26;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #090a0e;
}
.admin-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 6px;
    background: #141720;
    border: 1px solid #222736;
    color: #a1a1aa;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.12s ease;
}
.admin-back-btn:hover {
    background: #1a1e2a;
    color: #ffffff;
}
.admin-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
}
.admin-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #282e3f;
}
.admin-avatar-initial {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1f2433;
    border: 1px solid #2c3349;
    color: #f59e0b;
    font-size: 12.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-user-text {
    flex: 1;
    min-width: 0;
}
.admin-user-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.root-tag {
    font-size: 9px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    background: #27272a;
    color: #f59e0b;
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid #3f3f46;
}
.admin-user-email {
    font-size: 11px;
    color: #71717a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-logout-icon {
    color: #71717a;
    font-size: 13px;
    padding: 6px;
    text-decoration: none;
    transition: color 0.15s;
}
.admin-logout-icon:hover {
    color: #ef4444;
}

/* ═══ ADMIN MAIN ═══ */
.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #fafafa;
}
.admin-topbar {
    height: 54px;
    background: #ffffff;
    border-bottom: 1px solid #e4e4e7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid #e4e4e7;
    border-radius: 5px;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    color: #52525b;
}
.admin-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.crumb-root {
    color: #71717a;
    font-weight: 500;
}
.crumb-sep {
    color: #d4d4d8;
    font-size: 11px;
}
.crumb-active {
    font-weight: 600;
    color: #09090b;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.system-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 5px;
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    font-size: 11.5px;
    font-weight: 500;
    color: #52525b;
    font-family: 'JetBrains Mono', monospace;
}
.dot-online {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}
.btn-switch-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #d4d4d8;
    color: #27272a;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.12s ease;
}
.btn-switch-user:hover {
    background: #f4f4f5;
    border-color: #a1a1aa;
}

/* ═══ ADMIN CONTENT ═══ */
.admin-content {
    padding: 24px 28px;
    flex: 1;
}
.admin-view-wrap {
    max-width: 1320px;
    margin: 0 auto;
}

.admin-action-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.action-bar-title {
    font-size: 20px;
    font-weight: 700;
    color: #09090b;
    letter-spacing: -0.02em;
    margin: 0 0 3px;
}
.action-bar-desc {
    font-size: 13px;
    color: #71717a;
    margin: 0;
}
.action-bar-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-primary-admin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    background: #09090b;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.12s;
}
.btn-primary-admin:hover {
    background: #27272a;
}
.btn-secondary-admin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    color: #3f3f46;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s ease;
}
.btn-secondary-admin:hover {
    background: #f4f4f5;
}

/* ═══ METRICS (SaaS KPI) ═══ */
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.kpi-card {
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.kpi-title {
    font-size: 12px;
    font-weight: 500;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.kpi-icon {
    font-size: 14px;
    color: #a1a1aa;
}
.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: #09090b;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.kpi-meta {
    font-size: 12px;
    color: #71717a;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.meta-tag {
    background: #f4f4f5;
    color: #52525b;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}
.meta-tag.admin {
    background: #fef3c7;
    color: #b45309;
}
.kpi-progress {
    height: 4px;
    background: #f4f4f5;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
}
.kpi-progress-bar {
    height: 100%;
    background: #09090b;
    border-radius: 2px;
}

/* Dual Grid */
.admin-dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.admin-card {
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}
.admin-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f4f4f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #09090b;
    margin: 0;
}
.card-action-link {
    font-size: 12.5px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}
.card-body {
    padding: 20px;
}

/* Plan Progress */
.plan-bar-group {
    margin-bottom: 14px;
}
.plan-bar-group:last-child {
    margin-bottom: 0;
}
.plan-bar-info {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    margin-bottom: 6px;
}
.plan-name { color: #3f3f46; font-weight: 500; }
.plan-val { color: #71717a; }
.plan-bar-track {
    height: 6px;
    background: #f4f4f5;
    border-radius: 3px;
    overflow: hidden;
}
.plan-bar-fill {
    height: 100%;
    border-radius: 3px;
}
.fill-free { background: #94a3b8; }
.fill-pro { background: #3b82f6; }
.fill-max { background: #f59e0b; }

/* Auth Provider Box */
.auth-provider-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #fbfbfb;
    border: 1px solid #f0f0f2;
    border-radius: 8px;
    margin-bottom: 10px;
}
.auth-provider-row:last-child { margin-bottom: 0; }
.provider-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.provider-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.provider-icon.google {
    background: #ffffff;
    border: 1px solid #e4e4e7;
    color: #ea4335;
}
.provider-icon.local {
    background: #f4f4f5;
    color: #52525b;
}
.provider-title {
    font-size: 13px;
    font-weight: 600;
    color: #09090b;
}
.provider-desc {
    font-size: 11.5px;
    color: #71717a;
}
.provider-count {
    font-size: 13px;
    font-weight: 600;
    color: #09090b;
}

/* ═══ TABLE STYLING (SaaS Table) ═══ */
.table-responsive {
    overflow-x: auto;
}
.table-toolbar {
    padding: 14px 18px;
    border-bottom: 1px solid #e4e4e7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.search-input-wrap i {
    position: absolute;
    left: 10px;
    font-size: 12px;
    color: #a1a1aa;
}
.search-input-wrap input {
    padding: 6px 12px 6px 28px;
    border-radius: 6px;
    border: 1px solid #e4e4e7;
    font-size: 12.5px;
    width: 240px;
    outline: none;
    background: #ffffff;
}
.search-input-wrap input:focus {
    border-color: #09090b;
}
.filter-pills {
    display: flex;
    gap: 4px;
    background: #f4f4f5;
    padding: 3px;
    border-radius: 6px;
}
.filter-pills .pill-btn {
    border: none;
    background: transparent;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #71717a;
    cursor: pointer;
    transition: all 0.1s;
}
.filter-pills .pill-btn.active {
    background: #ffffff;
    color: #09090b;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.saas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
.saas-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #71717a;
    background: #fafafa;
    border-bottom: 1px solid #e4e4e7;
}
.saas-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #f4f4f5;
    vertical-align: middle;
    color: #27272a;
}
.saas-table tr:hover td {
    background: #fafafa;
}

/* User cell */
.member-profile-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.member-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e4e4e7;
}
.member-avatar-initial {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    color: #3f3f46;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.member-avatar-initial.is-admin {
    background: #fef3c7;
    border-color: #fde68a;
    color: #b45309;
}
.avatar-badge-google {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: #ea4335;
}
.member-name {
    font-weight: 600;
    color: #09090b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.badge-current-you {
    font-size: 10px;
    background: #eff6ff;
    color: #2563eb;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
}
.member-email {
    font-size: 11.5px;
    color: #71717a;
    font-family: 'JetBrains Mono', monospace;
}

/* Badges */
.badge-provider {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}
.badge-provider.google {
    background: #ffffff;
    border: 1px solid #e4e4e7;
    color: #09090b;
}
.badge-provider.google i {
    color: #ea4335;
}
.badge-provider.local {
    background: #f4f4f5;
    color: #52525b;
}

.role-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}
.badge-role {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 600;
}
.badge-role.admin {
    background: #09090b;
    color: #ffffff;
}
.badge-role.member {
    background: #f4f4f5;
    color: #52525b;
}
.btn-micro-action {
    background: transparent;
    border: 1px solid #e4e4e7;
    color: #71717a;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.12s;
}
.btn-micro-action:hover {
    background: #09090b;
    color: #ffffff;
    border-color: #09090b;
}

.saas-select-plan {
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid #e4e4e7;
    font-size: 11.5px;
    font-weight: 500;
    background: #ffffff;
    cursor: pointer;
}
.drive-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #71717a;
    font-size: 12px;
}
.drive-badge.active {
    color: #059669;
    font-weight: 600;
}
.action-btn-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-icon-ghost {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    background: transparent;
    border: 1px solid transparent;
    color: #71717a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11.5px;
    transition: all 0.12s;
}
.btn-icon-ghost:hover {
    background: #f4f4f5;
    color: #09090b;
}
.btn-icon-ghost.danger:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* ═══ PRICING GRID ═══ */
.saas-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.pricing-tier-card {
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    padding: 22px;
    display: flex;
    flex-direction: column;
}
.pricing-tier-card.pro {
    border-color: #3b82f6;
}
.pricing-tier-card.max {
    border-color: #f59e0b;
}
.tier-tag {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #71717a;
}
.tier-title {
    font-size: 18px;
    font-weight: 700;
    color: #09090b;
    margin: 4px 0 8px;
}
.tier-price {
    font-size: 13.5px;
    color: #52525b;
    margin-bottom: 16px;
}
.tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12.5px;
    color: #3f3f46;
    flex: 1;
}
.tier-features li {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tier-footer {
    padding-top: 14px;
    border-top: 1px solid #f4f4f5;
}
.tier-user-count {
    font-size: 22px;
    font-weight: 700;
    color: #09090b;
    line-height: 1;
}
.tier-user-label {
    font-size: 11.5px;
    color: #71717a;
    margin-top: 4px;
}

/* ═══ DRIVES TAB ═══ */
.drive-account-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.drive-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.drive-email {
    font-size: 12.5px;
    font-weight: 600;
    color: #09090b;
}
.drive-sub-id {
    font-size: 11px;
    color: #71717a;
}
.owner-cell {
    display: flex;
    flex-direction: column;
}
.owner-email {
    font-size: 11.5px;
    color: #71717a;
    font-family: 'JetBrains Mono', monospace;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 500;
}
.status-pill.active {
    background: #ecfdf5;
    color: #059669;
}
.status-pill.warning {
    background: #fef2f2;
    color: #dc2626;
}

/* ═══ SYSTEM TAB ═══ */
.system-spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    padding: 20px;
}
.spec-tile {
    background: #fbfbfb;
    border: 1px solid #f0f0f2;
    border-radius: 6px;
    padding: 10px 14px;
}
.spec-label {
    display: block;
    font-size: 11px;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}
.spec-value {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #09090b;
}

/* ═══ MODAL ═══ */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 9, 11, 0.6);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}
.admin-modal-dialog {
    background: #ffffff;
    border-radius: 10px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
.admin-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e4e4e7;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-modal-title {
    font-size: 14px;
    font-weight: 600;
    color: #09090b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-modal-close {
    background: transparent;
    border: none;
    color: #71717a;
    cursor: pointer;
    font-size: 14px;
}
.admin-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.form-group-admin {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.form-group-admin label {
    font-size: 12px;
    font-weight: 500;
    color: #3f3f46;
}
.form-group-admin input, .form-group-admin select {
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid #e4e4e7;
    font-size: 13px;
    outline: none;
}
.form-group-admin input:focus, .form-group-admin select:focus {
    border-color: #09090b;
}
.form-row-admin {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.admin-modal-footer {
    padding: 12px 20px;
    background: #fafafa;
    border-top: 1px solid #e4e4e7;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.btn-admin-cancel {
    padding: 6px 14px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    color: #3f3f46;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
}
.btn-admin-primary {
    padding: 6px 14px;
    border-radius: 6px;
    background: #09090b;
    border: none;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
}

/* Toast */
.kongreal-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #09090b;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
}
.kongreal-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.kongreal-toast.toast-success i { color: #10b981; }
.kongreal-toast.toast-error i { color: #ef4444; }

/* Micro Helpers */
.font-mono { font-family: 'JetBrains Mono', monospace; }
.text-muted { color: #71717a !important; }
.text-emerald { color: #059669 !important; }
.text-danger { color: #ef4444 !important; }
.mt-6 { margin-top: 24px; }
.badge-subtle {
    font-size: 11.5px;
    color: #71717a;
    background: #f4f4f5;
    padding: 2px 8px;
    border-radius: 4px;
}
.badge-plan-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}
.badge-plan-tag.free { background: #f4f4f5; color: #52525b; }
.badge-plan-tag.pro { background: #eff6ff; color: #1d4ed8; }
.badge-plan-tag.max { background: #fef3c7; color: #b45309; }

/* Responsive */
@media (max-width: 992px) {
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
    }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    .admin-backdrop.open { display: block; }
    .admin-close-btn { display: block; }
    .admin-menu-toggle { display: inline-flex; }
    .admin-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-dual-grid { grid-template-columns: 1fr; }
    .saas-pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .admin-kpi-grid { grid-template-columns: 1fr; }
    .admin-topbar { padding: 0 16px; }
    .admin-content { padding: 16px; }
    .hide-mobile { display: none !important; }
    .search-input-wrap input { width: 100%; }
}

/* --- SIDEBAR REDESIGN v2 --- */

/* Nav section separator */
.nav-sep {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 4px 5px;
    font-size: 10.5px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.5px;
}
.nav-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}
.nav-sep i { font-size: 9px; }
.nav-sep--admin { color: #f59e0b; }
.nav-sep--admin::after { background: rgba(245,158,11,0.25); }

/* Thin divider */
.nav-sep-line {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 4px;
}

/* Admin nav item */
.nav-item--admin {
    border-left: 2px solid #f59e0b !important;
    background: rgba(245,158,11,0.06) !important;
}
.nav-item--admin i { color: #d97706 !important; }
.nav-item--admin span { font-weight: 600; color: #92400e; }
.nav-item--admin:hover { background: rgba(245,158,11,0.12) !important; }
.nav-item--admin.active { background: rgba(245,158,11,0.15) !important; color: #92400e !important; }

/* ROOT badge */
.nav-badge-root {
    margin-left: auto;
    background: #f59e0b;
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* Google avatar photo */
.user-avatar--photo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e2e8f0;
}

/* User meta row (drives + plan inline) */
.user-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    flex-wrap: wrap;
}
.user-drives-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
}
.user-drives-text {
    font-size: 10.5px;
    color: #64748b;
    font-weight: 500;
}

/* --- SIDEBAR v3 — no AI-slop labels --- */

/* Pure spacing group separator — no text, no line decoration */
.nav-gap {
    height: 6px;
}
.nav-gap--border {
    height: 1px;
    background: #f1f5f9;
    margin: 6px 4px;
}

/* Hide old nav-sep decorative labels */
.nav-sep, .nav-sep-line {
    display: none !important;
}

/* --- nav-sep visibility fix --- */
.nav-sep {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 16px 2px 4px;
    font-size: 10.5px;
    font-weight: 700;
    color: #64748b !important;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}
.nav-sep::after {
    content: '' !important;
    flex: 1;
    height: 1px;
    background: #e2e8f0 !important;
    display: block !important;
}
.nav-sep--admin {
    color: #d97706 !important;
}
.nav-sep--admin::after {
    background: rgba(245,158,11,0.3) !important;
}

/* --- NAV SECTION HEADERS BESPOKE --- */
.nav-section-header {
    display: flex;
    align-items: center;
    padding: 16px 10px 6px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    user-select: none;
}

.nav-section-header:first-of-type {
    padding-top: 6px;
}

.nav-section-header span {
    display: inline-block;
}

.nav-section-header--admin {
    color: #d97706;
    margin-top: 4px;
}

.nav-section-header--admin i {
    font-size: 10px;
    margin-right: 4px;
    color: #f59e0b;
}

/* ---------------------------------------------------------------------------
   COLLAPSIBLE SIDEBAR (MINI ICON MODE)
   --------------------------------------------------------------------------- */

/* Always enable topbar menu toggle button */
.topbar-menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
}
.topbar-menu-toggle:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Sidebar transition */
.sidebar {
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform .3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Sidebar collapse toggle button inside brand */
.sidebar-collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    font-size: 12px;
    margin-left: auto;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.sidebar-collapse-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
}

/* Hide mini brand by default */
.brand-mini {
    display: none !important;
}

/* Hide mobile close button on desktop */
@media (min-width: 993px) {
    .sidebar-close-btn {
        display: none !important;
    }
}

/* Hide desktop collapse button on mobile */
@media (max-width: 992px) {
    .sidebar-collapse-btn {
        display: none !important;
    }
}

/* --- DESKTOP COLLAPSED STATE (.sidebar-is-collapsed) --- */
@media (min-width: 993px) {
    .sidebar-is-collapsed .sidebar {
        width: 68px !important;
    }

    /* Brand Header */
    .sidebar-is-collapsed .sidebar-brand {
        padding: 0 10px !important;
        justify-content: center !important;
        position: relative;
    }
    .sidebar-is-collapsed .sidebar-brand-link {
        justify-content: center;
        width: auto;
    }
    .sidebar-is-collapsed .brand-full,
    .sidebar-is-collapsed .sidebar-brand-badge {
        display: none !important;
    }
    .sidebar-is-collapsed .brand-mini {
        display: block !important;
        width: 32px;
        height: 32px;
        object-fit: contain;
    }
    .sidebar-is-collapsed .sidebar-collapse-btn {
        display: none !important; /* Hide inside header when collapsed, topbar toggle can expand or hover */
    }

    /* Upload button */
    .sidebar-is-collapsed .sidebar-upload-wrap {
        padding: 12px 10px 6px !important;
    }
    .sidebar-is-collapsed .btn-upload-new {
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        margin: 0 auto !important;
        justify-content: center !important;
        border-radius: 12px !important;
    }
    .sidebar-is-collapsed .btn-upload-new span {
        display: none !important;
    }
    .sidebar-is-collapsed .btn-upload-new i {
        font-size: 18px !important;
        margin: 0 !important;
    }

    /* Nav Section Headers */
    .sidebar-is-collapsed .nav-section-header {
        padding: 10px 0 !important;
        justify-content: center !important;
    }
    .sidebar-is-collapsed .nav-section-header span {
        display: none !important;
    }
    .sidebar-is-collapsed .nav-section-header::after {
        content: '' !important;
        display: block !important;
        width: 26px !important;
        height: 1px !important;
        background: #e2e8f0 !important;
        margin: 0 auto !important;
    }
    .sidebar-is-collapsed .nav-section-header--admin::after {
        background: rgba(245, 158, 11, 0.45) !important;
    }

    /* Nav items */
    .sidebar-is-collapsed .sidebar-nav {
        padding: 6px 8px !important;
        overflow-x: visible !important;
    }
    .sidebar-is-collapsed .nav-item {
        padding: 11px 0 !important;
        justify-content: center !important;
        margin: 3px 0 !important;
        border-radius: 10px !important;
        position: relative !important;
    }
    .sidebar-is-collapsed .nav-item span,
    .sidebar-is-collapsed .nav-count-badge,
    .sidebar-is-collapsed .nav-badge-root {
        display: none !important;
    }
    .sidebar-is-collapsed .nav-item i {
        font-size: 17px !important;
        width: auto !important;
        margin: 0 !important;
    }
    .sidebar-is-collapsed .nav-item.active::before {
        display: none !important;
    }
    .sidebar-is-collapsed .nav-item.active {
        background: #eff6ff !important;
        color: #2563eb !important;
    }
    .sidebar-is-collapsed .nav-item--admin.active {
        background: rgba(245, 158, 11, 0.15) !important;
        color: #d97706 !important;
    }

    /* Tooltip popup on hover */
    .sidebar-is-collapsed .nav-item:hover::after {
        content: attr(data-tooltip);
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 12px;
        padding: 6px 12px;
        background: #0f172a;
        color: #ffffff;
        font-size: 12px;
        font-weight: 500;
        border-radius: 6px;
        white-space: nowrap;
        pointer-events: none;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
        z-index: 99999;
    }

    /* User Footer */
    .sidebar-is-collapsed .sidebar-user {
        padding: 12px 6px !important;
        justify-content: center !important;
    }
    .sidebar-is-collapsed .sidebar-user .user-meta,
    .sidebar-is-collapsed .sidebar-user .btn-logout {
        display: none !important;
    }
    .sidebar-is-collapsed .sidebar-user .user-avatar {
        margin: 0 auto !important;
    }
}

/* ---------------------------------------------------------------------------
   LINEAR / VERCEL STYLE SIDEBAR NAVIGATION
   --------------------------------------------------------------------------- */

/* Section Separator with trailing line */
.nav-sep {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 14px 6px 4px 6px !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
    user-select: none !important;
}

.nav-sep span {
    white-space: nowrap !important;
    display: inline-block !important;
}

.nav-sep::after {
    content: '' !important;
    flex: 1 !important;
    height: 1px !important;
    background: #e2e8f0 !important;
    display: block !important;
}

/* Admin Separator */
.nav-sep--admin {
    color: #d97706 !important;
}
.nav-sep--admin::after {
    background: rgba(245, 158, 11, 0.3) !important;
}

/* Thin horizontal line separator without label */
.nav-sep-line {
    height: 1px !important;
    background: #e2e8f0 !important;
    margin: 10px 6px !important;
    display: block !important;
}

/* Compact Nav items */
.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 2px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: #334155;
    transition: all 0.15s ease;
    text-decoration: none;
}

.sidebar-nav .nav-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.sidebar-nav .nav-item.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.sidebar-nav .nav-item.active i {
    color: #2563eb;
}

/* Collapsed mode adjustments for nav-sep */
@media (min-width: 993px) {
    .sidebar-is-collapsed .nav-sep {
        padding: 8px 0 !important;
        justify-content: center !important;
    }
    .sidebar-is-collapsed .nav-sep span {
        display: none !important;
    }
    .sidebar-is-collapsed .nav-sep::after {
        flex: none !important;
        width: 26px !important;
        margin: 0 auto !important;
    }
    .sidebar-is-collapsed .nav-sep-line {
        width: 26px !important;
        margin: 8px auto !important;
    }
}
