/* ===== CSS Variables ===== */
:root {
    --bg-dark: #0f172a;
    --bg-darker: #0a0f1c;
    --bg-card: #1e293b;
    --bg-card-hover: #273549;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #8b7355;
    --accent-light: #a89070;
    --accent-glow: rgba(139, 115, 85, 0.3);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --border: #334155;
    --border-light: #475569;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
}

/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    font-feature-settings: "tnum";
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

::-webkit-scrollbar-corner {
    background: var(--bg-darker);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg-darker);
}

/* ===== Login Screen ===== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, #1a1a2e 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(139, 115, 85, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    animation: gradientMove 20s ease-in-out infinite;
}

@keyframes gradientMove {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(2%, 2%) rotate(5deg);
    }
}

.login-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 50px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.login-logo img {
    width: 80px;
    height: auto;
    margin-bottom: 24px;
    opacity: 0.9;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 36px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form .form-group {
    text-align: right;
}

.login-form .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper svg {
    position: absolute;
    right: 14px;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.input-wrapper input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.login-error {
    color: var(--danger);
    font-size: 0.9rem;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: var(--accent);
    border: none;
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.login-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== Admin Panel ===== */
.admin-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.header-title h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-title p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.datetime-display {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 6px;
}

.date-part,
.time-part {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.date-part svg,
.time-part svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.logout-btn {
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: var(--danger);
    color: white;
}

.logout-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== Stats Section ===== */
.stats-section {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 28px 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.stat-card.active {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.total::before {
    background: var(--gradient-1);
}

.stat-card.images::before {
    background: var(--gradient-2);
}

.stat-card.videos::before {
    background: var(--gradient-3);
}

.stat-card.audio::before {
    background: var(--gradient-4);
}

.stat-card.documents::before {
    background: var(--gradient-5);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--border-light);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card.total .stat-icon {
    background: rgba(102, 126, 234, 0.15);
}

.stat-card.images .stat-icon {
    background: rgba(240, 147, 251, 0.15);
}

.stat-card.videos .stat-icon {
    background: rgba(79, 172, 254, 0.15);
}

.stat-card.audio .stat-icon {
    background: rgba(67, 233, 123, 0.15);
}

.stat-card.documents .stat-icon {
    background: rgba(250, 112, 154, 0.15);
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-card.total .stat-icon svg {
    color: #667eea;
}

.stat-card.images .stat-icon svg {
    color: #f093fb;
}

.stat-card.videos .stat-icon svg {
    color: #4facfe;
}

.stat-card.audio .stat-icon svg {
    color: #43e97b;
}

.stat-card.documents .stat-icon svg {
    color: #fa709a;
}

.stat-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== Toolbar ===== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    margin: 0 32px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 16px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box svg {
    position: absolute;
    right: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-box input {
    width: 280px;
    padding: 12px 44px 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn svg {
    width: 16px;
    height: 16px;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.refresh-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.refresh-btn svg {
    width: 20px;
    height: 20px;
}

.upload-new-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent);
    border: none;
    border-radius: 10px;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-new-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.upload-new-btn svg {
    width: 18px;
    height: 18px;
}

/* ===== Files Section ===== */
.files-section {
    flex: 1;
    padding: 0 32px 32px;
}

.files-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.files-table {
    width: 100%;
    border-collapse: collapse;
}

.files-table th {
    background: var(--bg-darker);
    padding: 16px 20px;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.files-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.files-table tr:last-child td {
    border-bottom: none;
}

.files-table tr:hover td {
    background: var(--bg-card-hover);
}

.file-preview {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-darker);
}

.file-type-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.file-type-icon.image {
    background: rgba(240, 147, 251, 0.15);
}

.file-type-icon.video {
    background: rgba(79, 172, 254, 0.15);
}

.file-type-icon.audio {
    background: rgba(67, 233, 123, 0.15);
}

.file-type-icon.document {
    background: rgba(250, 112, 154, 0.15);
}

.file-name {
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-extension {
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.file-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.file-type-badge.image {
    background: rgba(240, 147, 251, 0.15);
    color: #f093fb;
}

.file-type-badge.video {
    background: rgba(79, 172, 254, 0.15);
    color: #4facfe;
}

.file-type-badge.audio {
    background: rgba(67, 233, 123, 0.15);
    color: #43e97b;
}

.file-type-badge.document {
    background: rgba(250, 112, 154, 0.15);
    color: #fa709a;
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.file-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.file-description {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.action-btn.view {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.action-btn.view:hover {
    background: var(--info);
    color: white;
}

.action-btn.download {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.action-btn.download:hover {
    background: var(--success);
    color: white;
}

.action-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.action-btn.delete:hover {
    background: var(--danger);
    color: white;
}

/* ===== No Files Message ===== */
.no-files {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.no-files-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.no-files-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-files-icon svg {
    width: 60px;
    height: 60px;
}

.no-files-icon.all {
    background: rgba(102, 126, 234, 0.1);
}

.no-files-icon.all svg {
    color: #667eea;
}

.no-files-icon.image {
    background: rgba(240, 147, 251, 0.1);
}

.no-files-icon.image svg {
    color: #f093fb;
}

.no-files-icon.video {
    background: rgba(79, 172, 254, 0.1);
}

.no-files-icon.video svg {
    color: #4facfe;
}

.no-files-icon.audio {
    background: rgba(67, 233, 123, 0.1);
}

.no-files-icon.audio svg {
    color: #43e97b;
}

.no-files-icon.document {
    background: rgba(250, 112, 154, 0.1);
}

.no-files-icon.document svg {
    color: #fa709a;
}

/* ===== Loading Indicator ===== */
.loading-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px 20px;
    color: var(--text-muted);
}

.loading-indicator.active {
    display: flex;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Pagination Controls ===== */
.pagination-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    margin-top: 10px;
}

.pagination-stats {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination-stats span {
    color: var(--text-primary);
    font-weight: 700;
}

.btn-load-more {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-load-more svg {
    width: 20px;
    height: 20px;
}

/* ===== Modal Overlay ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

/* ===== Preview Modal ===== */
.preview-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border);
}

.preview-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.preview-body {
    flex: 1;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    background: var(--bg-darker);
}

.preview-body img {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
}

.preview-body video {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
}

.preview-body audio {
    width: 100%;
    max-width: 500px;
}

.preview-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
}

/* ===== Upload Modal ===== */
.upload-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
}

/* ===== File Upload Area ===== */
.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--accent);
    background: rgba(139, 115, 85, 0.05);
}

.file-upload-area svg {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.file-upload-area p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.file-input-label {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input-label:hover {
    background: var(--accent-light);
}

.file-input-label input {
    display: none;
}

.selected-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.selected-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-darker);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.selected-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow: hidden;
}

.selected-file-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.selected-file-size {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.remove-file-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.remove-file-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.remove-file-btn svg {
    width: 16px;
    height: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group textarea {
    width: 100%;
    padding: 14px;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea::placeholder {
    color: var(--text-muted);
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-darker);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s ease;
}

/* ===== Delete Modal ===== */
.delete-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.delete-icon {
    width: 72px;
    height: 72px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.delete-icon svg {
    width: 36px;
    height: 36px;
    color: var(--danger);
}

.delete-modal h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.delete-modal p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.delete-file-name {
    color: var(--text-primary);
    font-weight: 600;
    background: var(--bg-darker);
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 24px !important;
    word-break: break-all;
}

.delete-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ===== Buttons ===== */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-light);
}

.btn-secondary {
    background: var(--bg-darker);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 16px 28px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    width: 24px;
    height: 24px;
    color: var(--success);
}

.toast span {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .stats-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .admin-header {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 16px;
        text-align: center;
    }

    .header-right {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .header-icon {
        display: none;
    }

    .header-title h1 {
        font-size: 1.3rem;
    }

    .header-left {
        width: 100%;
        justify-content: center;
        gap: 10px;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px 16px;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
        gap: 10px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .toolbar {
        flex-direction: column;
        padding: 16px;
        margin: 0 16px 16px;
        gap: 12px;
    }

    .toolbar-right,
    .toolbar-left {
        width: 100%;
    }

    .upload-new-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .filter-buttons {
        flex-wrap: wrap;
    }

    .files-section {
        padding: 0 16px 16px;
    }

    .files-table-container {
        overflow-x: auto;
    }

    .files-table {
        min-width: 700px;
    }
}

@media (max-width: 600px) {
    .login-container {
        padding: 36px 24px;
    }

    .admin-header {
        padding: 12px;
    }

    .header-title h1 {
        font-size: 1.1rem;
    }

    .datetime-display {
        flex-direction: column;
        gap: 6px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .stats-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .toolbar {
        margin: 0 12px 12px;
        padding: 12px;
    }

    .upload-new-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .filter-btn span {
        display: none;
    }

    .refresh-btn,
    .logout-btn {
        width: 36px;
        height: 36px;
    }

    .refresh-btn svg,
    .logout-btn svg {
        width: 18px;
        height: 18px;
    }
}