/* ═══════════════════════════════════════════════════════════════
   CloudVault — Premium Design System
   Hand-crafted CSS for a modern, dark-themed file storage app
   ═══════════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─────────────────────────────────── */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-tertiary: #1a1a3e;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #e8e8f0;
    --text-secondary: #8888a8;
    --text-muted: #555570;
    --accent-purple: #7c3aed;
    --accent-blue: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #7c3aed, #3b82f6);
    --accent-glow: 0 0 20px rgba(124, 58, 237, 0.3);
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
    --header-height: 64px;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

img, video, audio {
    max-width: 100%;
    display: block;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

ul, ol {
    list-style: none;
}

/* ─── Custom Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.35);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.55);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.35) transparent;
}

/* ─── Typography ────────────────────────────────────────────── */
h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 1.125rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 500; }

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ─── Animated Starfield Background ─────────────────────────── */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: screen;
}

/* ─── Animated Background Orbs ──────────────────────────────── */
.bg-orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
}

.orb--purple {
    width: 600px;
    height: 600px;
    background: #7c3aed;
    top: -150px;
    right: -100px;
    animation: orbFloat1 25s ease-in-out infinite;
}

.orb--blue {
    width: 500px;
    height: 500px;
    background: #3b82f6;
    bottom: -120px;
    left: -80px;
    animation: orbFloat2 30s ease-in-out infinite;
}

.orb--indigo {
    width: 400px;
    height: 400px;
    background: #6366f1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbFloat3 20s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-80px, 60px) scale(1.1); }
    66% { transform: translate(40px, -40px) scale(0.9); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, -80px) scale(1.15); }
    66% { transform: translate(-50px, 30px) scale(0.95); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH SECTION
   ═══════════════════════════════════════════════════════════════ */
.auth {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth__card {
    width: 100%;
    max-width: 420px;
    background: rgba(18, 18, 42, 0.7);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(124, 58, 237, 0.08);
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth__brand {
    text-align: center;
    margin-bottom: 2rem;
}

.auth__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: var(--accent-gradient);
    border-radius: 20px;
    margin-bottom: 1rem;
    box-shadow: var(--accent-glow);
}

.auth__title {
    font-size: 1.75rem;
    font-weight: 300;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.auth__title span {
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth__subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ─── Auth Forms ────────────────────────────────────────────── */
.auth__form {
    animation: fadeSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.3s;
}

.input-wrapper input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    outline: none;
    transition: var(--transition);
}

.input-wrapper input:focus {
    border-color: var(--accent-purple);
    background: rgba(124, 58, 237, 0.06);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), var(--accent-glow);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
    color: var(--accent-purple);
}

.input-wrapper:has(input:focus) .input-icon {
    color: var(--accent-purple);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    outline: none;
    transition: var(--transition);
}

.input:focus {
    border-color: var(--accent-purple);
    background: rgba(124, 58, 237, 0.06);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.input::placeholder {
    color: var(--text-muted);
}

.auth__toggle {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

.auth__toggle a {
    color: var(--accent-blue);
    font-weight: 500;
    transition: color 0.2s;
}

.auth__toggle a:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn--primary {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    box-shadow: var(--accent-glow);
}

.btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.4), 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn--primary:active {
    transform: translateY(0);
}

.btn--secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.btn--secondary:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

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

.btn--danger:hover {
    background: #dc2626;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.btn--full {
    width: 100%;
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.dashboard {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: var(--header-height) 1fr;
    grid-template-areas:
        "header  header"
        "sidebar main";
    min-height: 100vh;
    animation: fadeIn 0.5s ease;
}

/* ─── Header ────────────────────────────────────────────────── */
.header {
    grid-area: header;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
}

.header__left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header__menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition);
}

.header__menu-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.header__brand-text {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: -0.02em;
}

.header__brand-text strong {
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Search ────────────────────────────────────────────────── */
.header__search {
    position: relative;
    flex: 1;
    max-width: 480px;
    margin: 0 2rem;
}

.header__search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.header__search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition);
}

.header__search-input:focus {
    border-color: var(--accent-purple);
    background: rgba(124, 58, 237, 0.06);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.header__search-input::placeholder {
    color: var(--text-muted);
}

/* ─── User Menu ─────────────────────────────────────────────── */
.header__right {
    position: relative;
}

.header__user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: var(--transition);
}

.header__user:hover {
    background: var(--bg-card-hover);
}

.header__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.header__username {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.header__user svg:last-child {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.header__user.open svg:last-child {
    transform: rotate(180deg);
}

/* ─── Dropdown ──────────────────────────────────────────────── */
.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 200;
}

.dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.dropdown__item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.dropdown__item--danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.dropdown__divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0.35rem 0;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════ */
.sidebar {
    grid-area: sidebar;
    width: var(--sidebar-width);
    background: rgba(18, 18, 42, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: calc(100vh - var(--header-height));
    position: sticky;
    top: var(--header-height);
    overflow-y: auto;
}

.sidebar__upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--accent-glow);
    transition: var(--transition);
}

.sidebar__upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
}

.sidebar__upload-btn:active {
    transform: translateY(0);
}

/* ─── Navigation ────────────────────────────────────────────── */
.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar__nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.sidebar__nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    background: var(--accent-gradient);
    border-radius: 0 3px 3px 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sidebar__nav-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.sidebar__nav-item--active {
    background: rgba(124, 58, 237, 0.1);
    color: var(--text-primary);
    font-weight: 500;
}

.sidebar__nav-item--active::before {
    transform: translateY(-50%) scaleY(1);
}

.sidebar__nav-item svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.sidebar__nav-item--active svg {
    opacity: 1;
    color: var(--accent-purple);
}

/* ─── Storage Indicator ─────────────────────────────────────── */
.sidebar__storage {
    margin-top: auto;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.storage__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.storage__header svg {
    color: var(--accent-purple);
}

.storage__bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.storage__bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.storage__bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.storage__text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════ */
.main {
    grid-area: main;
    padding: 1.5rem 2rem;
    min-height: calc(100vh - var(--header-height));
    position: relative;
}

/* ─── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.breadcrumb__item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.breadcrumb__item:hover {
    color: var(--text-secondary);
    background: var(--bg-card-hover);
}

.breadcrumb__item--active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb__separator {
    color: var(--text-muted);
    font-size: 0.75rem;
    user-select: none;
}

.breadcrumb__separator svg {
    width: 14px;
    height: 14px;
}

/* ─── Toolbar ───────────────────────────────────────────────── */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.toolbar__left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toolbar__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toolbar__sort-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238888a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: var(--transition);
}

.toolbar__sort-select:focus {
    border-color: var(--accent-purple);
}

.toolbar__sort-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.toolbar__view {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.toolbar__view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 34px;
    color: var(--text-muted);
    transition: var(--transition);
}

.toolbar__view-btn:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.toolbar__view-btn--active {
    color: var(--accent-purple);
    background: rgba(124, 58, 237, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   FILE GRID
   ═══════════════════════════════════════════════════════════════ */
.files--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    animation: fadeIn 0.3s ease;
}

.file-card {
    background: rgba(18, 18, 42, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.file-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(124, 58, 237, 0.5);
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.15), 0 0 15px rgba(59, 130, 246, 0.1);
}

.file-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    margin-bottom: 0.85rem;
}

.file-card__icon--folder {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.file-card__icon--image {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.file-card__icon--video {
    background: rgba(244, 63, 94, 0.12);
    color: #f43f5e;
}

.file-card__icon--audio {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.file-card__icon--pdf {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.file-card__icon--document {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.file-card__icon--archive {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

.file-card__icon--code {
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
}

.file-card__icon--default {
    background: rgba(107, 114, 128, 0.12);
    color: #6b7280;
}

.file-card__name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.35rem;
}

.file-card__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-card__meta span:not(:last-child)::after {
    content: '·';
    margin-left: 0.5rem;
    color: var(--text-muted);
}

/* ─── Star Button ─────────────────────────────────────────── */
.file-card {
    position: relative;
}

.star-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.2s ease;
    color: var(--text-muted);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-card:hover .star-btn,
.star-btn--active {
    opacity: 1 !important;
}

.star-btn:hover {
    background: rgba(251, 191, 36, 0.15);
    transform: scale(1.2);
}

.star-btn--active {
    color: #fbbf24;
}

/* ─── Selection Button & Selection Styles ──────────────────── */
.select-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: transparent;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-card:hover .select-btn,
.select-btn--active,
.has-selections .select-btn {
    opacity: 1;
}

.select-btn--active {
    background: var(--accent-blue) !important;
    border-color: var(--accent-blue) !important;
    color: #fff !important;
}

.select-btn:hover {
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Selected state styling */
.file-card--selected {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15), 0 0 15px rgba(59, 130, 246, 0.1) !important;
    transform: translateY(-3px) scale(1.02);
}

.file-list-item--selected {
    background: rgba(59, 130, 246, 0.08) !important;
    border-left: 3px solid var(--accent-blue) !important;
}

/* ─── Bulk Action Bar ─────────────────────────────────────────── */
.bulk-action-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    z-index: 1000;
    width: 90%;
    max-width: 520px;
    background: rgba(18, 18, 42, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(124, 58, 237, 0.15);
    padding: 0.75rem 1.25rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
}

.bulk-action-bar--active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.bulk-action-bar__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.bulk-action-bar__info {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.bulk-action-bar__count {
    color: #fff;
    background: var(--accent-blue);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    margin-right: 4px;
}

.bulk-action-bar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn--bulk-star {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.25);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.btn--bulk-star:hover {
    background: #fbbf24;
    color: #000;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}


/* ═══════════════════════════════════════════════════════════════
   FILE LIST VIEW
   ═══════════════════════════════════════════════════════════════ */
.files--list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: fadeIn 0.3s ease;
}

.files--list .file-list-header {
    display: grid;
    grid-template-columns: 1fr 100px 140px 48px;
    gap: 1rem;
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
}

.file-list-item {
    display: grid;
    grid-template-columns: 1fr 100px 140px 48px;
    gap: 1rem;
    align-items: center;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.file-list-item:hover {
    background: var(--bg-card-hover);
}

.file-list-item__name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    overflow: hidden;
}

.file-list-item__name span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-list-item__name .file-list-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
}

.file-list-item__size,
.file-list-item__date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-list-item__actions {
    display: flex;
    justify-content: flex-end;
}

.file-list-item__actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--text-muted);
    transition: var(--transition);
    opacity: 0;
}

.file-list-item:hover .file-list-item__actions button {
    opacity: 1;
}

.file-list-item__actions button:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════
   DROP ZONE
   ═══════════════════════════════════════════════════════════════ */
.dropzone {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 26, 0.92);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease;
}

.dropzone__content {
    text-align: center;
    padding: 4rem;
    border: 2px dashed var(--accent-purple);
    border-radius: var(--radius-xl);
    animation: pulse 2s ease-in-out infinite;
}

.dropzone__content svg {
    color: var(--accent-purple);
    margin-bottom: 1rem;
    animation: bounceUp 1.5s ease-in-out infinite;
}

.dropzone__content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.dropzone__content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

@keyframes bounceUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeSlideUp 0.5s ease;
}

.empty-state__icon {
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal__content--sm {
    max-width: 400px;
}

.modal__content--upload {
    max-width: 480px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.modal__header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: var(--transition);
}

.modal__close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.modal__body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--glass-border);
}

/* ─── Upload Progress Items ─────────────────────────────────── */
.upload-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.upload-item:last-child {
    border-bottom: none;
}

.upload-item__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.upload-item__info {
    flex: 1;
    min-width: 0;
}

.upload-item__name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-item__size {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.upload-item__progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.upload-item__progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.upload-item__progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s ease-in-out infinite;
}

.upload-item__status {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    white-space: nowrap;
}

.upload-item__status--uploading {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.upload-item__status--done {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.upload-item__status--error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════
   PREVIEW MODAL
   ═══════════════════════════════════════════════════════════════ */
.preview-modal {
    position: fixed;
    inset: 0;
    z-index: 700;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease;
}

.preview-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
}

.preview-modal__header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.preview-modal__title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-modal__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.preview-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition);
}

.preview-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.preview-modal__body {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: auto;
}

.preview-modal__body img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.preview-modal__body video,
.preview-modal__body audio {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-sm);
}

.preview-modal__body pre {
    width: 100%;
    max-width: 800px;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.preview-modal__body iframe {
    width: 100%;
    max-width: 900px;
    height: 80vh;
    border: none;
    border-radius: var(--radius-md);
    background: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   CONTEXT MENU
   ═══════════════════════════════════════════════════════════════ */
.context-menu {
    position: fixed;
    z-index: 800;
    min-width: 180px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.4rem;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.context-menu__item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.context-menu__item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.context-menu__item--danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.context-menu__divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0.3rem 0;
}

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
    color: var(--text-primary);
    pointer-events: auto;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 380px;
}

.toast--success {
    border-left: 3px solid var(--success);
}

.toast--error {
    border-left: 3px solid var(--danger);
}

.toast--warning {
    border-left: 3px solid var(--warning);
}

.toast--info {
    border-left: 3px solid var(--accent-blue);
}

.toast__icon {
    flex-shrink: 0;
}

.toast--success .toast__icon { color: var(--success); }
.toast--error .toast__icon { color: var(--danger); }
.toast--warning .toast__icon { color: var(--warning); }
.toast--info .toast__icon { color: var(--accent-blue); }

.toast__close {
    margin-left: auto;
    color: var(--text-muted);
    flex-shrink: 0;
    cursor: pointer;
    transition: color 0.2s;
}

.toast__close:hover {
    color: var(--text-primary);
}

.toast--exit {
    animation: slideOutRight 0.3s ease forwards;
}

/* ═══════════════════════════════════════════════════════════════
   SPINNER
   ═══════════════════════════════════════════════════════════════ */
.spinner-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 26, 0.7);
    backdrop-filter: blur(4px);
}

.spinner {
    position: relative;
    width: 56px;
    height: 56px;
}

.spinner__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}

.spinner__ring:nth-child(1) {
    border-top-color: var(--accent-purple);
    animation: spinnerRotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner__ring:nth-child(2) {
    border-right-color: var(--accent-blue);
    animation: spinnerRotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    animation-delay: -0.45s;
}

.spinner__ring:nth-child(3) {
    border-bottom-color: #6366f1;
    animation: spinnerRotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    animation-delay: -0.3s;
}

@keyframes spinnerRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════
   TOOLTIPS
   ═══════════════════════════════════════════════════════════════ */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    padding: 0.35rem 0.65rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* ═══════════════════════════════════════════════════════════════
   RENAME INPUT (inline)
   ═══════════════════════════════════════════════════════════════ */
.rename-input {
    width: 100%;
    padding: 0.25rem 0.5rem;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid var(--accent-purple);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   KEYFRAME ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(120%);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet & Mobile
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "main";
    }

    .header__menu-btn {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: var(--header-height);
        left: 0;
        bottom: 0;
        z-index: 300;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        background: var(--bg-secondary);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        top: var(--header-height);
        z-index: 250;
        background: rgba(0, 0, 0, 0.5);
        animation: fadeIn 0.2s ease;
    }

    .header__search {
        margin: 0 1rem;
    }

    .files--grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .file-list-header,
    .file-list-item {
        grid-template-columns: 1fr 80px 48px;
    }

    .file-list-item__date {
        display: none;
    }
}

@media (max-width: 640px) {
    .header__search {
        display: none;
    }

    .header__username {
        display: none;
    }

    .main {
        padding: 1rem;
    }

    .files--grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }

    .file-card {
        padding: 1rem;
    }

    .file-card__icon {
        width: 40px;
        height: 40px;
    }

    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .toast-container {
        right: 0.75rem;
        left: 0.75rem;
    }

    .toast {
        max-width: none;
    }

    .modal__content {
        margin: 0.5rem;
    }

    .auth__card {
        padding: 1.75rem;
    }

    .breadcrumb {
        margin-bottom: 1rem;
    }
}

/* ─── Selection highlight ───────────────────────────────────── */
::selection {
    background: rgba(124, 58, 237, 0.35);
    color: #fff;
}

/* ─── Focus-visible for accessibility ───────────────────────── */
:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

/* ─── Utility: visually hidden ──────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ─── Drag active state on file cards ───────────────────────── */
.file-card.drag-over {
    border-color: var(--accent-purple);
    background: rgba(124, 58, 237, 0.08);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

/* ─── Storage chart canvas styling ──────────────────────────── */
#storageChart {
    margin-top: 1rem;
    border-radius: var(--radius-sm);
}

/* ─── File card selected state ──────────────────────────────── */
.file-card--selected {
    border-color: var(--accent-purple);
    background: rgba(124, 58, 237, 0.08);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.file-list-item--selected {
    background: rgba(124, 58, 237, 0.08);
}

/* ─── Sidebar badge count ───────────────────────────────────── */
.sidebar__nav-item .badge {
    margin-left: auto;
    padding: 0.1rem 0.45rem;
    background: rgba(124, 58, 237, 0.2);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-purple);
}

/* ─── Inline file rename animation ──────────────────────────── */
.file-card--renaming .file-card__name {
    display: none;
}

.file-card--renaming .rename-input {
    animation: fadeIn 0.15s ease;
}

/* ─── Progress bar percentage text ──────────────────────────── */
.upload-item__percent {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-blue);
    min-width: 36px;
    text-align: right;
}

/* ─── Hover glow effect for primary buttons ─────────────────── */
.btn--primary::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: var(--accent-gradient);
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.3s;
    z-index: -1;
}

.btn--primary:hover::before {
    opacity: 0.5;
}

/* ─── Striped animation for loading states ──────────────────── */
@keyframes stripes {
    0% { background-position: 0 0; }
    100% { background-position: 40px 0; }
}

.loading-stripes {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.06) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.06) 75%,
        transparent 75%,
        transparent
    );
    background-size: 40px 40px;
    animation: stripes 0.8s linear infinite;
}

/* ─── Card appearing stagger ────────────────────────────────── */
.file-card:nth-child(1) { animation-delay: 0.02s; }
.file-card:nth-child(2) { animation-delay: 0.04s; }
.file-card:nth-child(3) { animation-delay: 0.06s; }
.file-card:nth-child(4) { animation-delay: 0.08s; }
.file-card:nth-child(5) { animation-delay: 0.10s; }
.file-card:nth-child(6) { animation-delay: 0.12s; }
.file-card:nth-child(7) { animation-delay: 0.14s; }
.file-card:nth-child(8) { animation-delay: 0.16s; }
.file-card:nth-child(9) { animation-delay: 0.18s; }
.file-card:nth-child(10) { animation-delay: 0.20s; }
.file-card:nth-child(11) { animation-delay: 0.22s; }
.file-card:nth-child(12) { animation-delay: 0.24s; }

/* ─── Prevent body scroll when modal open ───────────────────── */
body.modal-open {
    overflow: hidden;
}

/* ─── Transition groups ─────────────────────────────────────── */
.fade-enter {
    opacity: 0;
    transform: translateY(8px);
}

.fade-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s, transform 0.3s;
}

.fade-exit {
    opacity: 1;
}

.fade-exit-active {
    opacity: 0;
    transition: opacity 0.2s;
}

/* ─── Animated Smiling Cloud ────────────────────────────────── */
.animated-cloud {
    display: block;
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 10px 20px rgba(124, 58, 237, 0.15));
}

.cloud-body-group {
    animation: floatCloud 5s ease-in-out infinite;
}

.cloud-eyes {
    animation: blinkEyes 5s ease-in-out infinite;
}

.cloud-mouth {
    transition: all 0.3s ease;
}

.empty-state:hover .cloud-mouth {
    /* Widen smile on hover */
    d: path("M 55,66 Q 60,74 65,66");
}

@keyframes floatCloud {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(1deg);
    }
    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes blinkEyes {
    0%, 90%, 100% {
        transform: scaleY(1);
    }
    95% {
        transform: scaleY(0.1);
    }
}

/* ─── Logo Cloud Animation ──────────────────────────────────── */
.logo-cloud {
    animation: logoFloat 3.5s ease-in-out infinite;
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-cloud:hover {
    transform: scale(1.2) rotate(8deg);
    filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.5));
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-2.5px) rotate(2.5deg);
    }
}

