/* ===== ByteTiger Cloud Disk - Minimal Black & White ===== */

/* ===== CSS Variables ===== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f8f8;
    --bg-tertiary: #eeeeee;
    --text-primary: #111111;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border: #e5e5e5;
    --border-light: #f0f0f0;
    --accent: #000000;
    --accent-hover: #333333;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --success: #16a34a;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --sidebar-width: 240px;
    --nav-height: 56px;
    --radius: 6px;
    --radius-lg: 12px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Global Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { opacity: 0.7; }

/* ===== Typography ===== */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; }
p { color: var(--text-secondary); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-primary);
    white-space: nowrap;
    user-select: none;
    letter-spacing: 0.01em;
}
.btn:hover:not(:disabled) {
    border-color: var(--text-primary);
    background: var(--bg-secondary);
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.97); }

.btn-primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-danger {
    background: white;
    color: var(--danger);
    border-color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
    background: var(--danger);
    color: white;
}

.btn-ghost {
    border-color: transparent;
    background: transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-secondary); }

.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-block { width: 100%; }

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes toastSlide {
    0% { opacity: 0; transform: translate(-50%, -20px); }
    100% { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes checkboxPop {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes fileRowEnter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Auth Pages ===== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-secondary);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 380px;
    animation: fadeInUp 0.5s ease;
}

.auth-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.auth-header .logo img {
    height: 40px;
    width: auto;
}

.auth-header .logo h1 {
    font-size: 22px;
    color: var(--text-primary);
    font-weight: 700;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-tertiary);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.auth-form label i {
    margin-right: 6px;
    color: var(--text-tertiary);
}

.auth-form input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
    background: var(--bg-primary);
    color: var(--text-primary);
}
.auth-form input::placeholder { color: var(--text-tertiary); }
.auth-form input:focus {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--text-primary);
}

.error-message {
    background: #fef2f2;
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid #fecaca;
    animation: slideDown 0.3s ease;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-tertiary);
}
.auth-footer a { color: var(--text-primary); font-weight: 500; }

/* ===== Top Navigation ===== */
.top-nav {
    height: var(--nav-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    animation: slideDown 0.3s ease;
}

.nav-left {
    display: flex;
    align-items: center;
    min-width: calc(var(--sidebar-width) - 20px);
}
.nav-left .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}
.nav-left .logo img { height: 28px; width: auto; }

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 24px;
}
.search-box { position: relative; width: 100%; max-width: 480px; }
.search-box > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 14px;
}
.search-box input {
    width: 100%;
    padding: 7px 12px 7px 34px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    background: var(--bg-secondary);
    outline: none;
    transition: var(--transition);
}
.search-box input:focus {
    background: var(--bg-primary);
    border-color: var(--text-primary);
}

.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 360px;
    overflow-y: auto;
    z-index: 200;
    animation: scaleIn 0.2s ease;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: var(--transition);
}
.search-result-item:hover { background: var(--bg-secondary); }
.search-result-item i { width: 18px; text-align: center; font-size: 14px; }
.search-result-item .result-name { flex: 1; font-size: 13px; }
.search-result-item .result-path { font-size: 12px; color: var(--text-tertiary); }

/* ===== Nav Right ===== */
.nav-right { display: flex; align-items: center; gap: 12px; }

.user-menu { position: relative; }
.user-avatar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}
.user-avatar:hover { background: var(--bg-secondary); border-color: var(--border); }
.user-avatar i:first-child { font-size: 20px; color: var(--text-secondary); }
.user-avatar span { font-size: 13px; color: var(--text-primary); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-avatar i:last-child { font-size: 10px; color: var(--text-tertiary); }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    z-index: 200;
    animation: scaleIn 0.15s ease;
    overflow: hidden;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    transition: var(--transition);
    border-bottom: 1px solid var(--border-light);
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: var(--bg-secondary); }
.dropdown-item i { width: 16px; color: var(--text-tertiary); font-size: 13px; }

/* ===== Mobile Toggle ===== */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
}

/* ===== Main Layout ===== */
.main-container {
    display: flex;
    height: calc(100vh - var(--nav-height));
    margin-top: var(--nav-height);
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    overflow-y: auto;
}

.nav-section { margin-bottom: 4px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
    margin-bottom: 1px;
    user-select: none;
}
.nav-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.nav-item.active { background: var(--bg-tertiary); color: var(--text-primary); font-weight: 500; }
.nav-item i { width: 18px; text-align: center; font-size: 15px; }

.nav-divider { height: 1px; background: var(--border); margin: 8px 0; }

.storage-info {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    animation: fadeIn 0.5s ease;
}

.storage-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.storage-bar { height: 4px; background: var(--bg-tertiary); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.storage-used { height: 100%; background: var(--text-primary); border-radius: 2px; transition: width 0.6s ease; }

.storage-text { font-size: 11px; color: var(--text-tertiary); }

/* ===== Content ===== */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-secondary);
}

/* ===== Breadcrumb ===== */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}

.breadcrumb { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.breadcrumb-item {
    font-size: 13px;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}
.breadcrumb-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.breadcrumb-item:last-child { color: var(--text-primary); font-weight: 500; cursor: default; }
.breadcrumb-item:last-child:hover { background: none; }
.breadcrumb-item + .breadcrumb-item::before { content: '/'; margin-right: 6px; color: var(--border); }

.view-options { display: flex; gap: 4px; }
.view-btn {
    padding: 5px 8px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: var(--transition);
    font-size: 13px;
}
.view-btn:hover { color: var(--text-primary); border-color: var(--text-tertiary); }
.view-btn.active { background: var(--accent); color: white; border-color: var(--accent); }

/* ===== Toolbar ===== */
.toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    animation: slideDown 0.2s ease;
}

.selected-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ===== File Area ===== */
.file-area {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.file-list { min-height: 200px; }

/* ===== List View ===== */
.file-list.list-view .file-row {
    display: flex;
    align-items: center;
    padding: 9px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    gap: 12px;
    background: var(--bg-primary);
    margin-bottom: 2px;
    border: 1px solid transparent;
    animation: fileRowEnter 0.3s ease both;
}
.file-list.list-view .file-row:nth-child(1) { animation-delay: 0.02s; }
.file-list.list-view .file-row:nth-child(2) { animation-delay: 0.04s; }
.file-list.list-view .file-row:nth-child(3) { animation-delay: 0.06s; }
.file-list.list-view .file-row:nth-child(4) { animation-delay: 0.08s; }
.file-list.list-view .file-row:nth-child(5) { animation-delay: 0.10s; }
.file-list.list-view .file-row:nth-child(6) { animation-delay: 0.12s; }
.file-list.list-view .file-row:nth-child(7) { animation-delay: 0.14s; }
.file-list.list-view .file-row:nth-child(8) { animation-delay: 0.16s; }
.file-list.list-view .file-row:nth-child(9) { animation-delay: 0.18s; }
.file-list.list-view .file-row:nth-child(10) { animation-delay: 0.20s; }

.file-list.list-view .file-row:hover { background: var(--bg-secondary); border-color: var(--border); transform: translateX(2px); }
.file-list.list-view .file-row.selected { background: var(--bg-tertiary); border-color: var(--text-primary); }

.file-list.list-view .file-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}
.file-list.list-view .file-row.selected .file-checkbox {
    background: var(--accent);
    border-color: var(--accent);
    animation: checkboxPop 0.2s ease;
}
.file-list.list-view .file-row.selected .file-checkbox::after { content: '✓'; color: white; font-size: 11px; font-weight: bold; }

.file-list.list-view .file-icon { width: 28px; text-align: center; font-size: 18px; flex-shrink: 0; }
.file-list.list-view .file-name { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list.list-view .file-size { width: 80px; text-align: right; font-size: 12px; color: var(--text-tertiary); }
.file-list.list-view .file-time { width: 140px; text-align: right; font-size: 12px; color: var(--text-tertiary); }

/* ===== Grid View ===== */
.file-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 12px;
}

.file-list.grid-view .file-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 12px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    background: var(--bg-primary);
    position: relative;
    animation: fileRowEnter 0.3s ease both;
}
.file-list.grid-view .file-row:nth-child(1) { animation-delay: 0.02s; }
.file-list.grid-view .file-row:nth-child(2) { animation-delay: 0.04s; }
.file-list.grid-view .file-row:nth-child(3) { animation-delay: 0.06s; }
.file-list.grid-view .file-row:nth-child(4) { animation-delay: 0.08s; }
.file-list.grid-view .file-row:nth-child(5) { animation-delay: 0.10s; }
.file-list.grid-view .file-row:nth-child(6) { animation-delay: 0.12s; }
.file-list.grid-view .file-row:nth-child(7) { animation-delay: 0.14s; }
.file-list.grid-view .file-row:nth-child(8) { animation-delay: 0.16s; }
.file-list.grid-view .file-row:nth-child(9) { animation-delay: 0.18s; }
.file-list.grid-view .file-row:nth-child(10) { animation-delay: 0.20s; }

.file-list.grid-view .file-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.file-list.grid-view .file-row.selected { background: var(--bg-secondary); border-color: var(--text-primary); }

.file-list.grid-view .file-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.file-list.grid-view .file-row.selected .file-checkbox {
    background: var(--accent);
    border-color: var(--accent);
    animation: checkboxPop 0.2s ease;
}
.file-list.grid-view .file-row.selected .file-checkbox::after { content: '✓'; color: white; font-size: 11px; font-weight: bold; }

.file-list.grid-view .file-icon { font-size: 36px; margin-bottom: 8px; }
.file-list.grid-view .file-name { font-size: 12px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.file-list.grid-view .file-size { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }
.file-list.grid-view .file-time { display: none; }

/* ===== Empty & Loading States ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-tertiary);
    animation: fadeInUp 0.5s ease;
}

.empty-state i { font-size: 56px; margin-bottom: 16px; color: var(--border); }
.empty-state h3 { font-size: 16px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.empty-state p { font-size: 13px; }

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-tertiary);
}
.loading-state i { font-size: 28px; margin-bottom: 12px; animation: spin 1s linear infinite; }

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal-full { align-items: flex-start; padding-top: 60px; }

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.25s ease;
}

.modal-full-content { max-width: 800px; max-height: 85vh; }
.modal-sm { max-width: 380px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 15px; color: var(--text-primary); font-weight: 600; }

.close-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: var(--transition);
    border-radius: 4px;
}
.close-btn:hover { color: var(--text-primary); background: var(--bg-secondary); }

.modal-body { padding: 20px; }

/* ===== Upload Zone ===== */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--text-primary);
    background: var(--bg-secondary);
}
.drop-zone i { font-size: 40px; color: var(--border); margin-bottom: 12px; }
.drop-zone p { color: var(--text-tertiary); margin-bottom: 12px; font-size: 13px; }

.upload-progress { margin-top: 16px; }
.upload-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    animation: slideDown 0.2s ease;
}
.upload-item .upload-name { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item .upload-status { font-size: 12px; color: var(--text-tertiary); min-width: 50px; text-align: right; }
.upload-item .upload-bar { flex: 1; height: 3px; background: var(--bg-tertiary); border-radius: 2px; overflow: hidden; max-width: 120px; }
.upload-item .upload-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.3s ease; }

/* ===== Custom Checkbox ===== */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    user-select: none;
}
.checkbox-label input[type="checkbox"] {
    display: none;
}
.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--accent);
    border-color: var(--accent);
    animation: checkboxPop 0.2s ease;
}
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* ===== Form ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.form-group input, .form-group select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    outline: none;
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-primary);
}
.form-group input:focus, .form-group select:focus { border-color: var(--text-primary); box-shadow: 0 0 0 1px var(--text-primary); }
.form-group select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }

/* ===== Folder Tree ===== */
.folder-tree { max-height: 280px; overflow-y: auto; margin-bottom: 16px; }
.folder-tree-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}
.folder-tree-item:hover { background: var(--bg-secondary); }
.folder-tree-item.selected { background: var(--bg-tertiary); color: var(--text-primary); font-weight: 500; }
.folder-tree-item i { color: var(--text-tertiary); }

/* ===== Context Menu ===== */
.context-menu {
    position: fixed;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 150px;
    z-index: 2000;
    padding: 4px;
    animation: scaleIn 0.12s ease;
}
.context-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    border-radius: 4px;
    transition: var(--transition);
}
.context-menu-item:hover { background: var(--bg-secondary); }
.context-menu-item i { width: 16px; color: var(--text-tertiary); font-size: 13px; }
.context-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 13px;
    z-index: 3000;
    box-shadow: var(--shadow-lg);
    animation: toastSlide 0.3s ease;
    font-weight: 500;
}

/* ===== Share Page ===== */
.share-page {
    background: var(--bg-secondary);
    min-height: 100vh;
}

.share-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px;
    animation: fadeInUp 0.4s ease;
}

.share-header {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.share-info { display: flex; align-items: center; gap: 16px; }
.share-info img { height: 40px; width: auto; }
.share-info h2 { font-size: 18px; color: var(--text-primary); }
.share-info p { font-size: 13px; color: var(--text-tertiary); }

.share-content {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ===== Admin Styles ===== */
.admin-page {
    background: var(--bg-secondary);
    min-height: 100vh;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    animation: fadeInUp 0.3s ease;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.admin-header h1 { font-size: 22px; }

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--text-primary); }
.stat-card .stat-label { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.admin-table th, .admin-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}
.admin-table th { background: var(--bg-secondary); font-weight: 600; color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.admin-table tr:hover { background: var(--bg-secondary); }
.admin-table td .badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.badge-admin { background: var(--bg-tertiary); color: var(--text-primary); }
.badge-user { background: var(--bg-secondary); color: var(--text-tertiary); }
.badge-active { color: var(--success); }
.badge-disabled { color: var(--danger); }

.admin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.admin-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-tertiary);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    font-weight: 500;
}
.admin-tab:hover { color: var(--text-primary); }
.admin-tab.active { color: var(--text-primary); border-bottom-color: var(--text-primary); }

/* ===== Media Queries - Mobile ===== */
@media (max-width: 768px) {
    :root { --sidebar-width: 0px; --nav-height: 52px; }

    .mobile-toggle { display: block; }
    .nav-left { min-width: auto; }
    .nav-center { position: absolute; top: var(--nav-height); left: 0; right: 0; padding: 8px 12px; background: var(--bg-primary); border-bottom: 1px solid var(--border); display: none; z-index: 99; }
    .nav-center.active { display: flex; }
    .search-box { max-width: 100%; }
    .search-results { position: fixed; left: 12px; right: 12px; }
    
    .sidebar {
        position: fixed;
        left: -260px;
        top: var(--nav-height);
        bottom: 0;
        z-index: 99;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s ease;
    }
    .sidebar.open { left: 0; }
    .sidebar-overlay {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.3);
        z-index: 98;
        display: none;
    }
    .sidebar-overlay.active { display: block; }
    
    .file-list.list-view .file-row { padding: 8px 12px; gap: 8px; }
    .file-list.list-view .file-row .file-time { display: none; }
    .file-list.list-view .file-row .file-size { width: 60px; }
    .file-list.grid-view { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; padding: 8px; }
    
    .auth-card { padding: 28px 24px; }
    
    .admin-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-container { padding: 16px; }
    .admin-table { font-size: 12px; }
    .admin-table th, .admin-table td { padding: 8px 10px; }
    
    .modal-content { max-width: 100%; margin: 10px; max-height: 90vh; }
    .modal-sm { max-width: 100%; }
    
    .nav-right .btn span { display: none; }
}

/* ===== Transition Helpers ===== */
.fade-enter { animation: fadeIn 0.3s ease; }
.fade-enter-up { animation: fadeInUp 0.4s ease; }
.scale-enter { animation: scaleIn 0.25s ease; }