@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Cinzel:wght@500;600;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: 'Inter', '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: 'Cinzel', 'Inter', 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: 'Cinzel', 'Inter', 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: 'Cinzel', 'Inter', 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: 'Cinzel', 'Inter', 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: 'Cinzel', 'Inter', 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;
}

.upload-area.drag-over {
    border-color: rgba(57, 181, 255, 0.7);
    background: rgba(20, 40, 70, 0.55);
}

.upload-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: rgba(180, 200, 230, 0.85);
    font-size: 0.9rem;
    cursor: pointer;
}

.upload-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.folder-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.folder-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
}

.folder-breadcrumb a {
    color: #7ec8ff;
    text-decoration: none;
}

.folder-breadcrumb a:hover {
    text-decoration: underline;
}

.folder-breadcrumb .sep {
    color: rgba(180, 200, 230, 0.4);
}

.mkdir-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.mkdir-form input[type="text"] {
    min-width: 160px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(8, 14, 28, 0.7);
    color: #e7ecf1;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(8, 14, 26, 0.55);
}

.folder-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d8e7ff;
    text-decoration: none;
    min-width: 0;
    font-weight: 600;
}

.folder-link:hover {
    color: #fff;
}

.folder-icon {
    flex-shrink: 0;
}

.folder-del {
    margin: 0;
}

.btn-small {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
}

.muted-note {
    color: rgba(180, 200, 230, 0.55);
    font-size: 0.85rem;
    margin: 6px 0 0;
}

.muted-note code,
.card h3 code {
    color: #9fd0ff;
}

.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;
    }
}

/* Reforged launcher panel */
:root {
    --bg-0:#101416; --bg-1:#161b1e; --bg-2:#1c2226;
    --panel:#1b2125; --panel-strong:#20272b; --line:#343c40;
    --text-main:#f1ece3; --text-muted:#a4acac;
    --accent:#d8b779; --accent-2:#c09b5e; --ok:#88bc98;
    --warn:#e5bb70; --bad:#e99690;
    --radius-sm:6px; --radius-md:12px; --radius-lg:16px;
}
body { background:#111618; padding-bottom:0; font-family:Inter,'Segoe UI',sans-serif; }
h1,h2,h3,h4 { letter-spacing:-.025em; }
.admin-container { display:grid; grid-template-columns:238px minmax(0,1fr); min-height:100vh; }
.sidebar { position:sticky; top:0; width:auto; height:100vh; padding:32px 20px; background:#141a1d; border-right:1px solid var(--line); box-shadow:none; }
.sidebar h2 { color:#e8c88d; font-family:Cinzel,Georgia,serif; font-size:25px; line-height:1.4; padding:0 10px 26px; border-bottom:1px solid var(--line); }
.sidebar h2 span { display:block; font-family:Inter,sans-serif; font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--text-muted); margin-top:4px; }
.sidebar ul { margin-top:24px; }
.sidebar a { border:1px solid transparent; border-radius:7px; padding:12px 14px; color:var(--text-muted); font-size:14px; }
.sidebar a::before { display:none; }
.sidebar a:hover { background:#242c2f; color:var(--text-main); transform:none; }
.sidebar a.active { background:#d8b77916; border-color:#b894544a; color:#f0d39c; box-shadow:none; }
.sidebar li:last-child { margin-top:24px; padding:12px 14px; color:var(--text-muted); }
.main-content { margin-left:0; width:100%; min-width:0; padding:34px clamp(20px,4vw,56px); max-width:1700px; }
.main-content > header { padding-bottom:24px; border-bottom:1px solid var(--line); margin-bottom:26px; box-shadow:none; background:transparent; }
.main-content > header h1 { font-family:Cinzel,Georgia,serif; font-size:30px; color:var(--text-main); }
.header-actions { font-size:12px; color:var(--text-muted); gap:12px; }
.card,.stat-card { background:var(--panel); border:1px solid var(--line); box-shadow:none; border-radius:12px; }
.card { padding:24px; }
.card h3 { font-size:17px; color:var(--text-main); margin-bottom:20px; }
.stats-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:26px 0; }
.stat-card { padding:22px; }
.stat-card h3 { font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); }
.stat-card .stat-value { color:var(--text-main); font-size:36px; font-weight:500; }
.stat-card::before,.card::before { display:none; }
.btn,.btn-refresh { min-height:40px; border-radius:6px; font:600 13px Inter,'Segoe UI',sans-serif; padding:10px 16px; box-shadow:none; cursor:pointer; }
.btn-primary,.btn-refresh { background:#d8b779; color:#201c15; border:1px solid #d8b779; }
.btn-primary:hover,.btn-refresh:hover { background:#e6c992; color:#201c15; transform:none; }
.btn-secondary { background:#222a2d; color:var(--text-main); border:1px solid #465055; }
.btn-danger { background:#41282b; color:#f5b8b1; border:1px solid #744247; }
input:not([type=checkbox]):not([type=radio]),select,textarea { background:#111719; color:var(--text-main); border:1px solid #404b4f; border-radius:6px; padding:11px 12px; font:14px Inter,'Segoe UI',sans-serif; }
input:focus,textarea:focus,select:focus { outline:2px solid #d8b779; outline-offset:2px; box-shadow:none; }
:focus-visible { outline:2px solid #e8c88d; outline-offset:3px; }
.form-group label { color:#c9cdca; font-size:13px; margin-bottom:9px; }
textarea { min-height:190px; resize:vertical; }
.panel-hero { background:linear-gradient(90deg,#111719f5 0%,#111719c9 48%,#11171910 100%),url('art/hero.png') center 42%/cover; border:1px solid #48504e; border-radius:12px; padding:36px; min-height:245px; display:flex; align-items:center; }
.panel-hero h2 { font:500 clamp(24px,2.5vw,34px) Cinzel,Georgia,serif; margin:10px 0 12px; }
.panel-hero p:not(.eyebrow) { color:#ccd0cc; max-width:490px; font-size:14px; line-height:1.7; }
.eyebrow { color:#e4c78e; font-size:11px; letter-spacing:.15em; }
.hero-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:20px; }
.news-list-thumb { width:120px; height:76px; object-fit:cover; border-radius:5px; margin-bottom:12px; }
.news-item-admin,.file-item { border:1px solid var(--line); border-radius:8px; background:#171e21; padding:16px; }
.news-type { background:#b5935120; border:1px solid #9a7e464d; color:#e8c88d; font-size:11px; padding:4px 8px; border-radius:4px; }
.news-type.event { background:#283d4c; color:#afd6ed; }
.news-content-preview,.file-meta,.muted-note { color:var(--text-muted); line-height:1.6; }
.preview-card { overflow:hidden; padding:0; align-self:start; position:sticky; top:24px; }
.preview-card > h3 { padding:24px 24px 0; }
.preview-card > img { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }
.preview-copy { padding:24px; }
.preview-copy h4 { margin:15px 0 12px; font-size:24px; line-height:1.25; }
.preview-copy p { color:#bac2c1; white-space:pre-wrap; font-size:14px; line-height:1.7; max-height:280px; overflow:auto; }
.panel-search { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:0 0 18px; }
.panel-search input { flex:1; min-width:160px; }
.panel-search output { color:var(--text-muted); font-size:12px; }
[hidden] { display:none !important; }
.login-shell { width:min(1120px,100%); gap:0; border:1px solid #455050; border-radius:16px; overflow:hidden; box-shadow:0 24px 80px #0008; }
.login-brand { border:0; border-radius:0; min-height:640px; padding:46px; display:flex; flex-direction:column; justify-content:flex-end; background:linear-gradient(0deg,#0d1417f0,#0d141710 80%),url('art/hero.png') 45% center/cover; }
.login-brand h1 { font:500 38px Cinzel,Georgia,serif; color:#f0d6a4; }
.login-brand > p { color:#f0ece2; font-size:18px; margin:16px 0; }
.login-brand ul { color:#d0d5cf; font-size:13px; line-height:2; }
.login-card { border:0; border-radius:0; padding:44px; background:#1b2226; }
.login-header h2 { font:500 28px Cinzel,Georgia,serif; }
.login-header p,.login-footer { color:var(--text-muted); line-height:1.6; }
.login-form { margin-top:28px; }
.alert { border-radius:7px; }
.alert-success { background:#192e25; border:1px solid #3a6750; color:#b5dcc0; }
.alert-error { background:#382326; border:1px solid #79474c; color:#f3c3be; }
.upload-area { border:1px dashed #68746e; background:#151d20; }
@media(max-width:1100px) {
    .admin-container { grid-template-columns:200px minmax(0,1fr); }
    .sidebar { padding:24px 12px; }
    .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .main-content { padding:24px; }
}
@media(max-width:800px) {
    .admin-container { display:block; }
    .sidebar { position:static; height:auto; width:100%; padding:16px; border-bottom:1px solid var(--line); }
    .sidebar h2 { padding:0 0 12px; font-size:22px; }
    .sidebar ul { display:flex; flex-wrap:wrap; gap:4px; margin:12px 0 0; }
    .sidebar li:last-child { margin:0; padding:12px; }
    .sidebar a { padding:10px; }
    .content-grid { grid-template-columns:1fr; }
    .preview-card { position:static; }
    .main-content > header { align-items:flex-start; }
    .panel-hero { padding:24px; }
    .login-shell { grid-template-columns:1fr; }
    .login-brand { min-height:280px; padding:28px; }
    .login-card { padding:28px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; } }

.stat-card .stat-value { background:none; -webkit-text-fill-color:var(--text-main); }
.login-brand li { background:transparent; border:0; padding:3px 0; box-shadow:none; border-radius:0; }

.news-form { background:transparent; border:0; box-shadow:none; padding:0; }

/* Media editor */
.image-picker { border:1px solid #41464a; border-radius:12px; padding:18px; margin:0 0 24px; min-width:0; }
.image-picker legend { color:#e4c48d; padding:0 8px; font-weight:600; }
.image-source-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.image-source-tabs [aria-pressed=true] { background:#55462e; border-color:#c8a66a; color:#ffe2af; }
.image-dropzone { display:flex; position:relative; flex-direction:column; gap:8px; padding:26px 18px; text-align:center; border:1px dashed #77818a; border-radius:12px; background:#222a30; cursor:pointer; margin-bottom:14px; }
.image-dropzone input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.image-dropzone:focus-within,.image-dropzone.dragging { outline:2px solid #d6b57a; background:#343833; }
.image-dropzone span,.field-hint { color:#aeb8bf; font-size:13px; overflow-wrap:anywhere; }
.publication-options { display:flex; flex-direction:column; gap:12px; margin:0 0 24px; }
.publication-options label { display:flex; align-items:center; gap:10px; cursor:pointer; }
.publication-options input { width:18px; height:18px; accent-color:#c8a66a; }
.publication-state { font-size:12px; color:#b9cebd; }
.media-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:16px; margin:20px 0; }
.media-tile { min-width:0; padding:0; border:1px solid #48515a; border-radius:10px; background:#21292e; color:#e4e8eb; overflow:hidden; cursor:pointer; text-align:left; }
.media-tile:hover,.media-tile:focus-visible { border-color:#d6b57a; outline:1px solid #d6b57a; }
.media-tile img { display:block; width:100%; aspect-ratio:16/10; object-fit:cover; }
.media-tile span { display:block; padding:12px; overflow-wrap:anywhere; font-size:13px; }
.media-dialog { width:min(900px,calc(100vw - 32px)); max-height:85vh; overflow:auto; box-sizing:border-box; border:1px solid #75808a; border-radius:18px; background:#192126; color:#e6e9eb; padding:24px; }
.media-dialog::backdrop { background:#080c10c9; backdrop-filter:blur(6px); }
[hidden] { display:none !important; }
.sidebar-logout { display:block; width:100%; padding:13px 16px; color:#c8b7b7; background:transparent; border:1px solid #574148; border-radius:8px; font:inherit; text-align:left; cursor:pointer; }
.sidebar-logout:hover,.sidebar-logout:focus-visible { color:#ffb9c0; border-color:#ba6571; background:#49272f; }
