/* ==========================================================================
   Google Drive Design System & Responsive Stylesheet
   ========================================================================== */

:root {
    --bg-primary: #f8faef;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f1f5f9;
    --bg-sidebar: #f1f5f9;
    --bg-card: #ffffff;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --primary-color: #0b57d0;
    --primary-hover: #0842a0;
    --primary-light: #e8f0fe;
    
    --accent-red: #ea4335;
    --accent-green: #1e8e3e;
    --accent-yellow: #fbbc04;
    --accent-blue: #1a73e8;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Overrides */
body.dark-theme {
    --bg-primary: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-hover: #334155;
    --bg-sidebar: #1e293b;
    --bg-card: #1e293b;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: #334155;
    --border-hover: #475569;
    
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: rgba(59, 130, 246, 0.15);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Base Buttons */
.icon-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

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

.icon-btn.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background-color: var(--bg-surface-hover);
}

.btn-danger {
    background-color: var(--accent-red);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #d93025;
    box-shadow: var(--shadow-md);
}

/* Header Navbar */
.navbar {
    height: 64px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    z-index: 20;
    gap: 1rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 220px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.brand-logo {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.brand-title {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-center {
    flex: 1;
    max-width: 720px;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--bg-primary);
    border-radius: var(--radius-full);
    padding: 0 1rem;
    height: 46px;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.search-bar:focus-within {
    background-color: var(--bg-surface);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.search-icon {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-right: 0.75rem;
}

.search-bar input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-clear-btn {
    width: 28px;
    height: 28px;
    font-size: 1rem;
}

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

.user-avatar-btn {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.35rem;
    transition: all var(--transition-fast);
}

.user-avatar-btn:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* User Profile Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 280px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 0.75rem;
    z-index: 150;
    animation: fadeInScale 0.15s ease-out;
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.5rem 0.5rem 0.75rem 0.5rem;
}

.user-silhouette-large {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-full);
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-menu hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0.5rem 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.user-menu-item:hover {
    background-color: var(--bg-surface-hover);
}

.user-menu-item i {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.user-menu-item.danger {
    color: var(--accent-red);
}

.user-menu-item.danger i {
    color: var(--accent-red);
}

/* App Container Layout */
.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: margin-left var(--transition-normal);
}

.sidebar.collapsed {
    margin-left: -260px;
}

/* "+ New" Action Button */
.action-btn-container {
    position: relative;
}

.btn-new {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.4rem;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    width: fit-content;
}

.btn-new:hover {
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-surface-hover);
    transform: translateY(-1px);
}

.btn-new i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 220px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 0.5rem 0;
    z-index: 100;
    animation: fadeInScale 0.15s ease-out;
}

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

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background-color var(--transition-fast);
}

.dropdown-item:hover {
    background-color: var(--bg-surface-hover);
}

.dropdown-item i {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.dropdown-menu hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0.4rem 0;
}

/* Sidebar Navigation Items */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

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

.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item i {
    font-size: 1.25rem;
}

/* Storage Bar */
.storage-info {
    padding: 1rem;
    background-color: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.storage-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.storage-bar-bg {
    height: 6px;
    background-color: var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.storage-bar-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

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

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-surface);
    overflow: hidden;
    position: relative;
}

/* Toolbar & Breadcrumbs */
.toolbar {
    height: 56px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-surface);
}

.breadcrumbs-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.25rem 0;
}

.crumb {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.crumb:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}

.crumb.active {
    color: var(--text-primary);
    cursor: default;
}

.crumb.active:hover {
    background-color: transparent;
}

.crumb-separator {
    color: var(--text-muted);
    font-size: 1rem;
}

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

.view-toggle {
    display: flex;
    background-color: var(--bg-primary);
    padding: 2px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
}

.view-toggle .icon-btn {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
}

/* Content Scroll & Grids */
.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

.content-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

/* Grid Layout vs List Layout */
.grid-container {
    display: grid;
    gap: 1rem;
}

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

/* Folders & Files Cards (Grid View) */
.item-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    gap: 0.5rem;
    width: 100%;
}

.item-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    background-color: var(--bg-surface-hover);
}

.item-card.selected {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* Drag and Drop Target Styling */
.item-card.drag-target-hover, .crumb.drag-target-hover {
    border: 2px dashed var(--primary-color) !important;
    background-color: var(--primary-light) !important;
    transform: scale(1.02);
    box-shadow: var(--shadow-lg) !important;
}

.item-card[draggable="true"] {
    cursor: grab;
}
.item-card[draggable="true"]:active {
    cursor: grabbing;
}

/* Cut Pending (Dimmed) Styling */
.item-card.cut-pending {
    opacity: 0.45;
    border: 1.5px dashed var(--primary-color) !important;
    filter: grayscale(40%);
}

/* Floating Selection Action Bar */
.selection-action-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-full);
    padding: 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 900;
    animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.selection-count-badge {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--primary-color);
    background-color: var(--primary-light);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.selection-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selection-actions .btn {
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
}

.item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.item-text-wrapper {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.context-btn {
    flex-shrink: 0;
}

.item-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-primary);
    flex-shrink: 0;
}

.folder-card .item-icon {
    color: #fbbc04;
    background-color: rgba(251, 188, 4, 0.12);
}

.file-card .item-icon {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.file-card .item-icon.icon-image { color: #ea4335; background-color: rgba(234, 67, 53, 0.12); }
.file-card .item-icon.icon-code { color: #8e44ad; background-color: rgba(142, 68, 173, 0.12); }
.file-card .item-icon.icon-pdf { color: #e74c3c; background-color: rgba(231, 76, 60, 0.12); }
.file-card .item-icon.icon-archive { color: #e67e22; background-color: rgba(230, 126, 34, 0.12); }

.item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

.item-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

/* File Card Preview Thumbnail (Grid) */
.file-card-preview {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.file-card-thumbnail {
    height: 120px;
    width: 100%;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

.file-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-card-thumbnail i {
    font-size: 3rem;
}

/* Non-image File Preview Card (Grid View) */
.file-card-thumbnail.icon-image-bg { background: linear-gradient(135deg, rgba(234, 67, 53, 0.08) 0%, rgba(234, 67, 53, 0.18) 100%); }
.file-card-thumbnail.icon-pdf-bg { background: linear-gradient(135deg, rgba(231, 76, 60, 0.08) 0%, rgba(231, 76, 60, 0.18) 100%); }
.file-card-thumbnail.icon-code-bg { background: linear-gradient(135deg, rgba(142, 68, 173, 0.08) 0%, rgba(142, 68, 173, 0.18) 100%); }
.file-card-thumbnail.icon-archive-bg { background: linear-gradient(135deg, rgba(230, 126, 34, 0.08) 0%, rgba(230, 126, 34, 0.18) 100%); }
.file-card-thumbnail.default-file-bg { background: linear-gradient(135deg, rgba(26, 115, 232, 0.06) 0%, rgba(26, 115, 232, 0.15) 100%); }

.file-preview-doc-paper {
    width: 78%;
    height: 82%;
    margin-top: 10%;
    background-color: var(--bg-surface);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06), 0 2px 5px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    border-bottom: none;
    padding: 0.65rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-fast);
}

.item-card:hover .file-preview-doc-paper {
    transform: translateY(-2px);
}

.doc-paper-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.doc-paper-header i {
    font-size: 1.35rem;
    color: var(--primary-color);
}

.file-card-thumbnail.icon-pdf-bg .doc-paper-header i { color: #e74c3c; }
.file-card-thumbnail.icon-code-bg .doc-paper-header i { color: #8e44ad; }
.file-card-thumbnail.icon-archive-bg .doc-paper-header i { color: #e67e22; }

.file-ext-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.file-card-thumbnail.icon-pdf-bg .file-ext-badge { background-color: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.file-card-thumbnail.icon-code-bg .file-ext-badge { background-color: rgba(142, 68, 173, 0.15); color: #8e44ad; }
.file-card-thumbnail.icon-archive-bg .file-ext-badge { background-color: rgba(230, 126, 34, 0.15); color: #e67e22; }

.doc-paper-lines {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.15rem;
}

.doc-line {
    height: 4px;
    background-color: var(--border-hover);
    border-radius: 2px;
    opacity: 0.65;
}

.doc-line.long { width: 95%; }
.doc-line.medium { width: 70%; }
.doc-line.short { width: 45%; }

.file-card-details {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
    width: 100%;
}

.item-card:not(.file-card-preview) .file-card-details {
    padding: 0;
}

/* LIST VIEW STYLES */
.list-view .folders-grid,
.list-view .files-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
}

.list-view .item-card {
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
}

.list-view .file-card-preview {
    flex-direction: row;
}

.list-view .file-card-thumbnail {
    display: none;
}

.list-view .file-card-details {
    padding: 0;
    width: 100%;
}

/* Dropzone Overlay */
.drop-zone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(11, 87, 210, 0.85);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    pointer-events: none;
    animation: fadeIn 0.2s ease-out;
}

.drop-zone-content {
    text-align: center;
    border: 3px dashed rgba(255, 255, 255, 0.8);
    padding: 3rem 4rem;
    border-radius: var(--radius-lg);
    background-color: rgba(255, 255, 255, 0.1);
}

.drop-zone-content i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    background-color: var(--bg-primary);
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.empty-state p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 360px;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.modal-large {
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

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

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.preview-title-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.preview-title-container i {
    font-size: 1.35rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.preview-title-container h3,
#previewFileName {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.preview-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-primary);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Custom Role Selector Cards */
.role-selector-container {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.role-option {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.role-option:hover {
    border-color: var(--primary-color);
    background-color: var(--hover-bg);
}

.role-option.active {
    border-color: var(--primary-color);
    background-color: rgba(26, 115, 232, 0.08);
}

body.dark-theme .role-option.active {
    background-color: rgba(138, 180, 248, 0.12);
}

.role-option-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--hover-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.role-option.active .role-option-icon {
    background-color: var(--primary-color);
    color: #ffffff;
}

.role-option-info {
    flex: 1;
}

.role-option-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.role-option-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.role-option-check {
    font-size: 1.25rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.role-option.active .role-option-check {
    opacity: 1;
    color: var(--primary-color);
}

/* User Account Switcher */
.user-account-switcher {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0 0.5rem 0.5rem;
}

.account-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    border: 1px solid transparent;
}

.account-item:hover {
    background-color: var(--hover-bg);
}

.account-item.active {
    background-color: var(--hover-bg);
    border-color: var(--primary-color);
}

.account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.account-details {
    flex: 1;
    overflow: hidden;
}

.account-name {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-email {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-check {
    font-size: 1.1rem;
    color: var(--primary-color);
    opacity: 0;
}

.account-item.active .account-check {
    opacity: 1;
}

/* File Preview Area */
.preview-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    min-height: 350px;
    background-color: var(--bg-primary);
}

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

.preview-text {
    width: 100%;
    height: 100%;
    white-space: pre-wrap;
    font-family: monospace;
    padding: 1rem;
    background-color: var(--bg-surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    overflow: auto;
    max-height: 50vh;
}

/* Context Menu */
.context-menu {
    position: fixed;
    width: 200px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 0.5rem 0;
    z-index: 2000;
}

.context-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-primary);
    transition: background-color var(--transition-fast);
}

.context-item:hover {
    background-color: var(--bg-surface-hover);
}

.context-item i {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.context-item.danger {
    color: var(--accent-red);
}

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

.context-menu hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0.4rem 0;
}

/* Upload Toast Panel */
.upload-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 360px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.upload-toast-header {
    background-color: var(--bg-primary);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.75rem;
}

.upload-toast-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.upload-toast-title-wrapper span,
#uploadToastTitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

.upload-toast-header .toast-close {
    flex-shrink: 0;
}

.upload-toast-title-wrapper i {
    font-size: 1.15rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.upload-toast-progress-bar {
    height: 4px;
    width: 100%;
    background-color: var(--border-hover);
    overflow: hidden;
}

.upload-toast-progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.15s ease-out;
}

.upload-toast-body {
    max-height: 220px;
    overflow-y: auto;
    padding: 0.35rem 0;
}

.toast-item {
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
    gap: 0.5rem;
}

.toast-item.uploading {
    background-color: var(--primary-light);
    border-left: 3px solid var(--primary-color);
}

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

.toast-item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.toast-item-icon {
    font-size: 1.25rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.toast-item-icon.icon-image { color: #ea4335; }
.toast-item-icon.icon-code { color: #8e44ad; }
.toast-item-icon.icon-pdf { color: #e74c3c; }
.toast-item-icon.icon-archive { color: #e67e22; }

.toast-item-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.toast-item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    color: var(--text-primary);
    width: 100%;
}

.toast-item-status {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.toast-item-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 0.5rem;
}

.toast-status-icon {
    font-size: 1.1rem;
    color: var(--accent-green);
}

.spin {
    animation: spin 1s linear infinite;
}

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

/* Responsive Rules */
@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 40;
        box-shadow: var(--shadow-xl);
    }
    
    .search-bar {
        width: 100%;
    }

    .toolbar {
        padding: 0 1rem;
    }

    .content-scroll {
        padding: 1rem;
    }
}

/* Folder Color Palette Grid */
.color-palette-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    padding: 0.5rem 0.25rem;
}

.color-swatch {
    width: 44px;
    height: 44px;
    margin: 0 auto;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #ffffff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.12);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.25);
}

.color-swatch.active {
    border-color: var(--text-primary);
    transform: scale(1.08);
}

.color-swatch-check {
    opacity: 0;
    transition: opacity 0.2s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.color-swatch.active .color-swatch-check {
    opacity: 1;
}

/* Floating Selection Action Bar */
.selection-action-bar {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 0.4rem 0.6rem 0.4rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
    z-index: 1000;
    animation: slideUpBar 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.2s ease;
}

@keyframes slideUpBar {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.selection-action-bar.hidden {
    display: none !important;
}

.selection-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background-color: rgba(26, 115, 232, 0.1);
    color: var(--primary-color);
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 600;
}

.selection-badge i {
    font-size: 1.1rem;
}

.selection-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.95rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.selection-btn:hover {
    background-color: var(--bg-surface-hover);
    border-color: #cbd5e1;
}

.selection-btn.danger {
    background-color: #ea4335;
    border-color: #ea4335;
    color: #ffffff;
}

.selection-btn.danger:hover {
    background-color: #d93025;
    border-color: #d93025;
}

.selection-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-left: 0.1rem;
}

.selection-close-btn:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}
