@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --sidebar-width: 260px;
    --header-height: 56px;
    --accent: #4a6bff;
    --accent2: #7c4dff;
    --accent-soft: rgba(74,107,255,0.08);
    --accent-hover: rgba(74,107,255,0.12);
    --bg: #f8fafc;
    --card: #ffffff;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-secondary: #64748b;
    --success: #059669;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }

/* === FOCUS VISIBLE === */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* === AUTH PAGES === */
.auth-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.auth-container { width: 100%; max-width: 420px; padding: 1rem; }
.auth-card { background: var(--card); padding: 2rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid var(--border); }
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 1.5rem; justify-content: center; }
.auth-card h1 { text-align: center; margin-bottom: 1.5rem; font-size: 1.5rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; }
.auth-footer a { color: var(--accent); text-decoration: none; }

/* === ALERTS === */
.alert { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.85rem; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* === FORMS === */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 0.85rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 0.9rem; font-family: inherit; transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74,107,255,0.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* === BUTTONS === */
.btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px;
    font-size: 0.85rem; font-weight: 600; cursor: pointer; border: none;
    transition: all var(--transition); font-family: inherit; position: relative; overflow: hidden;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.btn-primary:hover { box-shadow: 0 4px 12px rgba(74,107,255,0.35); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(0.97); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { box-shadow: 0 4px 12px rgba(239,68,68,0.3); }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); }

/* === LAYOUT === */
.dashboard-layout { display: flex; min-height: 100vh; }

/* === SIDEBAR === */
.sidebar {
    width: var(--sidebar-width); background: var(--card); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; position: fixed; height: 100vh; z-index: 100;
}
.sidebar-header {
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px; min-height: 56px;
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1rem; }
.sidebar-logo i { font-size: 1.3rem; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.sidebar-nav { flex: 1; padding: 0.5rem; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.nav-item {
    display: flex; align-items: center; gap: 10px; padding: 0.55rem 0.75rem; border-radius: 8px;
    text-decoration: none; color: var(--text-muted); font-size: 0.85rem; font-weight: 500;
    transition: all var(--transition); margin-bottom: 1px; position: relative;
}
.nav-item:hover { background: var(--accent-soft); color: var(--text); }
.nav-item.active {
    background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 60%; background: linear-gradient(180deg, var(--accent), var(--accent2));
    border-radius: 0 3px 3px 0;
}
.nav-item i { width: 20px; text-align: center; font-size: 0.9rem; }
.nav-group-label {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--text-muted); padding: 1.1rem 0.75rem 0.35rem; opacity: 0.5;
}
.nav-group-label + .nav-item { margin-top: 0; }
.nav-sep { height: 1px; background: var(--border); margin: 0.5rem 0.75rem; }
.nav-group-toggle {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.45rem 0.75rem; border-radius: 6px; cursor: pointer;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); opacity: 0.6; transition: all var(--transition); user-select: none;
}
.nav-group-toggle:hover { opacity: 1; background: rgba(0,0,0,0.02); }
.nav-group-toggle i { font-size: 0.55rem; transition: transform 0.2s ease; }
.nav-group-toggle.collapsed i { transform: rotate(-90deg); }
.nav-group-items { overflow: hidden; transition: max-height 0.25s ease; }
.nav-group-items.collapsed { max-height: 0 !important; }

/* === SIDEBAR FOOTER === */
.sidebar-footer { border-top: 1px solid var(--border); padding: 0.85rem; }
.storage-info { margin-bottom: 0.85rem; }
.storage-label { display: flex; justify-content: space-between; font-size: 0.73rem; color: var(--text-muted); margin-bottom: 6px; }
.storage-bar { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.storage-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 3px; transition: width 0.5s ease; }

.user-info { display: flex; align-items: center; gap: 10px; padding: 0.25rem 0; }
.user-avatar {
    width: 34px; height: 34px; background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}
.user-details { flex: 1; min-width: 0; }
.user-name { display: block; font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 0.68rem; color: var(--text-muted); }
.logout-btn { color: var(--text-muted); text-decoration: none; padding: 6px; border-radius: 6px; transition: all var(--transition); }
.logout-btn:hover { color: var(--danger); background: rgba(239,68,68,0.06); }

/* === MAIN CONTENT === */
.main-content { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-height: 100vh; }
.content-header {
    display: flex; justify-content: space-between; align-items: center; padding: 0 1.5rem;
    background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
    min-height: var(--header-height);
}
.header-left { display: flex; align-items: center; gap: 1rem; }
.header-left h2 { font-size: 1.05rem; font-weight: 700; }
.menu-toggle { display: none; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text); padding: 4px; }
.header-right { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }

.header-search { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: border-color var(--transition), box-shadow var(--transition); }
.header-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74,107,255,0.08); }
.header-search input { border: none; padding: 7px 10px; font-size: 0.82rem; outline: none; width: 180px; background: transparent; font-family: inherit; }
.header-search button { border: none; background: none; padding: 7px 10px; cursor: pointer; color: var(--text-muted); transition: color var(--transition); }
.header-search button:hover { color: var(--accent); }

.content-body { padding: 1.5rem; flex: 1; }

/* === BREADCRUMBS === */
.breadcrumbs { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; font-size: 0.85rem; flex-wrap: wrap; }
.breadcrumbs a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { color: var(--text-muted); }

/* === EMPTY STATE === */
.empty-state {
    text-align: center; padding: 4rem 2rem; color: var(--text-muted);
    animation: fadeIn 0.4s ease;
}
.empty-state .empty-icon {
    width: 80px; height: 80px; margin: 0 auto 1.25rem;
    background: var(--accent-soft); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.empty-state .empty-icon i { font-size: 2rem; color: var(--accent); opacity: 0.6; }
.empty-state h3 { margin-bottom: 0.4rem; color: var(--text); font-size: 1.05rem; font-weight: 600; }
.empty-state p { font-size: 0.88rem; max-width: 360px; margin: 0 auto; line-height: 1.5; }

/* === VIEW TOGGLE === */
.view-toggle {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    background: var(--card);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    width: fit-content;
}
.view-btn {
    border: none;
    background: transparent;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}
.view-btn:hover { background: var(--accent-soft); color: var(--accent); }
.view-btn.active { background: var(--accent); color: white; }

/* === FILE GRID === */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.65rem; }
.file-item {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.75rem; background: var(--card);
    border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer;
    transition: all var(--transition); position: relative;
    animation: fileItemIn 0.3s ease both;
}
.file-item:nth-child(1) { animation-delay: 0.02s; }
.file-item:nth-child(2) { animation-delay: 0.04s; }
.file-item:nth-child(3) { animation-delay: 0.06s; }
.file-item:nth-child(4) { animation-delay: 0.08s; }
.file-item:nth-child(5) { animation-delay: 0.10s; }
.file-item:nth-child(6) { animation-delay: 0.12s; }
.file-item:nth-child(7) { animation-delay: 0.14s; }
.file-item:nth-child(8) { animation-delay: 0.16s; }
.file-item:nth-child(9) { animation-delay: 0.18s; }
.file-item:nth-child(10) { animation-delay: 0.20s; }
.file-item:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.file-item.selected { border-color: var(--accent); background: rgba(74,107,255,0.04); box-shadow: 0 0 0 2px rgba(74,107,255,0.15); }
.file-item .file-select-cb:checked + .file-icon + .file-info + .file-actions + .file-select-cb,
.file-item:has(.file-select-cb:checked) { border-color: var(--accent); background: rgba(74,107,255,0.04); }
.file-item.drag-over { border-color: #a6e3a1; background: rgba(166,227,161,0.1); box-shadow: 0 0 0 2px rgba(166,227,161,0.3); transform: scale(1.02); }
.draggable-file, .draggable-folder { cursor: grab; }
.draggable-file:active, .draggable-folder:active { cursor: grabbing; }

/* === VIEW MODES === */
/* List View */
.view-mode-list .file-grid { grid-template-columns: 1fr; }
.view-mode-list .file-item { padding: 0.5rem 0.75rem; }
.view-mode-list .file-icon { width: 32px; height: 32px; font-size: 0.9rem; }
.view-mode-list .file-thumbnail { width: 32px; height: 32px; }
.view-mode-list .file-info { flex: 1; }

/* Compact View */
.view-mode-compact .file-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.5rem; }
.view-mode-compact .file-item { padding: 0.5rem 0.6rem; gap: 0.5rem; }
.view-mode-compact .file-icon { width: 36px; height: 36px; font-size: 0.95rem; }
.view-mode-compact .file-thumbnail { width: 36px; height: 36px; }
.view-mode-compact .file-name { font-size: 0.8rem; }
.view-mode-compact .file-meta { font-size: 0.7rem; }
.view-mode-compact .file-actions { display: none; }

/* Tiles View (Default - existing) */

/* Large Tiles View */
.view-mode-large .file-grid { grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 1rem; }
.view-mode-large .file-item { flex-direction: column; padding: 1.5rem; text-align: center; }
.view-mode-large .file-item .file-select-cb { position: absolute; top: 0.75rem; left: 0.75rem; }
.view-mode-large .file-icon { width: 80px; height: 80px; font-size: 2rem; margin-bottom: 0.75rem; }
.view-mode-large .file-thumbnail { width: 100px; height: 100px; margin-bottom: 0.75rem; }
.view-mode-large .file-thumbnail img { border-radius: 8px; }
.view-mode-large .file-info { min-width: 0; }
.view-mode-large .file-name { font-size: 1rem; font-weight: 600; }
.view-mode-large .file-meta { font-size: 0.8rem; }
.view-mode-large .file-actions { position: static; transform: none; margin-top: 0.75rem; opacity: 1; }
.view-mode-large .file-actions button { width: 32px; height: 32px; font-size: 0.9rem; }

.file-icon {
    width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0; transition: transform var(--transition);
}
.file-item:hover .file-icon { transform: scale(1.05); }
.file-icon.folder { background: #dbeafe; color: #2563eb; }
.file-icon.image { background: #fce7f3; color: #db2777; }
.file-icon.video { background: #fef3c7; color: #d97706; }
.file-icon.audio { background: #ede9fe; color: #7c3aed; }
.file-icon.code { background: #d1fae5; color: #059669; }
.file-icon.document { background: #dbeafe; color: #2563eb; }
.file-icon.archive { background: #ffedd5; color: #ea580c; }
.file-icon.file { background: #f1f5f9; color: #64748b; }
.file-info { flex: 1; min-width: 0; overflow: hidden; }
.file-name { display: block; font-size: 0.86rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { display: block; font-size: 0.73rem; color: var(--text-muted); margin-top: 2px; }
.file-actions {
    display: flex; flex-wrap: wrap; gap: 1px; opacity: 0; transition: opacity var(--transition);
    position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
    background: var(--card); border-radius: var(--radius-sm); padding: 2px; border: 1px solid var(--border);
    box-shadow: var(--shadow-sm); max-width: 200px; z-index: 10;
}
.file-item:hover .file-actions { opacity: 1; }
.file-actions button {
    width: 24px; height: 24px; border: none; background: none; border-radius: var(--radius-sm); cursor: pointer;
    display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.7rem;
    transition: all var(--transition);
}
.file-actions button:hover { background: var(--accent-soft); color: var(--accent); }
.file-actions button.danger:hover { background: rgba(239,68,68,0.08); color: var(--danger); }

/* File Thumbnail */
.file-thumbnail {
    width: 50px; height: 50px; border-radius: 10px; overflow: hidden; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.file-thumbnail img {
    width: 100%; height: 100%; object-fit: cover;
}

/* === STAR BUTTON === */
.star-btn { transition: all 0.25s ease !important; }
.star-btn:hover { transform: scale(1.15) !important; }
.star-btn.starred { color: #f59e0b !important; }
.star-btn.starred:hover { color: #d97706 !important; animation: starPop 0.3s ease; }
@keyframes starPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* === TABLES === */
.table-responsive { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; background: var(--card); }
.data-table th {
    text-align: left; padding: 0.65rem 0.85rem; font-size: 0.73rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
    background: var(--bg); border-bottom: 1px solid var(--border);
}
.data-table td { padding: 0.65rem 0.85rem; font-size: 0.85rem; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr { transition: background var(--transition); }
.data-table tr:hover td { background: rgba(74,107,255,0.02); }

/* === BADGES === */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 6px; font-size: 0.72rem; font-weight: 600; line-height: 1.3; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-teal { background: #ccfbf1; color: #0f766e; }

/* === STATS === */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.85rem; }
.stat-card {
    display: flex; align-items: center; gap: 1rem; padding: 1.15rem;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    transition: all var(--transition);
}
.stat-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-icon {
    width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
}
.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.green { background: #d1fae5; color: #059669; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.orange { background: #ffedd5; color: #ea580c; }
.stat-icon.red { background: #fee2e2; color: #dc2626; }
.stat-icon.teal { background: #ccfbf1; color: #0d9488; }
.stat-value { display: block; font-size: 1.4rem; font-weight: 700; line-height: 1.2; }
.stat-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* === CONTENT ACTIONS & SEARCH === */
.content-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 1rem; }
.search-form { display: flex; gap: 0.5rem; }
.search-form input { padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.85rem; transition: border-color var(--transition); }
.search-form input:focus { outline: none; border-color: var(--accent); }

/* === PAGINATION === */
.pagination { display: flex; gap: 3px; margin-top: 1.25rem; justify-content: center; }
.page-link {
    padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    text-decoration: none; color: var(--text-muted); font-size: 0.82rem; font-weight: 500;
    transition: all var(--transition);
}
.page-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.page-link.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* === MODALS === */
.modal {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); z-index: 200;
    justify-content: center; align-items: center;
    animation: modalOverlayIn 0.2s ease;
}
.modal.show { display: flex; }
.modal-content {
    background: var(--card); border-radius: var(--radius-lg); width: 90%; max-width: 500px; max-height: 80vh;
    overflow-y: auto; box-shadow: var(--shadow-lg);
    animation: modalContentIn 0.25s cubic-bezier(0.16,1,0.3,1);
}
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 640px; }
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.modal-close {
    background: none; border: none; font-size: 1.25rem; cursor: pointer; color: var(--text-muted);
    width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.modal-close:hover { background: var(--accent-soft); color: var(--danger); }
.modal-body { padding: 1.25rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

@keyframes modalOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalContentIn { from { opacity: 0; transform: scale(0.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* === UPLOAD ZONE === */
.upload-zone {
    border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 2.5rem; text-align: center;
    cursor: pointer; transition: all 0.25s ease; color: var(--text-muted); min-height: 180px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent); background: rgba(74,107,255,0.03); transform: scale(1.01);
    box-shadow: 0 0 0 4px rgba(74,107,255,0.06);
}
.upload-zone i { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; color: var(--accent); opacity: 0.5; }

/* === UPLOAD PROGRESS === */
.upload-progress-container { padding: 1rem 0; text-align: center; }
.upload-progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 0.75rem; }
.upload-progress-fill {
    height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent));
    background-size: 200% 100%; border-radius: 3px; transition: width 0.3s ease;
    animation: shimmer 1.5s linear infinite; width: 0%;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.upload-progress-text { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.upload-success { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 1rem; color: var(--success); font-weight: 600; animation: fadeSlideIn 0.3s ease; }
.upload-error { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 1rem; color: var(--danger); font-weight: 600; animation: shake 0.4s ease; }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* === FILE SELECT ITEMS === */
.file-select-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.file-select-item:last-child { border-bottom: none; }
.file-select-item i { color: var(--accent); }
.file-select-item span:first-of-type { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-select-size { color: var(--text-muted); font-size: 0.75rem; flex-shrink: 0; }

/* === SELECTION BAR === */
.selection-bar {
    display: none; align-items: center; justify-content: space-between; padding: 0.65rem 1rem;
    background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff;
    border-radius: var(--radius); margin-bottom: 1rem; animation: fadeSlideIn 0.2s ease;
    box-shadow: 0 4px 12px rgba(74,107,255,0.25);
}
.selection-bar .btn { background: rgba(255,255,255,0.2); color: #fff; border: none; backdrop-filter: blur(4px); }
.selection-bar .btn:hover { background: rgba(255,255,255,0.3); }
.selection-bar .btn-danger { background: rgba(239,68,68,0.8); }

.file-select-cb { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }

/* === VERSIONS === */
.version-item {
    display: flex; justify-content: space-between; align-items: center; padding: 0.75rem;
    border: 1px solid var(--border); border-radius: 8px; margin-bottom: 0.5rem;
    transition: all var(--transition);
}
.version-item:hover { border-color: var(--accent); background: rgba(74,107,255,0.02); }
.version-info { display: flex; gap: 1rem; align-items: center; font-size: 0.85rem; }
.version-info strong { color: var(--accent); }
.version-info span { color: var(--text-muted); font-size: 0.78rem; }

/* === SHARE LINK BOX === */
.share-link-box { margin-top: 1rem; padding: 1rem; background: var(--bg); border-radius: 8px; border: 1px solid var(--border); }
.share-link-box label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; }

/* === USER SEARCH === */
.user-search-item {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem; border-radius: 8px;
    cursor: pointer; transition: background var(--transition);
}
.user-search-item:hover { background: var(--accent-soft); }
.user-avatar-sm {
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}
.user-search-item strong { font-size: 0.88rem; }
.user-search-item span { font-size: 0.78rem; color: var(--text-muted); }
.user-search-empty { text-align: center; padding: 1rem; color: var(--text-muted); font-size: 0.85rem; }
.user-search-selected { padding: 0.5rem; color: var(--success); font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; }

/* === NOTIFICATION TRIGGER & PANEL === */
.notif-trigger { position: relative; cursor: pointer; padding: 7px; border-radius: 8px; background: none; border: none; color: var(--text-muted); font-size: 1rem; transition: all var(--transition); }
.notif-trigger:hover { background: var(--accent-soft); color: var(--text); }
.notif-badge {
    position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; border-radius: 8px;
    background: var(--danger); color: #fff; font-size: 0.6rem; font-weight: 700;
    display: none; align-items: center; justify-content: center; padding: 0 4px;
    animation: notifPulse 2s ease infinite;
}
@keyframes notifPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.notif-panel {
    display: none; position: absolute; top: calc(100% + 8px); right: 0; width: 360px; max-height: 420px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); z-index: 200; overflow: hidden;
    animation: modalContentIn 0.2s cubic-bezier(0.16,1,0.3,1);
}
.notif-panel.show { display: block; }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); }
.notif-header h4 { font-size: 0.9rem; font-weight: 700; }
.notif-header button { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.78rem; font-weight: 600; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.notif-item { display: flex; gap: 0.75rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--transition); }
.notif-item:hover { background: rgba(74,107,255,0.03); }
.notif-item.unread { background: rgba(74,107,255,0.05); }
.notif-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0; }
.notif-icon.share { background: #dbeafe; color: #2563eb; }
.notif-icon.access { background: #d1fae5; color: #059669; }
.notif-icon.system { background: #f1f5f9; color: #64748b; }
.notif-icon.upload { background: #ede9fe; color: #7c3aed; }
.notif-icon.payment { background: #fef3c7; color: #d97706; }
.notif-content { flex: 1; min-width: 0; }
.notif-content strong { font-size: 0.82rem; display: block; }
.notif-content p { font-size: 0.78rem; color: var(--text-muted); margin: 2px 0 0; line-height: 1.4; }
.notif-time { font-size: 0.7rem; color: var(--text-muted); flex-shrink: 0; }
.notif-empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); font-size: 0.85rem; }
.notif-empty i { font-size: 2rem; display: block; margin-bottom: 0.75rem; opacity: 0.3; }

/* === EDITOR BUTTON === */
.editor-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px; border: none; background: rgba(74,107,255,0.08); color: var(--accent); font-size: 0.75rem; cursor: pointer; font-weight: 600; transition: all var(--transition); }
.editor-btn:hover { background: rgba(74,107,255,0.15); }

/* === FOLDER PICKER === */
.folder-picker { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.folder-pick-breadcrumb {
    display: flex; align-items: center; gap: 0.25rem; padding: 0.5rem 0.75rem;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border); font-size: 0.82rem; flex-wrap: wrap;
}
.folder-pick-crumb { cursor: pointer; padding: 2px 4px; border-radius: 4px; color: var(--accent); }
.folder-pick-crumb:hover { background: var(--accent-soft); }
.folder-pick-crumb.active { color: var(--text-primary); font-weight: 600; cursor: default; }
.folder-pick-crumb.active:hover { background: transparent; }
.folder-pick-sep { color: var(--text-muted); margin: 0 2px; }
.folder-pick-list { max-height: 250px; overflow-y: auto; }
.folder-pick-item {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem;
    cursor: pointer; transition: background var(--transition); border-bottom: 1px solid var(--border); font-size: 0.88rem;
}
.folder-pick-item:last-child { border-bottom: none; }
.folder-pick-item:hover { background: var(--accent-soft); }
.folder-pick-item.selected { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.folder-pick-arrow { margin-left: auto; padding: 2px 6px !important; font-size: 0.7rem; }

/* === CARD GRID === */
.card-grid { display: grid; gap: 1rem; }
.card-grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.u-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem;
    text-align: center; transition: all var(--transition);
}
.u-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.u-card-icon { display: inline-flex; width: 48px; height: 48px; border-radius: 12px; align-items: center; justify-content: center; font-size: 1.2rem; background: #ede9fe; color: #7c3aed; margin-bottom: 0.75rem; }
.u-card h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.u-card p { font-size: 0.85rem; color: var(--text-muted); }

/* === BILLING PAGE === */
.billing-header { text-align: center; margin-bottom: 2rem; }
.billing-header h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.35rem; }
.billing-header p { color: var(--text-muted); font-size: 0.92rem; }

.plan-card {
    background: var(--card); border: 2px solid var(--border); border-radius: var(--radius-lg);
    padding: 1.75rem; position: relative; transition: all var(--transition);
}
.plan-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.plan-card.current { border-color: var(--success); }
.plan-card.popular { border-color: var(--accent); }
.plan-badge {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff;
    padding: 3px 12px; border-radius: 20px; font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
}
.plan-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.35rem; }
.plan-price { font-size: 1.8rem; font-weight: 800; color: var(--accent); line-height: 1.2; }
.plan-price span { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.plan-period { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 1rem; }
.plan-features { list-style: none; margin: 1rem 0; text-align: left; }
.plan-features li { padding: 0.35rem 0; font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.plan-features li i { color: var(--success); font-size: 0.75rem; width: 16px; text-align: center; }

/* === SETTINGS PAGE === */
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav-item {
    display: flex; align-items: center; gap: 8px; padding: 0.55rem 0.75rem; border-radius: 8px;
    text-decoration: none; color: var(--text-muted); font-size: 0.85rem; font-weight: 500;
    transition: all var(--transition);
}
.settings-nav-item:hover { background: var(--accent-soft); color: var(--text); }
.settings-nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.settings-section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.settings-section h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.settings-row { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: none; }
.settings-row-label { font-size: 0.88rem; font-weight: 500; }
.settings-row-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* === NOTIFICATIONS PAGE === */
.notif-page-item { display: flex; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.notif-page-item:hover { background: rgba(74,107,255,0.02); }
.notif-page-item.unread { background: rgba(74,107,255,0.04); }
.notif-page-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; }
.notif-page-content { flex: 1; }
.notif-page-content strong { font-size: 0.88rem; display: block; margin-bottom: 2px; }
.notif-page-content p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; }
.notif-page-time { font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; margin-top: 2px; }

/* === ACTIVITY PAGE === */
.log-table { width: 100%; border-collapse: collapse; }
.log-table th { text-align: left; padding: 0.6rem 0.75rem; font-size: 0.73rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; background: var(--bg); border-bottom: 1px solid var(--border); }
.log-table td { padding: 0.6rem 0.75rem; font-size: 0.85rem; border-bottom: 1px solid var(--border); }
.log-table tr:last-child td { border-bottom: none; }
.log-table tr { transition: background var(--transition); }
.log-table tr:hover td { background: rgba(74,107,255,0.02); }

/* === SKELETON LOADING === */
.skeleton { background: linear-gradient(90deg, var(--border) 25%, #f1f5f9 50%, var(--border) 75%); background-size: 200% 100%; animation: skeletonShimmer 1.5s ease-in-out infinite; border-radius: 6px; }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text:last-child { width: 60%; }
.skeleton-icon { width: 40px; height: 40px; border-radius: 10px; }
.skeleton-card { height: 70px; border-radius: var(--radius); margin-bottom: 0.65rem; }
@keyframes skeletonShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* === TOASTS === */
.toast-container { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 99999; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast {
    pointer-events: auto; display: flex; align-items: center; gap: 0.6rem; padding: 0.75rem 1rem;
    border-radius: var(--radius); font-size: 0.88rem; font-weight: 500;
    box-shadow: var(--shadow-lg); min-width: 280px; max-width: 420px;
    animation: toastIn 0.3s cubic-bezier(0.16,1,0.3,1); transition: all 0.25s ease;
}
.toast.hide { animation: toastOut 0.25s ease forwards; }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast-msg { flex: 1; line-height: 1.4; }
.toast-close { background: none; border: none; cursor: pointer; opacity: 0.5; font-size: 0.85rem; padding: 0; color: inherit; flex-shrink: 0; transition: opacity var(--transition); }
.toast-close:hover { opacity: 1; }
.toast.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.toast.success .toast-icon { color: #22c55e; }
.toast.error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.toast.error .toast-icon { color: #ef4444; }
.toast.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.toast.info .toast-icon { color: #3b82f6; }
.toast.warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.toast.warning .toast-icon { color: #f59e0b; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(24px); } }

/* === GENERAL ANIMATIONS === */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fileItemIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .settings-layout { grid-template-columns: 180px 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay {
        display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
        z-index: 99; backdrop-filter: blur(2px);
    }
    .sidebar-overlay.show { display: block; }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .file-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { flex-direction: row; overflow-x: auto; padding-bottom: 0.5rem; }
    .settings-nav-item { white-space: nowrap; }
    .header-search input { width: 120px; }
    .notif-panel { width: calc(100vw - 2rem); right: -1rem; }
    .content-body { padding: 1rem; }
    .content-header { padding: 0 1rem; }
}
