/* ==========================================================================
   Personal Storage - Modern Responsive Design System
   ========================================================================== */

:root {
    --bg-main: #0b0f19;
    --bg-surface: #111827;
    --bg-card: #162032;
    --bg-card-hover: #1e293b;
    --bg-glass: rgba(17, 24, 39, 0.75);
    
    --border-color: #243049;
    --border-focus: #3b82f6;
    
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.25);

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-border: rgba(16, 185, 129, 0.3);

    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --danger-border: rgba(239, 68, 68, 0.3);

    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --warning-border: rgba(245, 158, 11, 0.3);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ==========================================================================
   Typography & Base Links
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.25;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #60a5fa;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-secondary {
    background-color: #1e293b;
    color: var(--text-muted);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: #334155;
    color: var(--text-main);
    border-color: #475569;
}

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

.btn-danger:hover {
    background-color: var(--danger-hover);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 7px 12px;
    font-size: 13px;
    border-radius: 6px;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */

.alert {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid transparent;
}

.alert-success {
    background-color: var(--success-bg);
    border-color: var(--success-border);
    color: #34d399;
}

.alert-danger {
    background-color: var(--danger-bg);
    border-color: var(--danger-border);
    color: #f87171;
}

.alert-warning {
    background-color: var(--warning-bg);
    border-color: var(--warning-border);
    color: #fbbf24;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.alert-link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.alert-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    margin-left: 12px;
}

.alert-close:hover {
    opacity: 1;
}

/* ==========================================================================
   Authentication Pages (login.php & setup.php)
   ========================================================================== */

.auth-body {
    background: radial-gradient(circle at top, #172554 0%, #0b0f19 50%, #030712 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.brand-header {
    text-align: center;
    margin-bottom: 28px;
}

.brand-logo {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px var(--primary-glow);
}

.brand-logo svg {
    width: 28px;
    height: 28px;
    stroke: #ffffff;
}

.brand-logo.small {
    width: 38px;
    height: 38px;
    margin: 0;
    border-radius: var(--radius-sm);
}

.brand-logo.small svg {
    width: 20px;
    height: 20px;
}

.brand-header h1 {
    font-size: 24px;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.setup-banner {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.setup-banner strong {
    color: #38bdf8;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: var(--text-dim);
    pointer-events: none;
    transition: var(--transition);
    z-index: 2;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
}

.input-icon-wrapper input[type="text"],
.input-icon-wrapper input[type="password"],
.input-icon-wrapper input {
    padding-left: 44px !important;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-icon-wrapper input:focus + .input-icon,
.input-icon-wrapper input:focus ~ .input-icon {
    stroke: var(--primary);
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
}

.badge-lock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-dim);
    background: rgba(30, 41, 59, 0.4);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   Dashboard Layout (dashboard.php)
   ========================================================================== */

.dashboard-body {
    background-color: var(--bg-main);
}

/* Top Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #ffffff;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Container */
.dashboard-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

.dashboard-header {
    margin-bottom: 28px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    border-color: #334155;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-wrap svg {
    width: 24px;
    height: 24px;
}

.icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.icon-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.icon-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==========================================================================
   Upload Section & Drag-and-Drop Dropzone
   ========================================================================== */

.upload-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.upload-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.dropzone {
    border: 2px dashed #334155;
    border-radius: var(--radius-md);
    padding: 36px 20px;
    text-align: center;
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.dropzone:hover,
.dropzone.dropzone-active {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.06);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.file-input-hidden {
    display: none;
}

.dropzone-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    background: rgba(59, 130, 246, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
}

.dropzone-icon svg {
    width: 26px;
    height: 26px;
}

.dropzone-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.dropzone-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.dropzone-hint strong {
    color: #cbd5e1;
}

.file-selection-preview {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1e293b;
    border: 1px solid #3b82f6;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
}

.selected-file-name {
    color: #ffffff;
    font-weight: 500;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-file-size {
    color: #94a3b8;
    font-size: 12px;
}

.upload-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================================
   Files Section & Grid
   ========================================================================== */

.files-section {
    margin-bottom: 40px;
}

.files-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.files-count {
    font-size: 13px;
    color: var(--text-dim);
    margin-left: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.search-box {
    position: relative;
    width: 280px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    stroke: var(--text-dim);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    font-size: 13px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Empty State */
.empty-state {
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 60px 24px;
    text-align: center;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: var(--text-dim);
}

.empty-icon svg {
    width: 100%;
    height: 100%;
}

.empty-title {
    font-size: 18px;
    color: var(--text-main);
}

.empty-desc {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 440px;
    margin: 8px auto 0;
}

.empty-search-state {
    grid-column: 1 / -1;
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
}

/* File Grid */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.file-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.file-card:hover {
    border-color: #3b82f6;
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.file-card-media {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.file-icon {
    width: 28px;
    height: 28px;
}

.icon-pdf {
    color: #ef4444;
}

.icon-image {
    color: #10b981;
}

.icon-generic {
    color: #60a5fa;
}

.file-card-info {
    margin-bottom: 16px;
}

.file-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
}

.file-meta {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    gap: 6px;
}

.meta-dot {
    color: var(--text-dim);
}

.file-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-pdf {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-image {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-word {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-sheet {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-text {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.icon-word {
    color: #3b82f6;
}

.icon-sheet {
    color: #10b981;
}

.icon-text {
    color: #94a3b8;
}

.file-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #1e293b;
    padding-top: 12px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-view {
    background-color: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.25);
}

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

.btn-download {
    background-color: #1e293b;
    color: #93c5fd;
    border-color: #2e3d55;
}

.btn-download:hover {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.btn-delete {
    background-color: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-delete:hover {
    background-color: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}

/* ==========================================================================
   Modal Dialog
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.15s ease-out;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 440px;
    padding: 28px;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.15s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-icon-danger {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--danger-bg);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-body {
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.modal-file-target {
    font-weight: 600;
    color: var(--text-main);
    background: #0f172a;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin: 12px 0 8px;
    word-break: break-all;
}

.modal-warning-text {
    color: #f87171;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================================================
   Interactive File Preview Modal
   ========================================================================== */

.preview-overlay {
    z-index: 1050;
    padding: 16px;
}

.preview-card {
    max-width: 980px;
    width: 95vw;
    height: 88vh;
    max-height: 860px;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.preview-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #101623;
    flex-shrink: 0;
}

.preview-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.preview-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-header-icon .file-icon {
    width: 26px;
    height: 26px;
}

.preview-modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 380px;
}

.preview-modal-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.preview-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 26px;
    line-height: 1;
    padding: 2px 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-close-modal:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.preview-body {
    flex: 1;
    overflow: auto;
    background: #080c14;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    position: relative;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 16px;
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
}

.preview-text-box {
    width: 100%;
    height: 100%;
    padding: 24px;
    margin: 0;
    background: #090e18;
    color: #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.preview-doc-card {
    text-align: center;
    padding: 40px 20px;
    max-width: 440px;
    margin: auto;
}

.preview-doc-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-doc-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    word-break: break-all;
}

.preview-doc-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.preview-doc-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 280px;
    margin: 0 auto;
}

.preview-loading,
.preview-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: var(--text-muted);
    font-size: 14px;
    padding: 40px 20px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ==========================================================================
   Mobile Responsiveness
   ========================================================================== */

@media (max-width: 768px) {
    .navbar {
        padding: 12px 16px;
    }

    .dashboard-container {
        padding: 20px 16px 40px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .files-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        width: 100%;
    }

    .file-grid {
        grid-template-columns: 1fr;
    }

    .dropzone {
        padding: 24px 16px;
    }

    .user-pill .user-name {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}