:root {
    --gold: #d4a63b;
    --gold-dark: #b98718;
    --black: #050505;
    --white: #ffffff;
    --muted: #d9d9d9;
    --surface: #101010;
    --surface-2: #181818;
    --border: rgba(212, 166, 59, 0.25);
    --danger: #b84a4a;
    --success: #2e8b57;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #050505, #1a1a1a);
    color: var(--white);
}

a { text-decoration: none; }

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-wrapper { width: 100%; max-width: 520px; }

.auth-card,
.card,
.stat-card {
    background: rgba(16, 16, 16, 0.96);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0,0,0,.35);
}

.auth-card { padding: 32px; }
.brand-block { text-align: center; margin-bottom: 24px; }
.brand-logo { width: 220px; max-width: 100%; margin-bottom: 20px; }
.brand-logo-small { width: 90px; border-radius: 10px; }
.brand-block h1,
.brand-inline h1,
.card h2,
.card h3 { margin: 0 0 12px; }
.brand-block p,
.brand-inline p,
.card p { color: var(--muted); }

.auth-form,
.upload-form {
    display: grid;
    gap: 12px;
}

label {
    font-size: 14px;
    color: var(--muted);
}

input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: var(--surface-2);
    color: var(--white);
}

button,
.logout-link,
.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

button,
.logout-link {
    background: var(--gold);
    color: var(--black);
}

button:hover,
.logout-link:hover { background: var(--gold-dark); }

.secondary-link {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    background: rgba(5,5,5,.85);
    backdrop-filter: blur(8px);
}

.brand-inline {
    display: flex;
    align-items: center;
    gap: 16px;
}

.actions-inline {
    display: flex;
    gap: 12px;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    display: grid;
    gap: 24px;
}

.card { padding: 24px; }
.secondary-card pre {
    overflow: auto;
    background: #000;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.08);
    color: #f0f0f0;
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.alert-error { background: rgba(184,74,74,.18); border-color: rgba(184,74,74,.45); color: #ffd2d2; }
.alert-success { background: rgba(46,139,87,.18); border-color: rgba(46,139,87,.45); color: #d7ffe8; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.stat-card { padding: 22px; }
.stat-card span { display: block; color: var(--muted); margin-bottom: 8px; }
.stat-card strong { font-size: 32px; }
.stat-card.success { border-color: rgba(46,139,87,.45); }
.stat-card.danger { border-color: rgba(184,74,74,.45); }

.table-card { overflow: hidden; }
.table-wrapper { overflow: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}
th, td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.08);
    vertical-align: top;
}
th { color: var(--gold); background: rgba(255,255,255,.02); }

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}
.badge-success { background: rgba(46,139,87,.18); color: #bff2d3; }
.badge-danger { background: rgba(184,74,74,.18); color: #ffd2d2; }

@media (max-width: 768px) {
    .topbar,
    .brand-inline,
    .actions-inline { flex-direction: column; align-items: flex-start; }
    .stats-grid { grid-template-columns: 1fr; }
}


.stat-file {
    font-size: 18px;
    line-height: 1.35;
    word-break: break-word;
}
.help-text {
    margin-top: 12px;
    color: var(--muted);
}
.action-card {
    display: grid;
    gap: 12px;
}
.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.button-row form {
    margin: 0;
}

.inline-link { color: var(--gold); font-weight: bold; }
.badge-warning { background: rgba(212,166,59,.18); color: #ffe7a7; }
.filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; }
.filter-actions { display: flex; align-items: end; }
.schedule-form { margin-top: 16px; max-width: 420px; }
code { color: #ffe7a7; }
@media (max-width: 768px) { .filter-grid { grid-template-columns: 1fr; } }
