@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --bg-0: #05080f;
    --bg-1: #0a1424;
    --bg-2: #121f36;
    --panel: rgba(14, 24, 42, 0.82);
    --panel-strong: rgba(16, 31, 56, 0.92);
    --line: rgba(127, 170, 238, 0.28);
    --text-main: #eaf2ff;
    --text-muted: #8ea4c8;
    --accent: #39b5ff;
    --accent-2: #4ee2cf;
    --ok: #2ac58d;
    --warn: #ffcc5b;
    --bad: #ee5d62;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.35);
}

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

html,
body {
    min-height: 100%;
}

body {
    font-family: 'Exo 2', 'Segoe UI', Tahoma, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(120% 90% at 15% 10%, rgba(57, 181, 255, 0.2), transparent 55%),
        radial-gradient(90% 120% at 85% 0%, rgba(78, 226, 207, 0.15), transparent 50%),
        linear-gradient(150deg, var(--bg-0) 0%, var(--bg-1) 48%, var(--bg-2) 100%);
    padding-bottom: 44px;
}

a {
    color: inherit;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.login-shell {
    width: min(1060px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 22px;
    align-items: stretch;
}

.login-brand,
.login-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(165deg, rgba(16, 28, 48, 0.9), rgba(11, 20, 36, 0.86));
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.login-brand {
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand h1 {
    font-family: 'Space Grotesk', 'Exo 2', sans-serif;
    font-size: clamp(1.85rem, 4vw, 2.65rem);
    letter-spacing: 0.03em;
    margin-bottom: 12px;
}

.login-brand p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 18px;
}

.login-brand ul {
    list-style: none;
    display: grid;
    gap: 10px;
}

.login-brand li {
    border: 1px solid rgba(78, 226, 207, 0.2);
    background: rgba(78, 226, 207, 0.08);
    color: #ccfbf1;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 0.95rem;
}

.login-card {
    padding: 28px;
}

.login-header {
    margin-bottom: 20px;
}

.login-header h2 {
    font-family: 'Space Grotesk', 'Exo 2', sans-serif;
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.login-header p {
    color: var(--text-muted);
}

.login-form {
    display: grid;
    gap: 14px;
}

.captcha-wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.field-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 6px;
    display: block;
}

.login-footer {
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 0.86rem;
    text-align: center;
}

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
.admin-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 44px);
}

/* ---- Sidebar ---- */
.sidebar {
    background: linear-gradient(178deg, rgba(10, 17, 30, 0.97), rgba(6, 11, 22, 0.98));
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 28px 14px 22px;
    position: sticky;
    top: 0;
    height: calc(100vh - 44px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar h2 {
    font-family: 'Space Grotesk', 'Exo 2', sans-serif;
    font-size: 1.15rem;
    text-align: center;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 26px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar ul {
    list-style: none;
    display: grid;
    gap: 4px;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(180, 200, 230, 0.72);
    font-size: 0.92rem;
    font-weight: 500;
    border: 1px solid transparent;
    background: transparent;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.sidebar a::before {
    content: '';
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    border-radius: 3px;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: height 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar a:hover {
    color: #e8f0ff;
    background: rgba(57, 181, 255, 0.07);
}

.sidebar a:hover::before {
    height: 18px;
}

.sidebar a.active {
    color: #f0faff;
    background: rgba(57, 181, 255, 0.12);
    border-color: rgba(57, 181, 255, 0.15);
    font-weight: 600;
}

.sidebar a.active::before {
    height: 24px;
}

/* ---- Main Content ---- */
.main-content {
    padding: 26px 28px;
    overflow-y: auto;
    background:
        radial-gradient(ellipse 60% 50% at 70% 10%, rgba(57, 181, 255, 0.04), transparent),
        transparent;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    background: rgba(12, 20, 36, 0.6);
    backdrop-filter: blur(16px);
}

header h1 {
    font-family: 'Space Grotesk', 'Exo 2', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.last-updated {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================================
   CARDS & GRIDS
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card,
.card {
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(12, 20, 36, 0.55);
    backdrop-filter: blur(14px);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.22s ease;
}

.stat-card:hover,
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    border-color: rgba(57, 181, 255, 0.15);
}

.stat-card {
    padding: 20px 18px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: 0.7;
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
}

.stat-value {
    font-family: 'Space Grotesk', 'Exo 2', sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e0f4ff, #b8e8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-card small {
    color: rgba(155, 179, 216, 0.7);
    font-size: 0.8rem;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 14px;
}

.card {
    padding: 20px;
}

.card h3 {
    margin-bottom: 14px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 10px;
    color: #dce8f8;
}

.info-list {
    display: grid;
    gap: 2px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 8px 4px;
    font-size: 0.9rem;
    transition: background 0.15s ease;
    border-radius: 6px;
}

.info-item:hover {
    background: rgba(57, 181, 255, 0.04);
}

.info-item:last-child {
    border-bottom: 0;
}

.download-list {
    max-height: 260px;
    overflow-y: auto;
}

.download-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 8px 0;
    font-size: 0.9rem;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: rgba(190, 210, 240, 0.85);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select,
.login-form input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(6, 12, 24, 0.7);
    color: #eaf2ff;
    padding: 11px 14px;
    font-size: 0.92rem;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.login-form input:focus {
    border-color: rgba(57, 181, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(57, 181, 255, 0.1), inset 0 0 0 1px rgba(57, 181, 255, 0.15);
    background: rgba(6, 12, 24, 0.9);
}

.news-form {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(8, 14, 26, 0.5);
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: alertSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes alertSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: rgba(42, 197, 141, 0.1);
    border-color: rgba(42, 197, 141, 0.3);
    color: #a8f5d6;
}

.alert-success::before {
    content: '\2713';
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--ok);
}

.alert-error {
    background: rgba(238, 93, 98, 0.1);
    border-color: rgba(238, 93, 98, 0.3);
    color: #ffc8ca;
}

.alert-error::before {
    content: '\2717';
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--bad);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn,
.btn-refresh {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 16px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.01em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
    pointer-events: none;
}

.btn:hover,
.btn-refresh:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.btn:active,
.btn-refresh:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-primary,
.btn-refresh {
    background: linear-gradient(135deg, #1a7aef, #28b0ff);
    color: #f6fcff;
    border-color: rgba(40, 176, 255, 0.3);
}

.btn-primary:hover,
.btn-refresh:hover {
    background: linear-gradient(135deg, #2184f7, #3cbfff);
}

.btn-secondary {
    background: rgba(30, 45, 72, 0.8);
    color: #d0dff4;
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(38, 56, 88, 0.9);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-warning {
    background: linear-gradient(135deg, #e09a2b, #f5c748);
    color: #2a1a00;
    border-color: rgba(245, 199, 72, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #c9413f, #e86058);
    color: #fff5f5;
    border-color: rgba(232, 96, 88, 0.3);
}

.btn-inline {
    min-width: 74px;
}

.btn-block {
    width: 100%;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ============================================================
   FILES
   ============================================================ */
.file-upload {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px;
    background: rgba(8, 14, 28, 0.4);
}

.upload-area {
    border: 2px dashed rgba(57, 181, 255, 0.25);
    border-radius: 14px;
    padding: 28px;
    text-align: center;
    color: rgba(180, 200, 230, 0.7);
    background: rgba(8, 16, 30, 0.5);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.upload-area:hover {
    border-color: rgba(57, 181, 255, 0.5);
    background: rgba(12, 22, 40, 0.7);
    color: #d0e4ff;
}

.progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 999px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-list {
    max-height: 430px;
    overflow: auto;
    display: grid;
    gap: 6px;
}

.file-item {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    background: rgba(8, 14, 26, 0.5);
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    transition: all 0.18s ease;
}

.file-item:hover {
    background: rgba(12, 20, 36, 0.7);
    border-color: rgba(57, 181, 255, 0.12);
}

.file-info {
    min-width: 0;
}

.file-name {
    font-weight: 600;
    word-break: break-all;
    font-size: 0.92rem;
}

.file-meta {
    color: rgba(140, 165, 200, 0.7);
    font-size: 0.82rem;
    margin-top: 3px;
}

.file-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.section-note {
    margin: 0 0 12px;
    color: rgba(195, 212, 240, 0.74);
    font-size: 0.84rem;
    line-height: 1.45;
}

/* ============================================================
   NEWS
   ============================================================ */
.news-item-admin {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(8, 14, 26, 0.5);
    padding: 10px 12px;
    transition: all 0.18s ease;
}

.news-item-admin:hover {
    border-color: rgba(57, 181, 255, 0.12);
    background: rgba(12, 20, 36, 0.6);
}

.news-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 4px;
}

.news-title-admin {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.news-title-admin h4 {
    margin: 0;
    font-size: 0.9rem;
}

.news-date {
    color: rgba(140, 165, 200, 0.7);
    font-size: 0.74rem;
    white-space: nowrap;
}

.news-type {
    border-radius: 6px;
    font-size: 0.7rem;
    padding: 3px 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    border: 1px solid transparent;
}

.news-type.news {
    color: #b0daff;
    border-color: rgba(57, 181, 255, 0.3);
    background: rgba(57, 181, 255, 0.12);
}

.news-type.event {
    color: #ffe4a8;
    border-color: rgba(255, 204, 91, 0.3);
    background: rgba(255, 204, 91, 0.1);
}

.news-content-preview {
    color: rgba(195, 212, 240, 0.8);
    line-height: 1.3;
    margin-bottom: 6px;
    font-size: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.news-actions .btn {
    padding: 6px 10px;
    font-size: 0.78rem;
}

.news-list-compact {
    display: grid;
    gap: 5px;
}

/* ============================================================
   TABLES
   ============================================================ */
.activity-table {
    overflow-x: auto;
    border-radius: 12px;
}

.activity-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 700px;
}

.activity-table th,
.activity-table td {
    text-align: left;
    padding: 10px 12px;
    font-size: 0.88rem;
}

.activity-table th {
    background: rgba(57, 181, 255, 0.06);
    color: rgba(210, 230, 255, 0.85);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.activity-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.activity-table tr:hover td {
    background: rgba(57, 181, 255, 0.04);
}

.activity-table tr:last-child td {
    border-bottom: none;
}

.status {
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-block;
}

.status.completed {
    color: #8eecc8;
    background: rgba(42, 197, 141, 0.12);
    border: 1px solid rgba(42, 197, 141, 0.25);
}

.status.in-progress {
    color: #ffd98a;
    background: rgba(255, 204, 91, 0.1);
    border: 1px solid rgba(255, 204, 91, 0.25);
}

.status.cancelled {
    color: #ffb0b3;
    background: rgba(238, 93, 98, 0.1);
    border: 1px solid rgba(238, 93, 98, 0.25);
}

.status.failed {
    color: #ff8a8a;
    background: rgba(220, 53, 53, 0.12);
    border: 1px solid rgba(220, 53, 53, 0.25);
}

.status.blocked {
    color: #ffcc70;
    background: rgba(255, 170, 40, 0.1);
    border: 1px solid rgba(255, 170, 40, 0.25);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
    padding: 18px;
    animation: modalFadeIn 0.2s ease;
}

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

.modal-content {
    width: min(760px, 100%);
    max-height: 84vh;
    overflow-y: auto;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 17, 30, 0.97);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal-header,
.modal-body {
    padding: 16px 20px;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.close {
    font-size: 22px;
    cursor: pointer;
    color: rgba(180, 200, 230, 0.6);
    transition: color 0.15s ease;
    line-height: 1;
}

.close:hover {
    color: #f0f5ff;
}

/* ============================================================
   MISC
   ============================================================ */
#downloadChart {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(4, 8, 18, 0.5);
}

.pagination {
    margin-top: 14px;
    text-align: center;
}

.pagination .btn {
    font-size: 0.82rem;
    padding: 6px 12px;
}

code {
    background: rgba(57, 181, 255, 0.08);
    color: #b8e0ff;
    border-radius: 6px;
    padding: 2px 7px;
    font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
    font-size: 0.85em;
    border: 1px solid rgba(57, 181, 255, 0.1);
}

.system-info {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999 !important;
    text-align: center !important;
    padding: 8px !important;
    font-size: 11px !important;
    color: rgba(200, 215, 240, 0.6) !important;
    background: rgba(4, 8, 16, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
    letter-spacing: 0.02em !important;
}

.system-info span {
    opacity: 0.7 !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(57, 181, 255, 0.2);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(57, 181, 255, 0.35);
}

/* Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand {
        padding: 26px;
    }
}

@media (max-width: 900px) {
    .admin-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 16px 14px;
    }

    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .sidebar a::before {
        display: none;
    }

    .main-content {
        padding: 16px;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .file-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .login-page {
        padding: 12px;
    }

    .login-card,
    .login-brand,
    .card,
    .stat-card {
        border-radius: 14px;
    }

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

    .captcha-wrap {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 12px;
    }
}
