/* ============================================================
   ALPHAVAULT DRIVE — drive.css v1.1
   Full dark/light responsive — All text white/dark adaptive
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   1. CSS VARIABLES
════════════════════════════════════════════════════════════ */
:root {
    /* Backgrounds */
    --avd-bg:             #0b1120;
    --avd-sidebar-bg:     #0f172a;
    --avd-header-bg:      rgba(11, 17, 32, 0.97);
    --avd-card:           rgba(30, 41, 59, 0.92);
    --avd-card-hover:     rgba(51, 65, 85, 0.9);
    --avd-input-bg:       rgba(255, 255, 255, 0.06);
  
    /* Borders */
    --avd-border:         rgba(255, 255, 255, 0.08);
    --avd-border-hover:   rgba(255, 255, 255, 0.15);
  
    /* Text — ALL WHITE in dark mode */
    --avd-text:           #f0f4f8;
    --avd-text-muted:     #cbd5e1;
    --avd-text-dim:       #94a3b8;
  
    /* Brand */
    --avd-primary:        #667eea;
    --avd-primary-dark:   #764ba2;
    --avd-green:          #10b981;
    --avd-amber:          #f59e0b;
    --avd-red:            #ef4444;
    --avd-purple:         #8b5cf6;
  
    /* Radii */
    --avd-radius:         10px;
    --avd-radius-lg:      16px;
    --avd-radius-xl:      24px;
  
    /* Shadows */
    --avd-shadow:         0 4px 24px rgba(0,0,0,0.35);
    --avd-shadow-lg:      0 10px 50px rgba(0,0,0,0.55);
  
    /* Layout */
    --avd-sidebar-w:      260px;
    --avd-panel-w:        300px;
    --avd-header-h:       58px;
  
    --avd-transition:     all 0.2s ease;
  }
  
  /* ── Light mode overrides ─────────────────────────────────── */
  body.light-mode {
    --avd-bg:             #f1f5f9;
    --avd-sidebar-bg:     #ffffff;
    --avd-header-bg:      rgba(255, 255, 255, 0.97);
    --avd-card:           #ffffff;
    --avd-card-hover:     #f8fafc;
    --avd-input-bg:       rgba(0, 0, 0, 0.04);
    --avd-border:         rgba(0, 0, 0, 0.08);
    --avd-border-hover:   rgba(0, 0, 0, 0.15);
    --avd-text:           #1e293b;
    --avd-text-muted:     #475569;
    --avd-text-dim:       #94a3b8;
  }
  
  /* ════════════════════════════════════════════════════════════
     2. RESET & BASE
  ════════════════════════════════════════════════════════════ */
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  html, body {
    height: 100%;
    overflow: hidden;
  }
  
  body.avd-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--avd-bg);
    color: var(--avd-text);
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
  }
  
  a { color: inherit; text-decoration: none; }
  button { font-family: inherit; }
  
  /* Force all text white in dark mode */
  body.avd-page:not(.light-mode) * {
    color: inherit;
  }
  
  /* ════════════════════════════════════════════════════════════
     3. APP LAYOUT
  ════════════════════════════════════════════════════════════ */
  #avDriveApp {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
  }
  
  /* ── SIDEBAR ────────────────────────────────────────────── */
  #avdSidebar {
    width: var(--avd-sidebar-w);
    flex-shrink: 0;
    background: var(--avd-sidebar-bg);
    border-right: 1px solid var(--avd-border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: visible;   /* allow toggle btn to stick out */
    position: relative;
    z-index: 200;
    transition: width 0.25s ease, transform 0.3s ease;
  }
  
  body.light-mode #avdSidebar {
    box-shadow: 2px 0 20px rgba(0,0,0,0.08);
  }
  
  /* Collapsed state */
  #avdSidebar.collapsed {
    width: 64px;
  }
  #avdSidebar.collapsed .avd-nav-item-text,
  #avdSidebar.collapsed .avd-nav-badge,
  #avdSidebar.collapsed .avd-nav-label,
  #avdSidebar.collapsed .avd-new-btn-text,
  #avdSidebar.collapsed .avd-storage-meter,
  #avdSidebar.collapsed .avd-platform-nav,
  #avdSidebar.collapsed .avd-sidebar-user-trigger > div,
  #avdSidebar.collapsed #avdUserPlan,
  #avdSidebar.collapsed #avdUserChevron {
    display: none;
  }
  #avdSidebar.collapsed .avd-nav-item {
    justify-content: center;
    padding: 10px;
  }
  #avdSidebar.collapsed .avd-nav-item-icon { margin: 0; }
  #avdSidebar.collapsed .avd-new-btn {
    justify-content: center;
    padding: 10px;
    min-width: 0;
  }

  /* ── Collapsed : masquer les sections Sheet/Slide Folders ── */
    #avdSidebar.collapsed #avdNavSheetFolders,
    #avdSidebar.collapsed #avdNavSlideFolders {
        display: none;
    }

    /* Masquer aussi les labels "Sheet Folders" / "Slide Folders"
    et leurs boutons chevron */
    #avdSidebar.collapsed .avd-nav-section:has(#avdNavSheetFolders),
    #avdSidebar.collapsed .avd-nav-section:has(#avdNavSlideFolders) {
        display: none;
    }

    /* ── Collapsed : masquer Sheet/Slide Folders sections ─────── */
    #avdSidebar.collapsed #avdNavSheetSection,
    #avdSidebar.collapsed #avdNavSlideSection,
    #avdSidebar.collapsed #avdNavSheetFolders,
    #avdSidebar.collapsed #avdNavSlideFolders {
        display: none !important;
    }

  /* Logo collapsed vs expanded */
.avd-sidebar-logo-text { display: block; }
.avd-sidebar-logo-icon  { display: none;  }

#avdSidebar.collapsed .avd-sidebar-logo-text { display: none; }
#avdSidebar.collapsed .avd-sidebar-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 0 10px;
    width: 100%;
}
  
  /* Sidebar scroll area */
  .avd-sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .avd-sidebar-scroll::-webkit-scrollbar { width: 3px; }
  .avd-sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
  }
  body.light-mode .avd-sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
  }
  
  /* ── Sidebar collapse toggle button ──────────────────────── */
  .avd-sidebar-toggle {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--avd-text-muted);
    font-size: 10px;
    z-index: 300;
    transition: var(--avd-transition);
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    flex-shrink: 0;
  }
  body.light-mode .avd-sidebar-toggle {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  }
  .avd-sidebar-toggle:hover {
    background: var(--avd-primary);
    color: #fff;
    border-color: var(--avd-primary);
    box-shadow: 0 4px 16px rgba(102,126,234,0.5);
  }
  
  /* ── MAIN ──────────────────────────────────────────────── */
  #avdMain {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    min-width: 0;
    transition: margin-left 0.25s ease;
  }
  
  /* ── DETAILS PANEL ──────────────────────────────────────── */
  #avdDetailsPanel {
    width: 0;
    flex-shrink: 0;
    background: var(--avd-sidebar-bg);
    border-left: 1px solid var(--avd-border);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.25s ease;
  }
  #avdDetailsPanel.open {
    width: var(--avd-panel-w);
    overflow-y: auto;
  }
  body.light-mode #avdDetailsPanel {
    box-shadow: -2px 0 20px rgba(0,0,0,0.06);
  }
  
  /* ════════════════════════════════════════════════════════════
     4. HEADER
  ════════════════════════════════════════════════════════════ */
  #avDriveHeader {
    height: var(--avd-header-h);
    background: var(--avd-header-bg);
    border-bottom: 1px solid var(--avd-border);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    flex-shrink: 0;
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 100;
  }
  
  /* ── Breadcrumb ──────────────────────────────────────────── */
  .avd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .avd-breadcrumb-item {
    font-size: 12px;
    font-weight: 700;
    color: var(--avd-text-dim);
    cursor: pointer;
    transition: color 0.15s;
    white-space: nowrap;
  }
  .avd-breadcrumb-item:hover { color: var(--avd-text); }
  .avd-breadcrumb-item.active { color: var(--avd-text); }
  .avd-breadcrumb-sep { font-size: 9px; color: var(--avd-text-dim); }
  
  /* ── Search ──────────────────────────────────────────────── */
  .avd-search-wrap {
    flex: 1;
    max-width: 420px;
    position: relative;
    display: flex;
    align-items: center;
  }
  .avd-search-icon {
    position: absolute;
    left: 12px;
    color: var(--avd-text-dim);
    font-size: 12px;
    pointer-events: none;
    z-index: 1;
  }
  .avd-search-input {
    width: 100%;
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    border-radius: 10px;
    padding: 8px 36px 8px 34px;
    font-family: inherit;
    font-size: 12px;
    color: var(--avd-text);
    outline: none;
    transition: var(--avd-transition);
  }
  .avd-search-input::placeholder { color: var(--avd-text-dim); }
  .avd-search-input:focus {
    border-color: var(--avd-primary);
    background: rgba(102,126,234,0.07);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
  }
  .avd-search-clear {
    position: absolute;
    right: 10px;
    color: var(--avd-text-dim);
    cursor: pointer;
    font-size: 11px;
    transition: color 0.15s;
  }
  .avd-search-clear:hover { color: var(--avd-red); }
  .avd-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: #1e293b;
    border: 1px solid var(--avd-border);
    border-radius: 14px;
    padding: 6px;
    z-index: 2000;
    box-shadow: var(--avd-shadow-lg);
    display: none;
  }
  body.light-mode .avd-search-dropdown {
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  }
  
  /* ── Header controls ─────────────────────────────────────── */
  .avd-header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
  }
  
  /* Filter tabs */
  .avd-filter-tabs {
    display: flex;
    gap: 2px;
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    border-radius: 10px;
    padding: 3px;
  }
  .avd-filter-tab {
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--avd-text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--avd-transition);
    white-space: nowrap;
  }
  .avd-filter-tab.active { background: var(--avd-primary); color: #fff; }
  .avd-filter-tab:not(.active):hover { color: var(--avd-text); }
  
  /* Sort */
  .avd-sort-wrap { position: relative; }
  .avd-sort-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1e293b;
    border: 1px solid var(--avd-border);
    border-radius: 14px;
    padding: 6px;
    min-width: 190px;
    z-index: 2000;
    box-shadow: var(--avd-shadow-lg);
  }
  body.light-mode .avd-sort-dropdown { background: #ffffff; }
  .avd-sort-dropdown.open { display: block; }
  .avd-sort-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--avd-text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--avd-transition);
  }
  .avd-sort-option i { font-size: 12px; width: 14px; text-align: center; }
  .avd-sort-option:hover { background: rgba(255,255,255,0.06); color: var(--avd-text); }
  body.light-mode .avd-sort-option:hover { background: rgba(0,0,0,0.04); }
  .avd-sort-option.active { color: var(--avd-primary); background: rgba(102,126,234,0.1); }
  
  /* View toggle */
  .avd-view-toggle {
    display: flex;
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    border-radius: 10px;
    overflow: hidden;
  }
  .avd-view-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--avd-text-muted);
    font-size: 13px;
    border: none;
    background: transparent;
    transition: var(--avd-transition);
  }
  .avd-view-btn.active { background: var(--avd-primary); color: #fff; }
  .avd-view-btn:not(.active):hover {
    background: rgba(255,255,255,0.08);
    color: var(--avd-text);
  }
  body.light-mode .avd-view-btn:not(.active):hover { background: rgba(0,0,0,0.06); }
  
  /* Header button */
  .avd-header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--avd-text-muted);
    cursor: pointer;
    transition: var(--avd-transition);
    white-space: nowrap;
  }
  .avd-header-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--avd-text);
    border-color: var(--avd-border-hover);
  }
  body.light-mode .avd-header-btn:hover { background: rgba(0,0,0,0.06); }
  
  /* Theme toggle */
  .avd-theme-toggle {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    border-radius: 10px;
    cursor: pointer;
    color: var(--avd-text-muted);
    font-size: 14px;
    transition: var(--avd-transition);
    flex-shrink: 0;
  }
  .avd-theme-toggle:hover {
    background: rgba(245,158,11,0.12);
    color: var(--avd-amber);
    border-color: rgba(245,158,11,0.3);
  }
  body.light-mode .avd-theme-toggle:hover {
    background: rgba(102,126,234,0.1);
    color: var(--avd-primary);
    border-color: rgba(102,126,234,0.2);
  }
  
  /* Status dot */
  .avd-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #475569;
    transition: var(--avd-transition);
    flex-shrink: 0;
  }
  .avd-status-dot.connected  { background: var(--avd-green); box-shadow: 0 0 8px rgba(16,185,129,0.6); }
  .avd-status-dot.syncing    { background: var(--avd-amber); animation: pulseDot 1s infinite; }
  .avd-status-dot.error      { background: var(--avd-red); box-shadow: 0 0 8px rgba(239,68,68,0.6); }
  @keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
  }
  
  /* ════════════════════════════════════════════════════════════
     5. SIDEBAR NAV
  ════════════════════════════════════════════════════════════ */
  .avd-nav { padding: 4px 8px; }
  
  .avd-nav-section { margin-bottom: 6px; }
  
  .avd-nav-label {
    padding: 10px 10px 5px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--avd-text-dim);
  }
  
  .avd-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--avd-transition);
    color: var(--avd-text-muted);
    position: relative;
    margin-bottom: 2px;
  }
  .avd-nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--avd-text);
  }
  body.light-mode .avd-nav-item:hover {
    background: rgba(0,0,0,0.04);
    color: #1e293b;
  }
  .avd-nav-item.active {
    background: rgba(102,126,234,0.13);
    color: var(--avd-primary);
  }
  .avd-nav-item-icon {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
  }
  .avd-nav-item-text {
    flex: 1;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .avd-nav-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    background: rgba(102,126,234,0.18);
    color: #a5b4fc;
    min-width: 22px;
    text-align: center;
    flex-shrink: 0;
  }
  .avd-nav-subfolder {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 30px;
    font-size: 11px;
    font-weight: 600;
    color: var(--avd-text-dim);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--avd-transition);
    margin-bottom: 1px;
  }
  .avd-nav-subfolder:hover {
    background: rgba(255,255,255,0.04);
    color: var(--avd-text-muted);
  }
  body.light-mode .avd-nav-subfolder:hover { color: #475569; }
  
  /* ════════════════════════════════════════════════════════════
     6. PLATFORM NAV (sidebar)
  ════════════════════════════════════════════════════════════ */
  .avd-platform-nav { padding: 0 0 8px; }
  
  .avd-platform-section { margin-bottom: 1px; }
  
  .avd-platform-folder {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--avd-text-muted);
    cursor: pointer;
    border-radius: 10px;
    margin: 0 8px;
    transition: var(--avd-transition);
    position: relative;
    background: none;
    border: none;
    width: calc(100% - 16px);
    text-align: left;
  }
  .avd-platform-folder:hover {
    background: rgba(255,255,255,0.05);
    color: var(--avd-text);
  }
  body.light-mode .avd-platform-folder:hover {
    background: rgba(0,0,0,0.04);
    color: #1e293b;
  }
  .avd-platform-folder i:first-child {
    font-size: 13px;
    width: 16px;
    text-align: center;
  }
  .avd-platform-folder .arrow {
    margin-left: auto;
    font-size: 9px;
    transition: transform 0.2s;
  }
  .avd-platform-folder.open .arrow { transform: rotate(180deg); }
  
  .avd-platform-submenu { display: none; padding: 2px 0; }
  .avd-platform-submenu.open { display: block; }
  
  .avd-platform-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 36px;
    font-size: 11px;
    font-weight: 500;
    color: var(--avd-text-dim);
    text-decoration: none;
    border-radius: 8px;
    margin: 0 8px;
    transition: var(--avd-transition);
  }
  .avd-platform-link:hover {
    background: rgba(255,255,255,0.04);
    color: var(--avd-text-muted);
  }
  body.light-mode .avd-platform-link:hover {
    background: rgba(0,0,0,0.04);
    color: #475569;
  }
  .avd-platform-link.active {
    color: var(--avd-primary);
    background: rgba(102,126,234,0.08);
  }
  .avd-platform-link i {
    font-size: 11px;
    width: 14px;
    text-align: center;
  }
  .avd-platform-divider {
    border: none;
    border-top: 1px solid var(--avd-border);
    margin: 8px 16px;
  }
  
  .nav-badge-pill {
    font-size: 8px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(102,126,234,0.18);
    color: #a5b4fc;
    margin-left: auto;
  }
  
  /* ════════════════════════════════════════════════════════════
     7. NEW BUTTON & DROPDOWN
  ════════════════════════════════════════════════════════════ */
  .avd-new-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--avd-primary) 0%, var(--avd-primary-dark) 100%);
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    color: #fff !important;
    cursor: pointer;
    transition: var(--avd-transition);
    box-shadow: 0 4px 16px rgba(102,126,234,0.35);
  }
  .avd-new-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(102,126,234,0.5);
  }
  .avd-new-btn-text { flex: 1; text-align: left; }
  
  .avd-new-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 10px;
    right: 10px;
    background: #1a2235;
    border: 1px solid var(--avd-border);
    border-radius: 16px;
    padding: 8px;
    z-index: 600;
    box-shadow: var(--avd-shadow-lg);
  }
  body.light-mode .avd-new-dropdown {
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  }
  .avd-new-dropdown.open { display: block; }
  
  .avd-new-drop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--avd-transition);
  }
  .avd-new-drop-item:hover { background: rgba(255,255,255,0.05); }
  body.light-mode .avd-new-drop-item:hover { background: rgba(0,0,0,0.04); }
  
  .avd-new-drop-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .avd-new-drop-icon.sheet  { background: rgba(16,185,129,0.12); }
  .avd-new-drop-icon.slide  { background: rgba(102,126,234,0.12); }
  .avd-new-drop-icon.folder { background: rgba(245,158,11,0.12); }
  .avd-new-drop-icon.upload { background: rgba(100,116,139,0.12); }
  
  .avd-new-drop-divider {
    border: none;
    border-top: 1px solid var(--avd-border);
    margin: 4px 0;
  }
  
  /* ════════════════════════════════════════════════════════════
     8. STORAGE METER
  ════════════════════════════════════════════════════════════ */
  .avd-storage-meter {
    padding: 12px 14px;
    border-top: 1px solid var(--avd-border);
    flex-shrink: 0;
  }
  .avd-storage-label {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    color: var(--avd-text-muted);
    margin-bottom: 7px;
  }
  .avd-storage-bar {
    height: 4px;
    background: rgba(255,255,255,0.07);
    border-radius: 4px;
    overflow: hidden;
  }
  body.light-mode .avd-storage-bar { background: rgba(0,0,0,0.08); }
  .avd-storage-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--avd-primary), var(--avd-purple));
    border-radius: 4px;
    transition: width 0.5s ease;
  }
  .avd-storage-info {
    font-size: 9px;
    color: var(--avd-text-dim);
    margin-top: 5px;
  }
  
  /* ════════════════════════════════════════════════════════════
     9. CONTENT AREA
  ════════════════════════════════════════════════════════════ */
  #avDriveContent {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 22px 26px;
  }
  #avDriveContent::-webkit-scrollbar { width: 5px; }
  #avDriveContent::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
  }
  body.light-mode #avDriveContent::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.12);
  }
  
  .avd-view { display: none; }
  .avd-view.active {
    display: block;
    animation: avdFadeIn 0.2s ease;
  }
  @keyframes avdFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  
  /* Section title */
  .avd-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--avd-text);
    margin-bottom: 14px;
    margin-top: 26px;
  }
  .avd-section-title:first-child { margin-top: 0; }
  .avd-section-title i { color: var(--avd-primary); font-size: 13px; }
  
  /* Shared header */
  .avd-shared-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--avd-text);
    margin-bottom: 14px;
  }
  
  /* ════════════════════════════════════════════════════════════
     10. HOME VIEW
  ════════════════════════════════════════════════════════════ */
  .avd-home-hero {
    background: linear-gradient(135deg, rgba(102,126,234,0.14), rgba(118,75,162,0.09));
    border: 1px solid rgba(102,126,234,0.2);
    border-radius: var(--avd-radius-xl);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
  }
  body.light-mode .avd-home-hero {
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.05));
  }
  .avd-home-hero-text h2 {
    font-size: 22px;
    font-weight: 900;
    color: var(--avd-text);
    margin-bottom: 6px;
    line-height: 1.3;
  }
  .avd-home-hero-text p {
    font-size: 13px;
    color: var(--avd-text-muted);
  }
  .avd-home-hero-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
  }
  
  /* Stats grid */
  .avd-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
  }
  .avd-stat-card {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius-lg);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--avd-transition);
  }
  .avd-stat-card:hover {
    border-color: var(--avd-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--avd-shadow);
  }
  .avd-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
  }
  .avd-stat-icon.sheets  { background: rgba(16,185,129,0.12); color: var(--avd-green); }
  .avd-stat-icon.slides  { background: rgba(102,126,234,0.12); color: var(--avd-primary); }
  .avd-stat-icon.shared  { background: rgba(245,158,11,0.12); color: var(--avd-amber); }
  .avd-stat-icon.storage { background: rgba(139,92,246,0.12); color: var(--avd-purple); }
  .avd-stat-value {
    font-size: 22px;
    font-weight: 900;
    color: var(--avd-text);
  }
  .avd-stat-label {
    font-size: 10px;
    color: var(--avd-text-dim);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 2px;
  }
  
  /* Quick access */
  .avd-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
  }
  .avd-quick-card {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--avd-transition);
  }
  .avd-quick-card:hover {
    border-color: rgba(102,126,234,0.4);
    transform: translateY(-3px);
    box-shadow: var(--avd-shadow);
  }
  .avd-quick-card-thumb {
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
  }
  .avd-quick-card-thumb.sheet { background: rgba(16,185,129,0.07); }
  .avd-quick-card-thumb.slide { background: rgba(102,126,234,0.07); }
  .avd-quick-card-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--avd-text);
    padding: 8px 10px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .avd-quick-card-meta {
    font-size: 10px;
    color: var(--avd-text-dim);
    padding: 0 10px 9px;
  }
  
  /* Activity feed */
  .avd-activity-feed {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius-lg);
    overflow: hidden;
  }
  .avd-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--avd-border);
    font-size: 12px;
    font-weight: 800;
    color: var(--avd-text);
  }
  .avd-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    cursor: pointer;
    transition: var(--avd-transition);
    border-bottom: 1px solid var(--avd-border);
  }
  .avd-activity-item:last-child { border-bottom: none; }
  .avd-activity-item:hover { background: rgba(255,255,255,0.02); }
  body.light-mode .avd-activity-item:hover { background: rgba(0,0,0,0.02); }
  .avd-activity-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
  }
  .avd-activity-icon.sheet { background: rgba(16,185,129,0.1); color: var(--avd-green); }
  .avd-activity-icon.slide { background: rgba(102,126,234,0.1); color: var(--avd-primary); }
  .avd-activity-info { flex: 1; min-width: 0; }
  .avd-activity-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--avd-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .avd-activity-action { font-size: 10px; color: var(--avd-text-dim); margin-top: 2px; }
  .avd-activity-time { font-size: 10px; color: var(--avd-text-dim); flex-shrink: 0; }
  
  /* ════════════════════════════════════════════════════════════
     11. FILE CARDS (Grid view)
  ════════════════════════════════════════════════════════════ */
  .avd-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
  }
  .avd-file-card {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--avd-transition);
    position: relative;
  }
  .avd-file-card:hover {
    border-color: rgba(102,126,234,0.4);
    box-shadow: 0 8px 28px rgba(0,0,0,0.28);
    transform: translateY(-2px);
  }
  .avd-file-card.selected {
    border-color: var(--avd-primary);
    background: rgba(102,126,234,0.08);
    box-shadow: 0 0 0 2px rgba(102,126,234,0.25);
  }
  
  .avd-file-card-thumb {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  .avd-file-card-thumb.sheet-bg { background: rgba(16,185,129,0.07); }
  .avd-file-card-thumb.slide-bg { background: rgba(102,126,234,0.07); }
  
  .avd-file-card-check {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(102,126,234,0.85);
    border: 2px solid var(--avd-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #fff;
    opacity: 0;
    transition: var(--avd-transition);
    cursor: pointer;
    z-index: 2;
  }
  .avd-file-card:hover .avd-file-card-check,
  .avd-file-card.selected .avd-file-card-check { opacity: 1; }
  
  .avd-file-card-fav {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    opacity: 0;
    transition: var(--avd-transition);
    cursor: pointer;
    z-index: 2;
  }
  .avd-file-card:hover .avd-file-card-fav { opacity: 1; }
  .avd-file-card-fav.active { opacity: 1; color: var(--avd-amber); }
  
  .avd-file-card-body { padding: 10px 12px 6px; }
  .avd-file-card-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--avd-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
  }
  .avd-file-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--avd-text-dim);
  }
  .avd-file-card-type {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .avd-file-card-type.sheet { background: rgba(16,185,129,0.12); color: var(--avd-green); }
  .avd-file-card-type.slide { background: rgba(102,126,234,0.12); color: var(--avd-primary); }
  
  .avd-file-card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px 10px;
    opacity: 0;
    transition: var(--avd-transition);
    flex-wrap: wrap;
  }
  .avd-file-card:hover .avd-file-card-actions { opacity: 1; }
  
  .avd-file-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    border: none;
    background: rgba(255,255,255,0.06);
    color: var(--avd-text-muted);
    font-size: 10px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--avd-transition);
  }
  .avd-file-action-btn:hover { background: rgba(255,255,255,0.12); color: var(--avd-text); }
  .avd-file-action-btn.open {
    background: rgba(102,126,234,0.12);
    color: var(--avd-primary);
  }
  .avd-file-action-btn.open:hover { background: rgba(102,126,234,0.22); }
  .avd-file-action-btn.delete:hover {
    background: rgba(239,68,68,0.12);
    color: var(--avd-red);
  }
  
  /* ════════════════════════════════════════════════════════════
     12. FILE LIST (List view)
  ════════════════════════════════════════════════════════════ */
  .avd-file-list {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius-lg);
    overflow: hidden;
  }
  .avd-file-list-header {
    display: grid;
    grid-template-columns: 28px 1fr 120px 80px 80px 140px;
    gap: 8px;
    padding: 9px 16px;
    font-size: 10px;
    font-weight: 800;
    color: var(--avd-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--avd-border);
    background: rgba(255,255,255,0.02);
  }
  body.light-mode .avd-file-list-header { background: rgba(0,0,0,0.02); }
  .avd-file-row {
    display: grid;
    grid-template-columns: 28px 1fr 120px 80px 80px 140px;
    gap: 8px;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: var(--avd-transition);
    border-bottom: 1px solid var(--avd-border);
  }
  .avd-file-row:last-child { border-bottom: none; }
  .avd-file-row:hover { background: rgba(255,255,255,0.02); }
  body.light-mode .avd-file-row:hover { background: rgba(0,0,0,0.02); }
  .avd-file-row.selected { background: rgba(102,126,234,0.07); }
  
  .avd-file-row-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--avd-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #fff;
    cursor: pointer;
    transition: var(--avd-transition);
    flex-shrink: 0;
  }
  .avd-file-row:hover .avd-file-row-check { border-color: var(--avd-primary); }
  .avd-file-row.selected .avd-file-row-check {
    background: var(--avd-primary);
    border-color: var(--avd-primary);
  }
  .avd-file-row-name {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .avd-file-row-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
  }
  .avd-file-row-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--avd-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .avd-file-row-cell {
    font-size: 11px;
    color: var(--avd-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .avd-file-row-actions {
    display: flex;
    gap: 3px;
    opacity: 0;
    transition: var(--avd-transition);
  }
  .avd-file-row:hover .avd-file-row-actions { opacity: 1; }
  .avd-file-row-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background: rgba(255,255,255,0.06);
    color: var(--avd-text-muted);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--avd-transition);
  }
  .avd-file-row-btn:hover { background: rgba(255,255,255,0.12); color: var(--avd-text); }
  .avd-file-row-btn.delete:hover {
    background: rgba(239,68,68,0.12);
    color: var(--avd-red);
  }
  
  /* ════════════════════════════════════════════════════════════
     13. FOLDER CARDS
  ════════════════════════════════════════════════════════════ */
  .avd-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
  }
  .avd-folder-card {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--avd-radius-lg);
    padding: 14px;
    cursor: pointer;
    transition: var(--avd-transition);
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
  }
  .avd-folder-card:hover {
    border-color: rgba(245,158,11,0.35);
    box-shadow: var(--avd-shadow);
    transform: translateY(-2px);
  }
  .avd-folder-icon { font-size: 28px; margin-bottom: 2px; }
  .avd-folder-info { flex: 1; min-width: 0; }
  .avd-folder-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--avd-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .avd-folder-meta { font-size: 10px; color: var(--avd-text-dim); margin-top: 2px; }
  .avd-folder-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--avd-transition);
    margin-top: 4px;
  }
  .avd-folder-card:hover .avd-folder-actions { opacity: 1; }
  .avd-folder-action-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background: rgba(255,255,255,0.06);
    color: var(--avd-text-muted);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--avd-transition);
  }
  .avd-folder-action-btn:hover { background: rgba(255,255,255,0.1); color: var(--avd-text); }
  .avd-folder-action-btn.delete:hover {
    background: rgba(239,68,68,0.12);
    color: var(--avd-red);
  }
  
  /* ════════════════════════════════════════════════════════════
     14. DETAILS PANEL
  ════════════════════════════════════════════════════════════ */
  .avd-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    border-bottom: 1px solid var(--avd-border);
    flex-shrink: 0;
  }
  .avd-panel-title { font-size: 13px; font-weight: 800; color: var(--avd-text); }
  .avd-panel-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--avd-border);
    background: var(--avd-input-bg);
    color: var(--avd-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--avd-transition);
  }
  .avd-panel-close:hover { background: rgba(239,68,68,0.1); color: var(--avd-red); }
  
  .avd-panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--avd-border);
    flex-shrink: 0;
  }
  .avd-panel-tab {
    flex: 1;
    padding: 10px 6px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--avd-text-dim);
    cursor: pointer;
    transition: var(--avd-transition);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }
  .avd-panel-tab:hover { color: var(--avd-text-muted); }
  .avd-panel-tab.active { color: var(--avd-primary); border-bottom-color: var(--avd-primary); }
  
  .avd-panel-body { flex: 1; overflow-y: auto; }
  .avd-panel-tab-content { display: none; }
  .avd-panel-tab-content.active { display: block; }
  
  .avd-panel-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--avd-border);
    flex-shrink: 0;
  }
  .avd-panel-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--avd-border);
    background: var(--avd-input-bg);
    color: var(--avd-text-muted);
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--avd-transition);
    flex: 1;
    justify-content: center;
  }
  .avd-panel-action-btn:hover { background: rgba(255,255,255,0.08); color: var(--avd-text); }
  body.light-mode .avd-panel-action-btn:hover { background: rgba(0,0,0,0.06); }
  .avd-panel-action-btn.primary {
    background: rgba(102,126,234,0.12);
    color: var(--avd-primary);
    border-color: rgba(102,126,234,0.2);
  }
  .avd-panel-action-btn.primary:hover { background: rgba(102,126,234,0.22); }
  
  /* Details content */
  .avd-details-thumb {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .avd-details-thumb.sheet-bg { background: rgba(16,185,129,0.07); }
  .avd-details-thumb.slide-bg { background: rgba(102,126,234,0.07); }
  .avd-details-section-title {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--avd-text-dim);
    margin-bottom: 10px;
  }
  .avd-details-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid var(--avd-border);
    gap: 8px;
  }
  .avd-details-info-row:last-child { border-bottom: none; }
  .avd-details-label { font-size: 11px; font-weight: 600; color: var(--avd-text-muted); flex-shrink: 0; }
  .avd-details-value { font-size: 11px; font-weight: 700; color: var(--avd-text); text-align: right; }
  
  /* ════════════════════════════════════════════════════════════
     15. MULTI-SELECT BAR
  ════════════════════════════════════════════════════════════ */
  .avd-select-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5000;
    box-shadow: 0 8px 48px rgba(0,0,0,0.55);
    backdrop-filter: blur(20px);
    flex-wrap: wrap;
  }
  body.light-mode .avd-select-bar {
    background: #ffffff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  }
  .avd-select-count {
    font-size: 12px;
    font-weight: 800;
    color: var(--avd-text);
    margin-right: 6px;
    white-space: nowrap;
  }
  .avd-select-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--avd-border);
    background: var(--avd-input-bg);
    color: var(--avd-text-muted);
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--avd-transition);
    white-space: nowrap;
  }
  .avd-select-action:hover { background: rgba(255,255,255,0.1); color: var(--avd-text); }
  body.light-mode .avd-select-action:hover { background: rgba(0,0,0,0.06); }
  .avd-select-action.danger:hover {
    background: rgba(239,68,68,0.12);
    color: var(--avd-red);
  }
  .avd-select-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--avd-border);
    background: transparent;
    color: var(--avd-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-left: 4px;
    transition: var(--avd-transition);
  }
  .avd-select-close:hover { color: var(--avd-red); border-color: var(--avd-red); }
  
  /* ════════════════════════════════════════════════════════════
     16. CONTEXT MENU
  ════════════════════════════════════════════════════════════ */
  .avd-context-menu {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 6px;
    min-width: 210px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.55);
    z-index: 20000;
  }
  body.light-mode .avd-context-menu {
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  }
  .avd-ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--avd-text-muted);
    cursor: pointer;
    transition: var(--avd-transition);
  }
  .avd-ctx-item:hover { background: rgba(255,255,255,0.07); color: var(--avd-text); }
  body.light-mode .avd-ctx-item:hover { background: rgba(0,0,0,0.04); }
  .avd-ctx-item.danger { color: var(--avd-red); }
  .avd-ctx-item.danger:hover { background: rgba(239,68,68,0.1); }
  .avd-ctx-item i { font-size: 12px; width: 14px; text-align: center; }
  
  /* ════════════════════════════════════════════════════════════
     17. MODALS
  ════════════════════════════════════════════════════════════ */
  .avd-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }
  .avd-modal {
    background: #1a2235;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--avd-radius-xl);
    max-width: 440px;
    width: 100%;
    box-shadow: var(--avd-shadow-lg);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
  }
  body.light-mode .avd-modal {
    background: #ffffff;
    border-color: rgba(0,0,0,0.1);
  }
  .avd-modal-lg { max-width: 580px; }
  
  .avd-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--avd-border);
    flex-shrink: 0;
  }
  .avd-modal-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--avd-text);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .avd-modal-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--avd-border);
    background: var(--avd-input-bg);
    color: var(--avd-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--avd-transition);
  }
  .avd-modal-close:hover { background: rgba(239,68,68,0.1); color: var(--avd-red); }
  .avd-modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
  .avd-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid var(--avd-border);
    flex-shrink: 0;
  }
  
  /* Form elements */
  .avd-input-group { margin-bottom: 16px; }
  .avd-input-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--avd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
  }
  .avd-input {
    width: 100%;
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 13px;
    color: var(--avd-text);
    outline: none;
    transition: var(--avd-transition);
  }
  .avd-input::placeholder { color: var(--avd-text-dim); }
  .avd-input:focus {
    border-color: var(--avd-primary);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
  }
  .avd-input option { background: #1e293b; color: var(--avd-text); }
  body.light-mode .avd-input option { background: #ffffff; }
  
  /* Type selector */
  .avd-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .avd-type-card {
    background: var(--avd-input-bg);
    border: 2px solid var(--avd-border);
    border-radius: 12px;
    padding: 16px 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--avd-transition);
  }
  .avd-type-card:hover { border-color: var(--avd-primary); }
  .avd-type-card.active {
    border-color: var(--avd-primary);
    background: rgba(102,126,234,0.1);
  }
  .avd-type-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
  }
  .avd-type-icon.sheet  { background: rgba(16,185,129,0.1); }
  .avd-type-icon.slide  { background: rgba(102,126,234,0.1); }
  .avd-type-icon.folder { background: rgba(245,158,11,0.1); }
  .avd-type-name { font-size: 12px; font-weight: 800; color: var(--avd-text); margin-bottom: 3px; }
  .avd-type-desc { font-size: 10px; color: var(--avd-text-dim); line-height: 1.4; }
  
  /* Color picker */
  .avd-color-options { display: flex; gap: 8px; flex-wrap: wrap; }
  .avd-color-opt {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--avd-transition);
    border: 3px solid transparent;
  }
  .avd-color-opt:hover { transform: scale(1.15); }
  .avd-color-opt.active { border-color: #fff; box-shadow: 0 0 0 2px var(--avd-primary); }
  
  /* Drop zone */
  .avd-drop-zone {
    border: 2px dashed rgba(102,126,234,0.3);
    border-radius: 14px;
    padding: 36px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--avd-transition);
    background: rgba(102,126,234,0.04);
  }
  .avd-drop-zone:hover,
  .avd-drop-zone.drag-over {
    border-color: var(--avd-primary);
    background: rgba(102,126,234,0.08);
  }
  .avd-drop-zone-icon { font-size: 36px; color: var(--avd-primary); margin-bottom: 10px; }
  .avd-drop-zone-text { font-size: 14px; font-weight: 800; color: var(--avd-text); margin-bottom: 4px; }
  .avd-drop-zone-sub { font-size: 11px; color: var(--avd-text-dim); }
  
  /* ════════════════════════════════════════════════════════════
     18. BUTTONS
  ════════════════════════════════════════════════════════════ */
  .avd-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--avd-transition);
    border: 1px solid transparent;
    text-decoration: none;
  }
  .avd-btn-primary {
    background: linear-gradient(135deg, var(--avd-primary), var(--avd-primary-dark));
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(102,126,234,0.35);
  }
  .avd-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(102,126,234,0.5);
  }
  .avd-btn-secondary {
    background: var(--avd-input-bg);
    border-color: var(--avd-border);
    color: var(--avd-text-muted);
  }
  .avd-btn-secondary:hover { background: rgba(255,255,255,0.1); color: var(--avd-text); }
  body.light-mode .avd-btn-secondary:hover { background: rgba(0,0,0,0.06); }
  .avd-btn-sm { padding: 5px 12px; font-size: 11px; }
  
  /* ════════════════════════════════════════════════════════════
     19. BADGES
  ════════════════════════════════════════════════════════════ */
  .avd-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
  }
  .avd-badge-shared { background: rgba(102,126,234,0.18); color: var(--avd-primary); }
  
  /* ════════════════════════════════════════════════════════════
     20. EMPTY STATES & LOADING
  ════════════════════════════════════════════════════════════ */
  .avd-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    grid-column: 1 / -1;
  }
  .avd-empty-icon {
    font-size: 46px;
    color: var(--avd-text-dim);
    margin-bottom: 16px;
    display: block;
  }
  .avd-empty-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--avd-text-muted);
    margin-bottom: 6px;
  }
  .avd-empty-sub {
    font-size: 12px;
    color: var(--avd-text-dim);
    line-height: 1.5;
    margin-bottom: 20px;
  }
  .avd-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--avd-text-dim);
    font-size: 12px;
    font-weight: 600;
  }
  .avd-skeleton {
    background: linear-gradient(
      90deg,
      rgba(255,255,255,0.04) 25%,
      rgba(255,255,255,0.09) 50%,
      rgba(255,255,255,0.04) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--avd-radius-lg);
  }
  body.light-mode .avd-skeleton {
    background: linear-gradient(
      90deg,
      rgba(0,0,0,0.04) 25%,
      rgba(0,0,0,0.09) 50%,
      rgba(0,0,0,0.04) 75%
    );
    background-size: 200% 100%;
  }
  .avd-skeleton-card { height: 148px; }
  @keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  
  /* ════════════════════════════════════════════════════════════
     21. SIDEBAR FOOTER (already in HTML <style>, augmented)
  ════════════════════════════════════════════════════════════ */
  .avd-sidebar-footer {
    border-top: 1px solid var(--avd-border);
    position: relative;
    flex-shrink: 0;
  }
  body.light-mode .avd-sidebar-footer { border-color: rgba(0,0,0,0.08); }
  
  .avd-sidebar-user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: var(--avd-transition);
  }
  .avd-sidebar-user-trigger:hover { background: rgba(255,255,255,0.04); }
  body.light-mode .avd-sidebar-user-trigger:hover { background: rgba(0,0,0,0.04); }
  
  .avd-sidebar-user-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 8px;
    margin: 0 8px 6px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    z-index: 1000;
  }
  body.light-mode .avd-sidebar-user-dropdown {
    background: #ffffff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.12);
  }
  .avd-sidebar-user-dropdown.open { display: block; }
  
  .avd-sidebar-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 6px;
  }
  body.light-mode .avd-sidebar-dropdown-header { border-color: rgba(0,0,0,0.07); }
  .avd-sidebar-dropdown-header img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
  }
  .avd-sidebar-dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--avd-text-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--avd-transition);
  }
  .avd-sidebar-dropdown-link:hover {
    background: rgba(255,255,255,0.05);
    color: var(--avd-text);
  }
  body.light-mode .avd-sidebar-dropdown-link:hover { background: rgba(0,0,0,0.04); }
  .avd-sidebar-dropdown-link i { font-size: 13px; width: 16px; text-align: center; }
  .avd-sidebar-dropdown-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--avd-red);
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--avd-transition);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    margin-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.07);
  }
  body.light-mode .avd-sidebar-dropdown-logout { border-color: rgba(0,0,0,0.06); }
  .avd-sidebar-dropdown-logout:hover { background: rgba(239,68,68,0.08); }
  
  /* ════════════════════════════════════════════════════════════
     22. ACCESS MANAGER MODAL
  ════════════════════════════════════════════════════════════ */
  .avd-access-modal { max-width: 520px; }
  
  .avd-access-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--avd-border);
  }
  .avd-access-user-row:last-child { border-bottom: none; }
  
  .avd-access-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--avd-primary), var(--avd-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
  }
  .avd-access-info { flex: 1; min-width: 0; }
  .avd-access-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--avd-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .avd-access-email {
    font-size: 10px;
    color: var(--avd-text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .avd-access-perm-select {
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    border-radius: 8px;
    color: var(--avd-text);
    font-size: 11px;
    padding: 4px 8px;
    cursor: pointer;
    outline: none;
    font-family: inherit;
  }
  .avd-access-remove-btn {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    color: var(--avd-red);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    flex-shrink: 0;
    transition: var(--avd-transition);
  }
  .avd-access-remove-btn:hover { background: rgba(239,68,68,0.2); }
  .avd-access-add-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--avd-border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
  }
  body.light-mode .avd-access-add-section { background: rgba(0,0,0,0.02); }
  .avd-access-add-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
  .avd-access-input {
    flex: 1;
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    border-radius: 8px;
    color: var(--avd-text);
    font-size: 12px;
    padding: 8px 12px;
    outline: none;
    font-family: inherit;
    transition: var(--avd-transition);
    min-width: 0;
  }
  .avd-access-input:focus { border-color: var(--avd-primary); }
  .avd-access-input::placeholder { color: var(--avd-text-dim); }
  .avd-access-users-list { max-height: 280px; overflow-y: auto; margin-top: 8px; }
  .avd-access-empty {
    text-align: center;
    padding: 20px;
    color: var(--avd-text-dim);
    font-size: 12px;
  }
  .avd-access-empty i {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
    color: var(--avd-text-dim);
  }
  
  /* Access search results dropdown */
  #avdAccessSearchResults {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }
  body.light-mode #avdAccessSearchResults {
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  }
  
  /* Groups section in Access Manager */
  .avd-access-group-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--avd-border);
  }
  .avd-access-group-row:last-child { border-bottom: none; }
  .avd-access-group-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
  }
  .avd-access-tabs {
    display: flex;
    gap: 2px;
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 14px;
  }
  .avd-access-tab {
    flex: 1;
    padding: 6px 10px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--avd-text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--avd-transition);
  }
  .avd-access-tab.active { background: var(--avd-primary); color: #fff; }
  
  /* ════════════════════════════════════════════════════════════
     23. SCROLLBARS (global)
  ════════════════════════════════════════════════════════════ */
  * { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }
  body.light-mode * { scrollbar-color: rgba(0,0,0,0.12) transparent; }
  *::-webkit-scrollbar { width: 4px; height: 4px; }
  *::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
  body.light-mode *::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.14); }
  
  /* ════════════════════════════════════════════════════════════
     24. LIGHT MODE GLOBAL ADJUSTMENTS
  ════════════════════════════════════════════════════════════ */
  body.light-mode .avd-nav-label { color: #94a3b8; }
  body.light-mode .avd-storage-label { color: #475569; }
  body.light-mode .avd-storage-info { color: #94a3b8; }
  body.light-mode .avd-file-card { box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
  body.light-mode .avd-folder-card { box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
  body.light-mode .avd-file-list { box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
  body.light-mode .avd-activity-feed { box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
  body.light-mode .avd-quick-card { box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
  body.light-mode .avd-stat-card { box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
  body.light-mode .avd-ctx-item { color: #475569; }
  body.light-mode .avd-ctx-item:hover { color: #1e293b; }
  body.light-mode #avdUserMenu {
    background: #ffffff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  }
  body.light-mode .avd-file-action-btn {
    background: rgba(0,0,0,0.05);
    color: #475569;
  }
  body.light-mode .avd-file-action-btn:hover { background: rgba(0,0,0,0.1); color: #1e293b; }
  body.light-mode .avd-folder-action-btn {
    background: rgba(0,0,0,0.05);
    color: #475569;
  }
  body.light-mode .avd-panel-close { background: rgba(0,0,0,0.05); }
  body.light-mode .avd-modal-close { background: rgba(0,0,0,0.05); }
  
  /* ════════════════════════════════════════════════════════════
     25. RESPONSIVE — TABLET (≤ 1200px)
  ════════════════════════════════════════════════════════════ */
  @media (max-width: 1200px) {
    :root {
      --avd-panel-w: 280px;
      --avd-sidebar-w: 240px;
    }
    .avd-stats-grid { grid-template-columns: repeat(2, 1fr); }
    #avdViewHome > div[style*="grid-template-columns:1fr 340px"],
    #avdViewHome > div[style*="grid-template-columns: 1fr 340px"] {
      display: flex !important;
      flex-direction: column;
      gap: 20px;
    }
  }
  
  /* ════════════════════════════════════════════════════════════
     26. RESPONSIVE — MOBILE (≤ 768px)
  ════════════════════════════════════════════════════════════ */
  @media (max-width: 768px) {
    html, body { overflow: hidden; }
  
    #avDriveApp { flex-direction: row; }
  
    /* Sidebar becomes a fixed overlay */
    #avdSidebar {
      position: fixed;
      left: 0;
      top: 0;
      bottom: 0;
      z-index: 1000;
      transform: translateX(-100%);
      overflow-y: auto;
      overflow-x: hidden;
    }
    #avdSidebar.mobile-open {
      transform: translateX(0);
      box-shadow: 4px 0 40px rgba(0,0,0,0.55);
    }
    /* Mobile overlay backdrop */
    #avdSidebar.mobile-open::before {
      content: '';
      position: fixed;
      inset: 0;
      left: var(--avd-sidebar-w);
      background: rgba(0,0,0,0.5);
      z-index: -1;
    }
  
    /* Sidebar toggle hidden on mobile */
    .avd-sidebar-toggle { display: none !important; }
  
    #avdMain { flex: 1; }
  
    /* Details panel full-width overlay on mobile */
    #avdDetailsPanel {
      position: fixed;
      right: 0;
      top: 0;
      bottom: 0;
      z-index: 900;
      transform: translateX(100%);
      transition: transform 0.3s ease, width 0.3s ease;
    }
    #avdDetailsPanel.open {
      transform: translateX(0);
      width: min(340px, 100vw) !important;
      box-shadow: -4px 0 40px rgba(0,0,0,0.4);
    }
  
    #avdMobileMenuBtn { display: flex !important; }
  
    .avd-breadcrumb { display: none; }
    .avd-filter-tabs { display: none; }
  
    .avd-search-wrap { max-width: none; flex: 1; }
  
    #avDriveContent { padding: 14px 14px; }
  
    .avd-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .avd-stat-card { padding: 12px 14px; }
    .avd-stat-icon { width: 38px; height: 38px; font-size: 15px; }
    .avd-stat-value { font-size: 18px; }
  
    .avd-file-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .avd-quick-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .avd-folder-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  
    .avd-home-hero {
      padding: 20px;
      border-radius: var(--avd-radius-lg);
      flex-direction: column;
      align-items: flex-start;
      gap: 16px;
    }
    .avd-home-hero-text h2 { font-size: 18px; }
    .avd-home-hero-actions { width: 100%; }
    .avd-home-hero-actions .avd-btn { flex: 1; justify-content: center; }
  
    .avd-select-bar {
      bottom: 16px;
      left: 12px;
      right: 12px;
      transform: none;
      border-radius: 12px;
      flex-wrap: wrap;
      gap: 4px;
      justify-content: center;
    }
  
    .avd-file-list-header,
    .avd-file-row {
      grid-template-columns: 28px 1fr 80px 60px;
    }
    /* Hide size and actions columns on mobile list */
    .avd-file-list-header > span:nth-child(5),
    .avd-file-list-header > span:nth-child(6),
    .avd-file-row > .avd-file-row-cell:last-of-type { display: none; }
  
    .avd-type-grid { grid-template-columns: 1fr; }
    .avd-modal-overlay { padding: 10px; align-items: flex-end; }
    .avd-modal { border-radius: var(--avd-radius-lg); max-height: 95vh; }
    .avd-modal-lg { max-width: 100%; }
  }
  
  /* ════════════════════════════════════════════════════════════
     27. RESPONSIVE — SMALL MOBILE (≤ 480px)
  ════════════════════════════════════════════════════════════ */
  @media (max-width: 480px) {
    :root { --avd-header-h: 52px; }
  
    #avDriveHeader { padding: 0 10px; gap: 6px; }
    .avd-header-btn span { display: none; }
  
    .avd-file-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .avd-quick-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .avd-folder-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  
    .avd-stats-grid { gap: 8px; }
    .avd-stat-card { padding: 10px 12px; gap: 10px; }
  
    .avd-home-hero-actions { flex-direction: column; }
    .avd-home-hero-actions .avd-btn { width: 100%; }
  
    .avd-panel-tab { font-size: 10px; padding: 8px 4px; }
  }

  /* ── SIDEBAR PLATFORM NAV ─────────────────────────── */
  .avd-platform-nav { padding: 0 0 8px 0; }
  .avd-platform-nav .avd-nav-label {
      padding: 10px 16px 4px;
      font-size: 9px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 1.2px;
      color: #334155;
  }
  .avd-platform-section { margin-bottom: 2px; }
  .avd-platform-folder {
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 8px 16px;
      font-size: 12px;
      font-weight: 700;
      color: #94a3b8;
      cursor: pointer;
      border-radius: 8px;
      margin: 0 6px;
      transition: all .15s;
      position: relative;
      background: none;
      border: none;
      width: calc(100% - 12px);
      text-align: left;
  }
  .avd-platform-folder:hover { background: rgba(255,255,255,0.05); color: #e2e8f0; }
  .avd-platform-folder i:first-child { font-size: 13px; width: 16px; text-align: center; }
  .avd-platform-folder .arrow {
      margin-left: auto;
      font-size: 9px;
      transition: transform .2s;
  }
  .avd-platform-folder.open .arrow { transform: rotate(180deg); }
  .avd-platform-submenu {
      display: none;
      padding: 2px 0;
  }
  .avd-platform-submenu.open { display: block; }
  .avd-platform-link {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 16px 6px 36px;
      font-size: 11px;
      font-weight: 500;
      color: #64748b;
      text-decoration: none;
      border-radius: 6px;
      margin: 0 6px;
      transition: all .15s;
  }
  .avd-platform-link:hover { background: rgba(255,255,255,0.04); color: #e2e8f0; }
  .avd-platform-link.active { color: #667eea; background: rgba(102,126,234,0.08); }
  .avd-platform-link i { font-size: 11px; width: 14px; text-align: center; }
  .avd-platform-divider {
      border: none;
      border-top: 1px solid rgba(255,255,255,0.05);
      margin: 8px 16px;
  }
  .nav-badge-pill {
      font-size: 8px;
      font-weight: 800;
      padding: 1px 5px;
      border-radius: 10px;
      background: rgba(102,126,234,0.2);
      color: #a5b4fc;
      margin-left: auto;
  }

  /* ── ACCESS MANAGER MODAL ─────────────────────────── */
  .avd-access-modal { max-width: 520px; width: 100%; }
  .avd-access-user-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 0;
      border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .avd-access-user-row:last-child { border-bottom: none; }
  .avd-access-avatar {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: linear-gradient(135deg, #667eea, #764ba2);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      font-weight: 800;
      color: #fff;
      flex-shrink: 0;
  }
  .avd-access-info { flex: 1; min-width: 0; }
  .avd-access-name {
      font-size: 12px;
      font-weight: 700;
      color: #e2e8f0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
  }
  .avd-access-email {
      font-size: 10px;
      color: #64748b;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
  }
  .avd-access-perm-select {
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 8px;
      color: #e2e8f0;
      font-size: 11px;
      padding: 4px 8px;
      cursor: pointer;
      outline: none;
  }
  .avd-access-remove-btn {
      background: rgba(239,68,68,0.1);
      border: 1px solid rgba(239,68,68,0.2);
      color: #ef4444;
      border-radius: 6px;
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 11px;
      flex-shrink: 0;
      transition: all .15s;
  }
  .avd-access-remove-btn:hover { background: rgba(239,68,68,0.2); }
  .avd-access-add-section {
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 12px;
      padding: 16px;
      margin-top: 16px;
  }
  .avd-access-add-row {
      display: flex;
      gap: 8px;
      margin-top: 10px;
  }
  .avd-access-input {
      flex: 1;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 8px;
      color: #e2e8f0;
      font-size: 12px;
      padding: 8px 12px;
      outline: none;
      font-family: inherit;
  }
  .avd-access-input:focus { border-color: #667eea; }
  .avd-access-input::placeholder { color: #475569; }
  .avd-access-users-list {
      max-height: 280px;
      overflow-y: auto;
      margin-top: 8px;
  }
  .avd-access-empty {
      text-align: center;
      padding: 20px;
      color: #475569;
      font-size: 12px;
  }
  .avd-access-empty i {
      font-size: 24px;
      display: block;
      margin-bottom: 8px;
      color: #334155;
  }
  /* Sidebar footer user menu */
  .avd-sidebar-footer {
      border-top: 1px solid rgba(255,255,255,0.06);
      position: relative;
  }
  .avd-sidebar-user-trigger {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 16px;
      cursor: pointer;
      transition: background .15s;
  }
  .avd-sidebar-user-trigger:hover { background: rgba(255,255,255,0.04); }
  .avd-sidebar-user-trigger img {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      object-fit: cover;
      flex-shrink: 0;
  }
  .avd-sidebar-user-dropdown {
      display: none;
      position: absolute;
      bottom: 100%;
      left: 0;
      right: 0;
      background: #1e293b;
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 14px;
      padding: 8px;
      margin: 0 8px 6px;
      box-shadow: 0 -10px 40px rgba(0,0,0,0.4);
      z-index: 1000;
  }
  .avd-sidebar-user-dropdown.open { display: block; }
  .avd-sidebar-dropdown-header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border-bottom: 1px solid rgba(255,255,255,0.07);
      margin-bottom: 6px;
  }
  .avd-sidebar-dropdown-header img {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      object-fit: cover;
  }
  .avd-sidebar-dropdown-link {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      color: #94a3b8;
      text-decoration: none;
      font-size: 12px;
      font-weight: 600;
      border-radius: 8px;
      transition: all .15s;
  }
  .avd-sidebar-dropdown-link:hover { background: rgba(255,255,255,0.05); color: #e2e8f0; }
  .avd-sidebar-dropdown-link i { font-size: 13px; width: 16px; text-align: center; }
  .avd-sidebar-dropdown-logout {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      color: #ef4444;
      font-size: 12px;
      font-weight: 700;
      border-radius: 8px;
      cursor: pointer;
      transition: all .15s;
      background: none;
      border: none;
      width: 100%;
      text-align: left;
      margin-top: 4px;
      border-top: 1px solid rgba(255,255,255,0.07);
  }
  .avd-sidebar-dropdown-logout:hover { background: rgba(239,68,68,0.08); }

  /* ── Mobile sidebar close button ──────────────────── */
.avd-mobile-close-btn {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.15s;
}
.avd-mobile-close-btn:hover {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border-color: rgba(239,68,68,0.3);
}
@media (max-width: 768px) {
    .avd-mobile-close-btn { display: flex; }
}

/* ── Logo text (sidebar ouverte) — plus grand ─────────────── */
.avd-sidebar-logo-text {
    display: block;
    height: 42px !important;       /* était 34px */
    max-width: 180px !important;
    object-fit: contain;
}

/* ── Logo icône (sidebar collapsed) — plus grand ──────────── */
.avd-sidebar-logo-icon {
    display: none;
    height: 40px !important;       /* était 32px */
    width:  40px !important;
    object-fit: contain;
}

#avdSidebar.collapsed .avd-sidebar-logo-text { display: none; }
#avdSidebar.collapsed .avd-sidebar-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0 10px;
    width: 100%;
}

/* Ajuster le padding du conteneur logo pour les 2 états */
#avdSidebar a.avd-sidebar-logo,
#avdSidebar > a:first-of-type {
    padding: 14px 14px 12px !important;
    min-height: 62px;
}

/* ════════════════════════════════════════════════════════════
   MCP QUICK ASSISTANT — Drive Integration
════════════════════════════════════════════════════════════ */

.avd-mcp-section {
  position: relative;
  background: var(--avd-card);
  border: 1px solid var(--avd-border);
  border-radius: var(--avd-radius-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
  overflow: hidden;
  transition: var(--avd-transition);
}

.avd-mcp-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
      transparent,
      rgba(102,126,234,0.7) 30%,
      rgba(118,75,162,0.6) 70%,
      transparent
  );
  pointer-events: none;
}

.avd-mcp-section:focus-within {
  border-color: rgba(102,126,234,0.35);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.07);
}

body.light-mode .avd-mcp-section {
  background: #ffffff;
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
}

/* ── Header Row ──────────────────────────────────────────── */
.avd-mcp-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.avd-mcp-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--avd-primary);  /* conservé comme fallback */
}

.avd-mcp-badge i {
  font-size: 12px;
  color: var(--avd-primary);
}

/* Logo alpha à côté du titre */
.avd-mcp-badge-logo {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.9;
  filter: drop-shadow(0 1px 3px rgba(102,126,234,0.3));
}

/* Texte dégradé bleu-violet léger */
.avd-mcp-badge-text {
  background: linear-gradient(135deg, #667eea 0%, #a78bfa 60%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.avd-mcp-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--avd-text-dim);
}

.avd-mcp-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #475569;
  flex-shrink: 0;
  transition: var(--avd-transition);
}

.avd-mcp-status-dot.ready {
  background: var(--avd-green);
  box-shadow: 0 0 6px rgba(16,185,129,0.5);
}

.avd-mcp-status-dot.loading {
  background: var(--avd-amber);
  animation: pulseDot 0.8s infinite;
}

.avd-mcp-status-dot.error {
  background: var(--avd-red);
}

.avd-mcp-open-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  margin-left: auto;
  background: rgba(102,126,234,0.08);
  border: 1px solid rgba(102,126,234,0.18);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--avd-primary);
  cursor: pointer;
  text-decoration: none;
  transition: var(--avd-transition);
  white-space: nowrap;
  font-family: inherit;
}

.avd-mcp-open-link:hover {
  background: rgba(102,126,234,0.15);
  border-color: rgba(102,126,234,0.35);
  transform: translateY(-1px);
}

.avd-mcp-open-link i { font-size: 9px; }

/* ── Input Row ───────────────────────────────────────────── */
.avd-mcp-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--avd-input-bg);
  border: 1px solid var(--avd-border);
  border-radius: 10px;
  padding: 0 10px 0 12px;
  transition: var(--avd-transition);
}

body.light-mode .avd-mcp-input-row {
  background: rgba(0,0,0,0.04);
}

.avd-mcp-input-row:focus-within {
  border-color: rgba(102,126,234,0.5);
  background: rgba(102,126,234,0.04);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.avd-mcp-input-icon {
  font-size: 11px;
  color: var(--avd-text-dim);
  flex-shrink: 0;
  pointer-events: none;
}

.avd-mcp-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 12px;
  color: var(--avd-text);
  padding: 9px 0;
  min-width: 0;
}

.avd-mcp-input::placeholder { color: var(--avd-text-dim); }

.avd-mcp-char {
  font-size: 9px;
  color: var(--avd-text-dim);
  flex-shrink: 0;
  font-weight: 600;
  min-width: 32px;
  text-align: right;
  opacity: 0;
  transition: opacity 0.2s;
}

.avd-mcp-char.visible { opacity: 1; }

.avd-mcp-send {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, var(--avd-primary), var(--avd-primary-dark));
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--avd-transition);
  box-shadow: 0 2px 8px rgba(102,126,234,0.35);
}

.avd-mcp-send:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(102,126,234,0.55);
}

.avd-mcp-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── Chips ───────────────────────────────────────────────── */
.avd-mcp-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.avd-mcp-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--avd-input-bg);
  border: 1px solid var(--avd-border);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  color: var(--avd-text-muted);
  cursor: pointer;
  transition: var(--avd-transition);
  font-family: inherit;
  white-space: nowrap;
}

body.light-mode .avd-mcp-chip {
  background: rgba(0,0,0,0.04);
  color: #475569;
}

.avd-mcp-chip:hover {
  background: rgba(102,126,234,0.1);
  border-color: rgba(102,126,234,0.3);
  color: var(--avd-primary);
  transform: translateY(-1px);
}

.avd-mcp-chip i { font-size: 9px; }

/* ── Response Area ───────────────────────────────────────── */
.avd-mcp-response-wrap {
  margin-top: 12px;
  background: rgba(102,126,234,0.04);
  border: 1px solid rgba(102,126,234,0.15);
  border-radius: 10px;
  overflow: hidden;
  animation: avdFadeIn 0.2s ease;
}

body.light-mode .avd-mcp-response-wrap {
  background: rgba(102,126,234,0.03);
  border-color: rgba(102,126,234,0.12);
}

.avd-mcp-response-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(102,126,234,0.1);
  background: rgba(102,126,234,0.05);
}

.avd-mcp-response-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 800;
  color: var(--avd-primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.avd-mcp-response-label i { font-size: 11px; }

.avd-mcp-response-meta {
  font-size: 9px;
  font-weight: 600;
  color: var(--avd-text-dim);
  text-transform: none;
  letter-spacing: 0;
  padding: 2px 7px;
  background: var(--avd-input-bg);
  border-radius: 6px;
  border: 1px solid var(--avd-border);
}

.avd-mcp-close-response {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(102,126,234,0.2);
  background: rgba(102,126,234,0.08);
  color: var(--avd-text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: var(--avd-transition);
  flex-shrink: 0;
}

.avd-mcp-close-response:hover {
  background: rgba(239,68,68,0.1);
  color: var(--avd-red);
  border-color: rgba(239,68,68,0.2);
}

.avd-mcp-response-content {
  padding: 12px 14px;
  max-height: 280px;
  overflow-y: auto;
  font-size: 12px;
  color: var(--avd-text);
  line-height: 1.6;
}

.avd-mcp-response-content::-webkit-scrollbar { width: 3px; }
.avd-mcp-response-content::-webkit-scrollbar-thumb {
  background: rgba(102,126,234,0.2);
  border-radius: 3px;
}

/* Thinking */
.avd-mcp-thinking {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--avd-text-dim);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 0;
}

.avd-mcp-thinking i { color: var(--avd-primary); font-size: 13px; }

/* Result items */
.avd-mcp-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--avd-input-bg);
  border: 1px solid var(--avd-border);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: var(--avd-transition);
}

body.light-mode .avd-mcp-result-item {
  background: rgba(0,0,0,0.03);
}

.avd-mcp-result-item:last-child { margin-bottom: 0; }

.avd-mcp-result-item:hover {
  border-color: rgba(102,126,234,0.3);
  background: rgba(102,126,234,0.06);
}

.avd-mcp-result-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.avd-mcp-result-icon.sheet { background: rgba(16,185,129,0.12); color: var(--avd-green); }
.avd-mcp-result-icon.slide { background: rgba(102,126,234,0.12); color: var(--avd-primary); }
.avd-mcp-result-icon.user  { background: rgba(245,158,11,0.12);  color: var(--avd-amber); }
.avd-mcp-result-icon.info  { background: rgba(100,116,139,0.12); color: var(--avd-text-dim); }

.avd-mcp-result-body { flex: 1; min-width: 0; }

.avd-mcp-result-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--avd-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avd-mcp-result-sub {
  font-size: 10px;
  color: var(--avd-text-dim);
  margin-top: 1px;
}

.avd-mcp-result-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  flex-shrink: 0;
}

.avd-mcp-result-badge.sheet { background: rgba(16,185,129,0.12); color: var(--avd-green); }
.avd-mcp-result-badge.slide { background: rgba(102,126,234,0.12); color: var(--avd-primary); }

/* Profile block */
.avd-mcp-profile-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.avd-mcp-profile-stat {
  background: var(--avd-input-bg);
  border: 1px solid var(--avd-border);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}

body.light-mode .avd-mcp-profile-stat {
  background: rgba(0,0,0,0.03);
}

.avd-mcp-profile-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--avd-text);
}

.avd-mcp-profile-lbl {
  font-size: 9px;
  font-weight: 700;
  color: var(--avd-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 2px;
}

/* Text response */
.avd-mcp-text-response {
  font-size: 12px;
  color: var(--avd-text-muted);
  line-height: 1.7;
  padding: 4px 0;
}

.avd-mcp-text-response strong { color: var(--avd-text); }

/* Response footer */
.avd-mcp-response-footer {
  padding: 8px 14px;
  border-top: 1px solid rgba(102,126,234,0.1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.avd-mcp-full-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(102,126,234,0.1);
  border: 1px solid rgba(102,126,234,0.2);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--avd-primary);
  cursor: pointer;
  font-family: inherit;
  transition: var(--avd-transition);
  text-decoration: none;
}

.avd-mcp-full-btn:hover {
  background: rgba(102,126,234,0.18);
  border-color: rgba(102,126,234,0.4);
}

.avd-mcp-full-btn i { font-size: 9px; }

/* Error */
.avd-mcp-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: 8px;
  font-size: 11px;
  color: var(--avd-red);
  font-weight: 600;
}

.avd-mcp-error i { font-size: 12px; flex-shrink: 0; }

/* Empty */
.avd-mcp-empty {
  text-align: center;
  padding: 16px;
  font-size: 11px;
  color: var(--avd-text-dim);
}

.avd-mcp-empty i {
  font-size: 22px;
  display: block;
  margin-bottom: 6px;
  color: var(--avd-text-dim);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .avd-mcp-chips  { gap: 5px; }
  .avd-mcp-chip   { font-size: 9px; padding: 3px 8px; }
  .avd-mcp-open-link span { display: none; }
  .avd-mcp-profile-block { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .avd-mcp-section { padding: 12px 14px; }
  .avd-mcp-chips {
      flex-wrap: nowrap;
      overflow-x: auto;
      padding-bottom: 2px;
  }
  .avd-mcp-chips::-webkit-scrollbar { height: 0; }
}

/* ════════════════════════════════════════════════════════
   THIN RING SPINNER — remplace tous les fa-spinner fa-spin
════════════════════════════════════════════════════════ */
@keyframes avd-ring-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.avd-ring {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(102, 126, 234, 0.15);
  border-top-color: #667eea;
  border-radius: 50%;
  animation: avd-ring-spin 0.75s linear infinite;
  vertical-align: middle;
  flex-shrink: 0;
}
.avd-ring-sm  { width: 13px; height: 13px; border-width: 1.5px; }
.avd-ring-md  { width: 18px; height: 18px; border-width: 1.5px; }
.avd-ring-lg  { width: 26px; height: 26px; border-width: 2px; }
.avd-ring-xl  { width: 36px; height: 36px; border-width: 2px; }
.avd-ring.green  { border-top-color: #10b981; }
.avd-ring.amber  { border-top-color: #f59e0b; }
.avd-ring.white  { border-top-color: #fff; border-color: rgba(255,255,255,0.15); }

/* Override : supprime l'ancien spinner FontAwesome partout */
.avd-spinner { display: flex; align-items: center; gap: 10px; padding: 20px 16px;
  color: #64748b; font-size: 12px; font-weight: 500; }
.avd-spinner .fa-spinner { display: none !important; }

/* ════════════════════════════════════════════════════════
 SHAREPOINT — COMMAND BAR
════════════════════════════════════════════════════════ */
.avd-sp-commandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  border-bottom: 1px solid var(--avd-border);
  gap: 8px;
  flex-wrap: wrap;
}
.avd-sp-commandbar-left  { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.avd-sp-commandbar-right { display: flex; align-items: center; gap: 10px; }

.avd-sp-cmd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--avd-text, #e2e8f0);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  letter-spacing: 0.1px;
}
.avd-sp-cmd-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}
.avd-sp-cmd-btn.primary {
  background: #667eea;
  color: #fff;
  border-color: transparent;
}
.avd-sp-cmd-btn.primary:hover { background: #5a72d4; }
.avd-sp-cmd-btn .fa-chevron-down { font-size: 8px; opacity: 0.7; }
.avd-sp-cmd-divider {
  width: 1px; height: 18px;
  background: var(--avd-border);
  margin: 0 4px;
  flex-shrink: 0;
}
.avd-sp-items-count {
  font-size: 11px; color: #64748b; font-weight: 600; white-space: nowrap;
}

/* ════════════════════════════════════════════════════════
 SHAREPOINT — PATH BAR (breadcrumb interne à la vue)
════════════════════════════════════════════════════════ */
.avd-sp-path {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 700;
  flex-wrap: wrap;
  min-height: 38px;
}
.avd-sp-path-segment {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #667eea;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 5px;
  transition: background 0.15s;
  font-weight: 700;
}
.avd-sp-path-segment:hover  { background: rgba(102,126,234,0.1); }
.avd-sp-path-segment.current {
  color: var(--avd-text, #e2e8f0);
  cursor: default;
  pointer-events: none;
  font-weight: 800;
}
.avd-sp-path-sep { color: #334155; font-size: 10px; }

/* ════════════════════════════════════════════════════════
 SHAREPOINT — SECTION LABELS
════════════════════════════════════════════════════════ */
.avd-sp-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 14px 4px 8px;
}
.avd-sp-section-label i { font-size: 11px; }

/* ════════════════════════════════════════════════════════
 SHAREPOINT — FOLDER CARDS (compact, horizontal)
════════════════════════════════════════════════════════ */
.avd-sp-folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}
.avd-sp-folder-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--avd-card, rgba(30,41,59,0.6));
  border: 1px solid var(--avd-border, rgba(255,255,255,0.07));
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}
.avd-sp-folder-card:hover {
  border-color: rgba(245,158,11,0.35);
  background: rgba(245,158,11,0.04);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.avd-sp-folder-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(245,158,11,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  position: relative;
}
.avd-sp-folder-info { flex: 1; min-width: 0; }
.avd-sp-folder-name {
  font-size: 12px; font-weight: 700;
  color: var(--avd-text, #e2e8f0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.avd-sp-folder-sub {
  font-size: 10px; color: #64748b; margin-top: 1px;
  display: flex; align-items: center; gap: 5px;
}
.avd-sp-folder-actions {
  display: flex; gap: 2px;
  opacity: 0; transition: opacity 0.15s;
}
.avd-sp-folder-card:hover .avd-sp-folder-actions { opacity: 1; }
.avd-sp-folder-action-btn {
  width: 24px; height: 24px; border-radius: 5px;
  border: none; background: transparent;
  color: #64748b; cursor: pointer; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.avd-sp-folder-action-btn:hover { background: rgba(255,255,255,0.1); color: var(--avd-text); }
.avd-sp-folder-action-btn.danger:hover { background: rgba(239,68,68,0.12); color: #ef4444; }

/* Badge partagé sur folder */
.avd-sp-shared-dot {
  position: absolute; top: 5px; right: 5px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #667eea;
  display: flex; align-items: center; justify-content: center;
}
.avd-sp-shared-dot i { font-size: 6px; color: #fff; }

/* ════════════════════════════════════════════════════════
 SHAREPOINT — FILE TABLE
════════════════════════════════════════════════════════ */
.avd-sp-table-wrap {
  background: var(--avd-card);
  border: 1px solid var(--avd-border);
  border-radius: 10px;
  overflow: hidden;
}
.avd-sp-table-header {
  display: grid;
  grid-template-columns: 36px minmax(180px,1fr) 80px 130px 80px 80px 110px;
  align-items: center;
  padding: 0 10px;
  height: 34px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--avd-border);
  font-size: 10px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  position: sticky; top: 0; z-index: 2;
}
.avd-sp-table-header > span {
  display: flex; align-items: center; gap: 3px;
  cursor: pointer; padding: 3px 5px; border-radius: 4px;
  transition: background 0.15s; user-select: none;
}
.avd-sp-table-header > span:hover { background: rgba(255,255,255,0.05); color: var(--avd-text); }
.avd-sp-table-header > span:first-child { cursor: default; }
.avd-sp-table-header > span:first-child:hover { background: none; }

.avd-sp-row {
  display: grid;
  grid-template-columns: 36px minmax(180px,1fr) 80px 130px 80px 80px 110px;
  align-items: center;
  padding: 0 10px;
  height: 42px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
}
.avd-sp-row:last-child { border-bottom: none; }
.avd-sp-row:hover     { background: rgba(255,255,255,0.03); }
.avd-sp-row.selected  { background: rgba(102,126,234,0.08); }

/* Checkbox colonne */
.avd-sp-row-check {
  width: 18px; height: 18px;
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; cursor: pointer; flex-shrink: 0;
}
.avd-sp-row:hover .avd-sp-row-check { border-color: #667eea; }
.avd-sp-row.selected .avd-sp-row-check {
  background: #667eea; border-color: #667eea;
}
.avd-sp-row.selected .avd-sp-row-check::after {
  content: ''; width: 7px; height: 3.5px;
  border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}

/* Colonne nom */
.avd-sp-row-name {
  display: flex; align-items: center; gap: 9px;
  min-width: 0; padding: 0 5px;
}
.avd-sp-row-icon {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.avd-sp-row-icon.sheet { background: rgba(16,185,129,0.1); color: #10b981; }
.avd-sp-row-icon.slide { background: rgba(102,126,234,0.1); color: #667eea; }
.avd-sp-row-icon.folder { background: rgba(245,158,11,0.1); color: #f59e0b; }
.avd-sp-row-title-wrap { flex: 1; min-width: 0; }
.avd-sp-row-title {
  font-size: 13px; font-weight: 600; color: var(--avd-text, #e2e8f0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.12s;
}
.avd-sp-row:hover .avd-sp-row-title { color: #667eea; }
.avd-sp-row-sub {
  font-size: 10px; color: #475569; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Cellules */
.avd-sp-row-cell {
  font-size: 11px; color: #64748b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 0 5px;
}

/* Colonne type badge */
.avd-sp-type-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 700;
}
.avd-sp-type-badge.sheet { background: rgba(16,185,129,0.1); color: #10b981; }
.avd-sp-type-badge.slide { background: rgba(102,126,234,0.1); color: #667eea; }
.avd-sp-type-badge.folder { background: rgba(245,158,11,0.1); color: #f59e0b; }

/* Colonne sharing */
.avd-sp-shared-cell {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; color: #667eea; font-weight: 600;
}

/* Colonne actions */
.avd-sp-row-actions {
  display: flex; align-items: center; gap: 2px;
  opacity: 0; transition: opacity 0.12s;
}
.avd-sp-row:hover .avd-sp-row-actions { opacity: 1; }
.avd-sp-act-btn {
  width: 26px; height: 26px; border-radius: 5px;
  border: none; background: transparent;
  color: #64748b; cursor: pointer; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.13s;
}
.avd-sp-act-btn:hover { background: rgba(255,255,255,0.08); color: var(--avd-text); }
.avd-sp-act-btn.danger:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

/* Bouton "Up" niveau parent */
.avd-sp-up-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 6px;
  border: 1px solid var(--avd-border);
  background: transparent; color: var(--avd-text);
  font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  font-family: 'Inter', sans-serif;
  margin-bottom: 8px;
}
.avd-sp-up-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
}

/* Empty state SP */
.avd-sp-empty {
  padding: 40px 20px; text-align: center;
  color: #475569; font-size: 13px;
}
.avd-sp-empty i { font-size: 32px; display: block; margin-bottom: 12px; color: #334155; }
.avd-sp-empty-title { font-size: 14px; font-weight: 700; color: #94a3b8; margin-bottom: 6px; }

/* ════════════════════════════════════════════════════════
 SIDEBAR — My Drive extras (MCP / Code IDE)
════════════════════════════════════════════════════════ */
.avd-nav-tool-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 14px;
  border-radius: 8px;
  margin: 1px 6px;
  text-decoration: none;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
}
.avd-nav-tool-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--avd-text, #e2e8f0);
}
.avd-nav-tool-link .avd-nav-tool-icon {
  width: 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0;
}
.avd-nav-tool-link .avd-nav-tool-icon.mcp  { background: rgba(102,126,234,0.12); color: #818cf8; }
.avd-nav-tool-link .avd-nav-tool-icon.ide  { background: rgba(16,185,129,0.12);  color: #10b981; }
.avd-nav-tool-link .avd-nav-tool-badge {
  margin-left: auto; font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 10px;
  background: rgba(102,126,234,0.1); color: #a5b4fc;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════
 SIDEBAR — Code IDE Projects
════════════════════════════════════════════════════════ */
.avd-nav-ide-project {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 28px;
  font-size: 11px; font-weight: 600;
  color: #64748b; border-radius: 6px;
  margin: 1px 6px;
  cursor: pointer; transition: all 0.13s;
  text-decoration: none; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.avd-nav-ide-project:hover {
  background: rgba(255,255,255,0.04);
  color: var(--avd-text);
}
.avd-nav-ide-project i { font-size: 10px; color: #10b981; flex-shrink: 0; }

/* ════════════════════════════════════════════════════════
 HOME — Améliorations SharePoint style
════════════════════════════════════════════════════════ */
/* Quick access cards améliorées */
.avd-quick-card {
  position: relative; overflow: hidden;
  transition: all 0.2s;
}
.avd-quick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* Home shortcut pills (style SP "Suggested") */
.avd-home-shortcuts {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}
.avd-home-shortcut {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 20px;
  border: 1px solid var(--avd-border);
  background: var(--avd-card);
  color: var(--avd-text); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; text-decoration: none;
}
.avd-home-shortcut:hover {
  border-color: rgba(102,126,234,0.4);
  background: rgba(102,126,234,0.06);
  color: #667eea;
}
.avd-home-shortcut i { font-size: 11px; }

/* ════════════════════════════════════════════════════════
   REACT LOOP ICON — MCP Brand
════════════════════════════════════════════════════════ */
.avd-react-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  color: currentColor;
}
.avd-react-icon-md {
  width: 16px;
  height: 16px;
}
.avd-react-icon-lg {
  width: 20px;
  height: 20px;
}

/* Wrapper icône dans la nav tool link MCP */
.avd-nav-tool-link .avd-nav-tool-icon.mcp {
  background: rgba(102, 126, 234, 0.12);
  color: #818cf8;
}

/* ════════════════════════════════════════════════════════
 SP COMMAND BAR — New Dropdown (fix)
════════════════════════════════════════════════════════ */
.avd-sp-new-wrap {
  position: relative;
  display: inline-block;
}
.avd-sp-new-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 9999;
  min-width: 220px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: avd-fade-in 0.15s ease;
}
.avd-sp-new-dropdown.open { display: block; }

@keyframes avd-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.avd-sp-new-drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.13s;
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}
.avd-sp-new-drop-item:hover { background: rgba(255, 255, 255, 0.07); }

.avd-sp-new-drop-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.avd-sp-new-drop-icon.sheet  { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.avd-sp-new-drop-icon.slide  { background: rgba(102, 126, 234, 0.12); color: #818cf8; }
.avd-sp-new-drop-icon.folder { background: rgba(245, 158, 11, 0.12);  color: #f59e0b; }
.avd-sp-new-drop-icon.upload { background: rgba(6, 182, 212, 0.12);   color: #06b6d4; }

.avd-sp-new-drop-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 4px 0;
}

.avd-sp-new-drop-item .avd-sp-new-drop-desc {
  font-size: 10px;
  color: #64748b;
  font-weight: 400;
  margin-top: 1px;
}