/* ==========================================================================
   KDRIVE — PREMIUM CLOUD MANAGER 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; }

.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
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .dash-grid { grid-template-columns: 1fr; }
    .tm-container { grid-template-columns: 1fr; height: auto; }
}

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

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

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

/* ═══════════════════════════════════════════════════════════════════════════
   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 {
        display: none !important;
    }
}

.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;
}

/* 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;
}
