@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@400;500;600;700;800&family=Inter:wght@400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #050811;
    --card: rgba(15, 23, 42, 0.92);
    --border: rgba(255, 255, 255, 0.08);
    --text: #e5e7eb;
    --muted: #9ca3af;
    --brand: #ffde00;
    --brand-dark: #0a0f1c;
    --purple: #7c3a96;
    --danger: #f87171;
    --success: #4ade80;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', 'Mulish', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(124, 58, 150, 0.18), transparent 35%),
        radial-gradient(circle at bottom left, rgba(255, 222, 0, 0.08), transparent 30%),
        var(--bg);
}

.admin-brand h1,
.admin-shell h1,
.admin-shell h2,
.card h2 {
    font-family: 'Outfit', 'Mulish', sans-serif;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.admin-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

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

.admin-brand img { height: 48px; }

.admin-brand h1 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.admin-brand p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    backdrop-filter: blur(8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.card h2 {
    margin: 0 0 8px;
    font-size: 1.35rem;
}

.card .subtitle {
    color: var(--muted);
    margin-bottom: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #d1d5db;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: white;
    font: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: rgba(255, 222, 0, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 222, 0, 0.12);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--brand);
    color: var(--brand-dark);
}

.btn-primary:hover { filter: brightness(1.05); }

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 222, 0, 0.12);
    border-color: rgba(255, 222, 0, 0.45);
    color: var(--brand);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 222, 0, 0.15);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.82rem;
    border-radius: 10px;
}

.btn-danger {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.18);
    border-color: rgba(248, 113, 113, 0.55);
    color: #fecaca;
    transform: translateY(-1px);
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.checkbox-field {
    margin-top: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d1d5db;
    font-size: 0.92rem;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
    accent-color: var(--brand);
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.25);
    color: var(--success);
}

.alert-error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.25);
    color: var(--danger);
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-card .logo {
    display: block;
    margin: 0 auto 16px;
    height: 64px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

@media (min-width: 768px) {
    .login-card .logo {
        height: 80px;
    }
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.history-table th,
.history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.history-table th {
    color: var(--muted);
    font-weight: 600;
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--brand);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.link-btn:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .admin-topbar { flex-direction: column; align-items: flex-start; }
}
