/* ═══════════════════════════════════════════════════════════════════════════════
   FLYWHEEL CloudVault — Premium Dark UI
   Inspired by Linear, Apple iCloud, Notion
   ═══════════════════════════════════════════════════════════════════════════════ */

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

/* ─── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
    /* Surfaces */
    --bg-primary: #09090b;
    --bg-elevated: #111114;
    --bg-secondary: #18181b;
    --bg-tertiary: #222228;
    --bg-quaternary: #2a2a32;

    /* Borders */
    --separator: rgba(255,255,255,0.08);
    --separator-light: rgba(255,255,255,0.05);

    /* Text */
    --label-primary: #f4f4f5;
    --label-secondary: rgba(244,244,245,0.64);
    --label-tertiary: rgba(244,244,245,0.40);
    --label-quaternary: rgba(244,244,245,0.20);

    /* Accent */
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-subtle: rgba(99,102,241,0.10);
    --accent-muted: rgba(99,102,241,0.18);

    /* Semantic */
    --blue: #3b82f6;
    --green: #22c55e;
    --red: #ef4444;
    --orange: #f59e0b;
    --yellow: #eab308;
    --purple: #a855f7;
    --pink: #ec4899;
    --teal: #14b8a6;
    --indigo: #6366f1;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.25);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.45);
    --shadow-glow: 0 0 0 1px rgba(99,102,241,0.25), 0 0 24px rgba(99,102,241,0.08);

    /* Radii */
    --r-sm: 8px;
    --r: 12px;
    --r-lg: 16px;
    --r-xl: 20px;

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.0, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --tr-fast: 0.12s var(--ease);
    --tr: 0.2s var(--ease);
    --tr-slow: 0.3s var(--ease);
}

/* ─── Base ──────────────────────────────────────────────────────────────────── */
html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--label-primary);
    line-height: 1.55;
    min-height: 100vh;
}

::selection { background: rgba(99,102,241,0.3); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-quaternary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ─── Layout ────────────────────────────────────────────────────────────────── */
.app {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 28px 48px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LOGIN
   ═══════════════════════════════════════════════════════════════════════════════ */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* Ambient glow behind login card */
.login-screen::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 380px;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: loginFadeIn 0.6s var(--ease-out) both;
}

@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: var(--accent-subtle);
    font-size: 1.6rem;
    color: var(--accent);
}

.login-card h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    color: var(--label-primary);
}

.login-card p {
    color: var(--label-tertiary);
    font-size: 0.88rem;
    margin-bottom: 36px;
}

.login-error {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    color: var(--red);
    padding: 10px 14px;
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    margin-bottom: 16px;
    display: none;
    text-align: left;
}

.login-error.show {
    display: block;
    animation: shake 0.35s ease;
}

.login-card .form-group { text-align: left; }

.login-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 8px;
}

@keyframes shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════════════ */
.header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--separator-light);
    position: sticky;
    top: 0;
    background: rgba(9,9,11,0.82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 100;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--label-primary);
    flex-shrink: 0;
}

.header-brand i {
    color: var(--accent);
    font-size: 1.2rem;
}

.header-search {
    flex: 1;
    max-width: 300px;
    position: relative;
    margin: 0 auto;
}

.header-search input {
    width: 100%;
    padding: 8px 14px 8px 34px;
    background: var(--bg-secondary);
    border: 1px solid var(--separator);
    border-radius: var(--r-sm);
    color: var(--label-primary);
    font-family: var(--font);
    font-size: 0.84rem;
    outline: none;
    transition: all var(--tr);
}

.header-search input:focus {
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.header-search input::placeholder { color: var(--label-quaternary); }

.header-search > i {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--label-quaternary);
    font-size: 0.76rem;
    pointer-events: none;
}

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

/* ═══════════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid var(--separator);
    border-radius: var(--r-sm);
    background: var(--bg-secondary);
    color: var(--label-primary);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--tr);
    white-space: nowrap;
    text-decoration: none;
    user-select: none;
}

.btn:hover {
    background: var(--bg-tertiary);
    border-color: rgba(255,255,255,0.12);
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--accent);
    border-color: transparent;
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: transparent;
}

.btn-danger {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.2);
    color: var(--red);
}

.btn-danger:hover {
    background: var(--red);
    border-color: transparent;
    color: #fff;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BREADCRUMB
   ═══════════════════════════════════════════════════════════════════════════════ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 16px 0 12px;
    font-size: 0.84rem;
    overflow-x: auto;
}

.breadcrumb a {
    color: var(--label-secondary);
    text-decoration: none;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 6px;
    transition: all var(--tr-fast);
}

.breadcrumb a:hover {
    color: var(--label-primary);
    background: var(--bg-secondary);
}

.breadcrumb .sep {
    color: var(--label-quaternary);
    font-size: 0.6rem;
    padding: 0 2px;
}

.breadcrumb .current {
    color: var(--label-primary);
    font-weight: 600;
    padding: 3px 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   STATS BAR
   ═══════════════════════════════════════════════════════════════════════════════ */
.stats-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0 14px;
    font-size: 0.78rem;
    color: var(--label-tertiary);
    letter-spacing: 0.01em;
}

.stats-bar .stat-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--label-quaternary);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FILE LIST
   ═══════════════════════════════════════════════════════════════════════════════ */
#fileContainer {
    background: var(--bg-elevated);
    border: 1px solid var(--separator);
    border-radius: var(--r);
    overflow: hidden;
}

.file-list-header {
    display: grid;
    grid-template-columns: 1fr 160px 100px 110px;
    gap: 12px;
    padding: 10px 20px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--label-quaternary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--separator-light);
}

.file-list-body {}

.file-row {
    display: grid;
    grid-template-columns: 1fr 160px 100px 110px;
    gap: 12px;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid var(--separator-light);
    cursor: pointer;
    transition: background var(--tr-fast);
    position: relative;
}

.file-row:hover {
    background: rgba(255,255,255,0.025);
}

.file-row:last-child { border-bottom: none; }

/* Row cells */
.file-row .col-name {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.file-row .item-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1rem;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--separator-light);
    transition: all var(--tr);
}

.file-row:hover .item-icon {
    border-color: var(--separator);
}

.file-row .item-thumb {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--separator-light);
}

.file-row .item-name {
    font-size: 0.88rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.file-row .col-date {
    font-size: 0.8rem;
    color: var(--label-tertiary);
    white-space: nowrap;
}

.file-row .col-size {
    font-size: 0.8rem;
    color: var(--label-tertiary);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.file-row .col-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.file-row .col-actions button {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--label-quaternary);
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    transition: all var(--tr-fast);
    opacity: 0;
}

.file-row:hover .col-actions button {
    opacity: 1;
}

.file-row .col-actions button:hover {
    background: var(--bg-tertiary);
    color: var(--label-primary);
}

.file-row .col-actions button.act-copy { color: var(--accent); }
.file-row .col-actions button.act-copy:hover { background: var(--accent-subtle); color: var(--accent); }
.file-row .col-actions button.act-delete:hover { color: var(--red); background: rgba(239,68,68,0.1); }

/* Variant badge */
.variant-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--accent-subtle);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--accent-hover);
    flex-shrink: 0;
    margin-left: 8px;
}

.variant-badge i {
    font-size: 0.6rem;
}

/* Icon colors */
.ic-folder { color: var(--blue); }
.ic-image { color: var(--pink); }
.ic-video { color: var(--orange); }
.ic-audio { color: var(--purple); }
.ic-code { color: var(--teal); }
.ic-doc { color: var(--indigo); }
.ic-archive { color: var(--yellow); }
.ic-pdf { color: var(--red); }
.ic-file { color: var(--label-tertiary); }

/* ═══════════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════════ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--label-quaternary);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1rem;
    color: var(--label-secondary);
    font-weight: 600;
    margin-bottom: 4px;
}

.empty-state p {
    font-size: 0.84rem;
    color: var(--label-tertiary);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s var(--ease);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-elevated);
    border: 1px solid var(--separator);
    border-radius: var(--r-lg);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: scale(0.96) translateY(8px);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
}

.modal-header h2 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--label-tertiary);
    cursor: pointer;
    font-size: 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--tr);
    line-height: 1;
}

.modal-close:hover {
    background: var(--bg-quaternary);
    color: var(--label-primary);
}

.modal-body { padding: 4px 24px 20px; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--separator-light);
}

.delete-message { font-size: 0.88rem; margin-bottom: 8px; line-height: 1.5; }
.delete-warning { font-size: 0.78rem; color: var(--label-tertiary); }
.move-label { font-size: 0.88rem; margin-bottom: 14px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--label-tertiary);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--separator);
    border-radius: var(--r-sm);
    color: var(--label-primary);
    font-family: var(--font);
    font-size: 0.88rem;
    outline: none;
    transition: all var(--tr);
}

.form-input:focus {
    border-color: var(--accent);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-input::placeholder { color: var(--label-quaternary); }

/* ═══════════════════════════════════════════════════════════════════════════════
   UPLOAD ZONE
   ═══════════════════════════════════════════════════════════════════════════════ */
.upload-zone {
    position: relative;
    border: 1.5px dashed var(--separator);
    border-radius: var(--r);
    padding: 44px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--tr-slow);
    background: var(--bg-primary);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.upload-zone i {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 14px;
    display: block;
    transition: transform var(--tr-slow);
}

.upload-zone:hover i,
.upload-zone.dragover i {
    transform: translateY(-2px);
}

.upload-zone h3 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--label-primary);
}

.upload-zone p {
    font-size: 0.78rem;
    color: var(--label-quaternary);
}

.upload-zone input[type="file"] { display: none; }

.upload-status {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--label-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PROGRESS
   ═══════════════════════════════════════════════════════════════════════════════ */
.progress-container {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    margin-top: 14px;
    overflow: hidden;
    display: none;
}

.progress-container.active { display: block; }

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s var(--ease);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--separator);
    border-radius: var(--r);
    font-size: 0.82rem;
    min-width: 260px;
    box-shadow: var(--shadow-md);
    animation: toastIn 0.35s var(--ease-spring);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.toast.success i { color: var(--green); }
.toast.error i { color: var(--red); }
.toast.info i { color: var(--accent); }

@keyframes toastIn {
    from { transform: translateX(24px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CONTEXT MENU
   ═══════════════════════════════════════════════════════════════════════════════ */
.context-menu {
    position: fixed;
    background: var(--bg-elevated);
    border: 1px solid var(--separator);
    border-radius: var(--r);
    padding: 5px;
    min-width: 190px;
    box-shadow: var(--shadow-lg);
    z-index: 1500;
    display: none;
    animation: ctxIn 0.15s var(--ease-out);
}

.context-menu.active { display: block; }

@keyframes ctxIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 0.82rem;
    color: var(--label-primary);
    border-radius: 7px;
    cursor: pointer;
    transition: background var(--tr-fast);
}

.ctx-item:hover { background: var(--bg-tertiary); }

.ctx-item i {
    width: 16px;
    text-align: center;
    color: var(--label-tertiary);
    font-size: 0.76rem;
}

.ctx-item.danger { color: var(--red); }
.ctx-item.danger i { color: var(--red); }

.ctx-divider {
    height: 1px;
    background: var(--separator-light);
    margin: 4px 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════════════════════════════════════════ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease);
    cursor: zoom-out;
}

.lightbox.active { opacity: 1; visibility: visible; }

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--r);
    object-fit: contain;
    box-shadow: var(--shadow-lg);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 38px;
    height: 38px;
    border: none;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--tr);
    backdrop-filter: blur(8px);
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.lightbox-bottom {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.lightbox-info {
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 7px 18px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
}

.lightbox-variants {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 4px;
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.variant-pill {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.55);
    font-family: var(--font);
    font-size: 0.76rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--tr-fast);
    white-space: nowrap;
}

.variant-pill:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.08);
}

.variant-pill.active {
    background: var(--accent);
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SPINNER
   ═══════════════════════════════════════════════════════════════════════════════ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--separator);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════════════════════
   FOLDER TREE (Move Modal)
   ═══════════════════════════════════════════════════════════════════════════════ */
.folder-tree {
    max-height: 240px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--separator-light);
    border-radius: var(--r-sm);
    padding: 5px;
}

.folder-tree-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.84rem;
    transition: all var(--tr-fast);
    color: var(--label-secondary);
}

.folder-tree-item:hover {
    background: var(--bg-tertiary);
    color: var(--label-primary);
}

.folder-tree-item.selected {
    background: var(--accent-muted);
    color: var(--accent-hover);
}

.folder-tree-item i {
    color: var(--blue);
    font-size: 0.85rem;
}

.folder-tree-item.selected i { color: var(--accent-hover); }

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .app { padding: 0 16px 32px; }

    .header {
        gap: 10px;
        padding: 12px 0;
        flex-wrap: wrap;
    }

    .header-search {
        max-width: 100%;
        order: 3;
        flex-basis: 100%;
    }

    .header-actions { margin-left: auto; }
    .header-actions .btn:not(.btn-icon):not(.btn-primary) { display: none; }

    .file-list-header { grid-template-columns: 1fr 80px 100px; padding: 10px 16px; }
    .file-list-header .col-date-head { display: none; }

    .file-row { grid-template-columns: 1fr 80px 100px; padding: 10px 16px; }
    .file-row .col-date { display: none; }
    .file-row .col-actions button { opacity: 1; }

    .modal { max-width: calc(100vw - 32px); }
}

@media (max-width: 480px) {
    .app { padding: 0 12px 24px; }
    .header-brand span { display: none; }

    .file-row .col-size { display: none; }
    .file-list-header { grid-template-columns: 1fr 100px; }
    .file-list-header .col-size-head { display: none; }
    .file-row { grid-template-columns: 1fr 100px; }
}
