:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.1), transparent 25%);
}

.navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.event-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.3);
}

.event-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.event-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover img {
    transform: scale(1.05);
}

.event-details {
    padding: 1.5rem;
}

.event-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.event-date {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.event-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #34d399;
}

.event-tickets {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.btn-full {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

/* Booking Page Styles */
.booking-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

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

.booking-img {
    width: 100%;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.booking-details p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.booking-details strong {
    color: var(--text);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.5);
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

input[type="file"] {
    padding: 0.5rem;
    border: 1px dashed var(--border);
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    border: none;
    margin-right: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.container-fluid {
    max-width: 95%;
    margin: 2rem auto;
    padding: 0 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

.total-price {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: right;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

.back-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.back-link:hover {
    color: white;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    padding: 1.75rem;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}
.modal h3 { margin-bottom: 1rem; color: white; }
.modal p { color: var(--text-muted); margin-bottom: 1rem; font-size: 0.9rem; }
.modal textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    color: white;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Toast Styles */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: var(--card-bg);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.25rem;
    border-left: 4px solid var(--text-muted);
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s, transform 0.3s;
}
.toast.show {
    opacity: 1;
    transform: translateX(0);
}
.toast.error { border-left-color: #f87171; }
.toast.success { border-left-color: #34d399; }


/* ===== Shared form controls ===== */
select, textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.9);
    color: white;
    font-size: 1rem;
    font-family: inherit;
}
textarea { resize: vertical; background: rgba(15, 23, 42, 0.5); }
select:focus, textarea:focus { outline: none; border-color: var(--primary); }
:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.06); box-shadow: none; }
.muted { color: var(--text-muted); }
.row-inline { display: flex; gap: 10px; }
.row-inline > input, .row-inline > select { flex: 1; min-width: 0; }
.row-inline > .btn { white-space: nowrap; }
.hint { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.4rem; }
.site-title a { color: white; text-decoration: none; -webkit-text-fill-color: white; }

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
}
.badge-green  { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.badge-amber  { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.badge-red    { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.badge-orange { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
.badge-blue   { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }

/* ===== Events page ===== */
.page-intro { margin-bottom: 1.5rem; }
.page-intro .section-title { margin-bottom: 0.25rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1.5rem; }
.toolbar input[type="search"] { flex: 1; min-width: 220px; width: auto; }
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.chip.active, .chip:hover { background: var(--primary); border-color: var(--primary); color: white; }
.event-image-container { position: relative; }
.event-badges { position: absolute; top: 0.75rem; left: 0.75rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.event-badges .badge { backdrop-filter: blur(6px); background: rgba(15, 23, 42, 0.8); }
.event-meta { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.25rem; }
.empty-state { text-align: center; color: var(--text-muted); padding: 3rem 1rem; grid-column: 1 / -1; }

/* ===== Booking page ===== */
.steps { list-style: none; display: flex; gap: 0.5rem; margin-bottom: 1.75rem; }
.steps li {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-top: 0.6rem;
    border-top: 3px solid var(--border);
}
.steps li.active { color: white; border-top-color: var(--primary); font-weight: 600; }
.steps li.done { color: #34d399; border-top-color: #34d399; }
.step-panel[hidden] { display: none; }
.step-panel { animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.qty { display: flex; align-items: center; gap: 0.5rem; }
.qty input { text-align: center; width: 5rem; }
.qty button { width: 2.5rem; height: 2.75rem; border-radius: 0.5rem; border: 1px solid var(--border); background: rgba(15, 23, 42, 0.5); color: white; font-size: 1.2rem; cursor: pointer; }
.qty button:hover { border-color: var(--primary); }
.order-summary {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.order-summary .line { display: flex; justify-content: space-between; color: var(--text-muted); margin-bottom: 0.4rem; }
.order-summary .total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.4rem; font-weight: 700; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.trust-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; justify-content: center; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.9rem; }
.note-box { margin-top: 1.5rem; padding: 1rem; background: rgba(52, 211, 153, 0.1); border-left: 4px solid #34d399; border-radius: 4px; }
.note-box h4 { color: #34d399; margin-bottom: 0.5rem; font-size: 0.9rem; }
.note-box p { font-size: 0.9rem; line-height: 1.5; }
.availability { height: 6px; border-radius: 9999px; background: var(--border); overflow: hidden; margin: 0.5rem 0 1rem; }
.availability > span { display: block; height: 100%; background: linear-gradient(to right, #34d399, #fbbf24); }

/* ===== Admin ===== */
.admin-nav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem 1rem; }
.admin-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.admin-links a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; padding: 0.25rem 0; }
.admin-links a:hover, .admin-links a.active { color: white; }
.admin-links a.active { border-bottom: 2px solid var(--primary); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.25rem; }
.stat-card h3 { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-bottom: 0.4rem; }
.stat-card p { font-size: 1.7rem; font-weight: 700; color: white; }
.stat-card.warn p { color: #fb923c; }
.header-action { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }
.table-container { background: var(--card-bg); border: 1px solid var(--border); border-radius: 0.5rem; overflow-x: auto; margin-top: 1rem; }
.table-container table { width: 100%; border-collapse: collapse; }
.table-container th, .table-container td { padding: 0.9rem 1rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table-container th { font-weight: 600; color: var(--text-muted); background: rgba(15, 23, 42, 0.4); }
.table-container tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.table-container tr:last-child td { border-bottom: none; }
.actions a { margin-right: 0.75rem; text-decoration: none; }
.actions a.edit { color: #60a5fa; }
.actions a.delete { color: #f87171; }

@media (max-width: 600px) {
    .container, .container-fluid { padding: 0 1rem; }
    .section-title { font-size: 1.5rem; }
    .booking-container { padding: 1.25rem; gap: 1.5rem; }
    .events-grid { gap: 1.25rem; }
    .toolbar .btn { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

.toolbar select { width: auto; max-width: 260px; }

/* ==========================================================================
   Modern theme (v2) – overrides earlier rules
   ========================================================================== */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #ec4899;
    --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #ec4899 130%);
    --card-bg: rgba(30, 41, 59, 0.6);
    --radius: 1.25rem;
}

html { scroll-behavior: smooth; }
body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-color: #0b1120;
    background-image:
        radial-gradient(900px 500px at 10% -10%, rgba(99, 102, 241, 0.28), transparent 60%),
        radial-gradient(700px 500px at 100% 10%, rgba(236, 72, 153, 0.18), transparent 60%),
        radial-gradient(800px 600px at 50% 120%, rgba(139, 92, 246, 0.16), transparent 60%);
    background-attachment: fixed;
}
h1, h2, h3 { letter-spacing: -0.02em; }

/* ----- Navbar ----- */
.navbar { background: rgba(11, 17, 32, 0.72); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.site-title a::before {
    content: "";
    display: inline-block;
    width: 1.35rem; height: 1.35rem;
    border-radius: 0.45rem;
    background: var(--grad);
    margin-right: 0.6rem;
    vertical-align: -0.2rem;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.5);
}

/* ----- Buttons ----- */
.btn {
    background: var(--grad);
    border-radius: 0.75rem;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    box-shadow: 0 6px 18px -6px rgba(99, 102, 241, 0.65);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn:hover { background: var(--grad); filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(99, 102, 241, 0.8); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn:disabled:hover { background: rgba(148, 163, 184, 0.18); color: var(--text-muted); box-shadow: none; transform: none; filter: none; }
.btn-outline, .btn-outline:hover { background: transparent; box-shadow: none; filter: none; }
.btn-outline { border: 1px solid rgba(255, 255, 255, 0.18); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.07); }
.btn-full { padding: 0.9rem; font-size: 1rem; border-radius: 0.9rem; }

/* ----- Inputs ----- */
input, select, textarea { border-radius: 0.75rem; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
input:focus, select:focus, textarea:focus { border-color: #818cf8; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18); }
input::placeholder { color: rgba(148, 163, 184, 0.6); }

/* ----- Hero ----- */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: 1.75rem;
    padding: 3.5rem 2.5rem;
    margin-bottom: 2.5rem;
    background:
        radial-gradient(600px 300px at 90% 0%, rgba(236, 72, 153, 0.35), transparent 70%),
        radial-gradient(600px 400px at 0% 100%, rgba(99, 102, 241, 0.45), transparent 70%),
        rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.hero::after {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom right, black, transparent 70%);
    -webkit-mask-image: linear-gradient(to bottom right, black, transparent 70%);
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 680px; }
.eyebrow {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.8rem;
    font-weight: 600;
    color: #c7d2fe;
    margin-bottom: 1.1rem;
}
.hero h2 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1rem;
}
.hero h2 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: #cbd5e1; font-size: 1.1rem; max-width: 540px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin-top: 1.6rem; font-size: 0.9rem; color: #e2e8f0; }
.hero-points span { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero .btn { margin-top: 1.8rem; padding: 0.85rem 1.6rem; font-size: 1rem; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.section-head h2 { font-size: 1.6rem; font-weight: 700; }

/* ----- Event cards ----- */
.events-grid { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1.75rem; }
.event-card {
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.75));
    display: flex;
    flex-direction: column;
}
.event-card:hover { transform: translateY(-6px); border-color: rgba(129, 140, 248, 0.5); box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(99, 102, 241, 0.25); }
.event-image-container { height: 210px; background: linear-gradient(135deg, #312e81, #831843); }
.event-image-container::after {
    content: "";
    position: absolute; inset: auto 0 0 0; height: 60%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    pointer-events: none;
}
.event-image-container.img-fail::before {
    content: "🎟";
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 3.5rem; opacity: 0.5;
}
.event-badges { z-index: 2; }
.date-badge {
    position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    border-radius: 0.8rem;
    padding: 0.35rem 0.7rem;
    text-align: center;
    line-height: 1.1;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}
.date-badge b { display: block; font-size: 1.3rem; font-weight: 800; }
.date-badge small { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #6366f1; }
.event-details { display: flex; flex-direction: column; flex: 1; padding: 1.4rem; }
.event-details h3 { font-size: 1.3rem; font-weight: 700; }
.event-footer { margin-top: auto; }
.event-price { font-size: 1.35rem; background: linear-gradient(90deg, #34d399, #6ee7b7); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ----- Toolbar / chips ----- */
.toolbar input[type="search"] { border-radius: 9999px; padding-left: 1.1rem; }
.chip { transition: all 0.2s; }
.chip.active { background: var(--grad); border-color: transparent; }

/* ----- Booking page ----- */
.booking-container { border-radius: 1.5rem; border-color: rgba(255, 255, 255, 0.09); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7); }
.booking-img { border-radius: 1rem; aspect-ratio: 16 / 9; object-fit: cover; background: linear-gradient(135deg, #312e81, #831843); }
.order-summary { border-radius: 1rem; background: rgba(99, 102, 241, 0.08); border-color: rgba(99, 102, 241, 0.25); }
.steps li.active { border-top-color: #818cf8; }
.note-box { border-radius: 0.75rem; }

/* ----- Result / ticket cards ----- */
.ticket-card { border-radius: 1.5rem !important; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7); }

/* ----- Footer ----- */
.site-footer {
    margin-top: 4rem;
    padding: 2rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.site-footer a { color: #a5b4fc; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ----- Admin polish ----- */
.stat-card { border-radius: 1rem; background: linear-gradient(180deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.7)); }
.table-container { border-radius: 1rem; }
.table-container th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.admin-links a.active { border-bottom-color: #818cf8; }

@media (max-width: 600px) {
    .hero { padding: 2.2rem 1.4rem; border-radius: 1.25rem; }
    .hero p { font-size: 1rem; }
}

/* Make the hidden attribute always win (filters, step panels) */
[hidden] { display: none !important; }

/* ==========================================================================
   Admin shell (sidebar) + login
   ========================================================================== */
body:has(.admin-sidebar) { padding-left: 250px; }
.admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 250px;
    display: flex; flex-direction: column;
    padding: 1.25rem 1rem;
    background: rgba(8, 12, 24, 0.85);
    backdrop-filter: blur(14px);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    z-index: 200;
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; padding: 0 0.5rem; }
.sidebar-brand { display: flex; align-items: center; gap: 0.6rem; color: white; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.logo-mark { width: 1.5rem; height: 1.5rem; border-radius: 0.5rem; background: var(--grad); box-shadow: 0 4px 14px rgba(99, 102, 241, 0.5); }
.sidebar-toggle { display: none; background: none; border: 1px solid var(--border); color: white; border-radius: 0.5rem; padding: 0.3rem 0.65rem; font-size: 1.1rem; cursor: pointer; }
.sidebar-links { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.sidebar-links a {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.sidebar-links a:hover { background: rgba(255, 255, 255, 0.06); color: white; }
.sidebar-links a.active { background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(236, 72, 153, 0.18)); color: white; box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.35); }
.sidebar-links .ico { width: 1.4rem; text-align: center; }
.sidebar-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 1rem 0.5rem 0; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.role-chip { font-size: 0.75rem; font-weight: 600; color: #c7d2fe; background: rgba(99, 102, 241, 0.18); padding: 0.3rem 0.7rem; border-radius: 9999px; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; border-radius: 0.6rem; }

/* admin content area */
body:has(.admin-sidebar) .container-fluid { max-width: 1300px; margin: 0 auto; padding: 2rem 2rem 3rem; }
body:has(.admin-sidebar) main.container { margin-top: 2rem; }
.page-title { font-size: 1.8rem; font-weight: 800; }
.page-sub { color: var(--text-muted); margin-bottom: 1.5rem; }
.stat-card { position: relative; overflow: hidden; }
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.stat-card.warn::before { background: #fb923c; }
.stat-card .stat-ico { position: absolute; right: 1rem; top: 1rem; font-size: 1.4rem; opacity: 0.5; }

.progress { height: 6px; width: 110px; border-radius: 9999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; margin-top: 0.35rem; }
.progress > span { display: block; height: 100%; background: var(--grad); }
.act { display: inline-block; padding: 0.3rem 0.75rem; border-radius: 0.6rem; font-size: 0.82rem; font-weight: 600; text-decoration: none; border: 1px solid transparent; background: transparent; cursor: pointer; font-family: inherit; margin-right: 0.35rem; }
.act-edit { color: #93c5fd; background: rgba(96, 165, 250, 0.12); }
.act-edit:hover { background: rgba(96, 165, 250, 0.22); }
.act-del { color: #fca5a5; background: rgba(248, 113, 113, 0.12); }
.act-del:hover { background: rgba(248, 113, 113, 0.22); }
.act-ok { color: #6ee7b7; background: rgba(52, 211, 153, 0.12); }
.act-ok:hover { background: rgba(52, 211, 153, 0.22); }
.act-warn { color: #fdba74; background: rgba(251, 146, 60, 0.12); }
.act-warn:hover { background: rgba(251, 146, 60, 0.22); }
.table-container table { border-collapse: separate; border-spacing: 0; }
.table-container td { vertical-align: middle; }

@media (max-width: 900px) {
    body:has(.admin-sidebar) { padding-left: 0; }
    .admin-sidebar { position: sticky; width: 100%; bottom: auto; flex-direction: column; padding: 0.75rem 1rem; }
    .sidebar-top { margin-bottom: 0; }
    .sidebar-toggle { display: block; }
    .sidebar-links, .sidebar-foot { display: none; margin-top: 0.75rem; }
    .admin-sidebar.open .sidebar-links { display: flex; }
    .admin-sidebar.open .sidebar-foot { display: flex; }
    body:has(.admin-sidebar) .container-fluid { padding: 1.25rem 1rem 2rem; }
}

/* ----- Login ----- */
.auth-layout { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-brand {
    position: relative; overflow: hidden;
    display: flex; align-items: center;
    padding: 3rem;
    background:
        radial-gradient(600px 400px at 0% 0%, rgba(99, 102, 241, 0.55), transparent 65%),
        radial-gradient(600px 500px at 100% 100%, rgba(236, 72, 153, 0.45), transparent 65%),
        #0f172a;
}
.auth-brand::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px); background-size: 24px 24px; pointer-events: none; }
.auth-brand-inner { position: relative; z-index: 1; max-width: 460px; }
.brand-mark { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.2rem; margin-bottom: 2.5rem; }
.brand-mark::before { content: ""; width: 1.6rem; height: 1.6rem; border-radius: 0.5rem; background: var(--grad); box-shadow: 0 6px 18px rgba(99, 102, 241, 0.6); }
.auth-brand h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; font-weight: 800; background: none; -webkit-text-fill-color: white; margin-bottom: 1rem; }
.auth-brand h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.auth-brand p { color: #cbd5e1; font-size: 1.05rem; }
.auth-points { list-style: none; margin-top: 1.75rem; display: grid; gap: 0.7rem; color: #e2e8f0; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 1.9rem; font-weight: 800; margin-bottom: 0.25rem; }
.auth-card .muted { margin-bottom: 1.75rem; }
.auth-foot { text-align: center; margin-top: 1.5rem; }
.auth-foot a { color: var(--text-muted); text-decoration: none; }
.auth-foot a:hover { color: white; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 4.5rem; }
.reveal { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: #a5b4fc; font-weight: 600; font-size: 0.85rem; cursor: pointer; padding: 0.4rem 0.6rem; border-radius: 0.5rem; }
.reveal:hover { background: rgba(255, 255, 255, 0.07); }
@media (max-width: 860px) {
    .auth-layout { grid-template-columns: 1fr; }
    .auth-brand { padding: 2rem 1.5rem; min-height: auto; }
    .auth-points { display: none; }
    .brand-mark { margin-bottom: 1rem; }
}

/* ----- Logo (logo.svg) ----- */
.site-title a::before, .logo-mark, .brand-mark::before {
    background: url("logo.svg") center / contain no-repeat;
    box-shadow: none;
    border-radius: 0;
    filter: drop-shadow(0 4px 10px rgba(99, 102, 241, 0.55));
}
.site-title a::before { width: 1.7rem; height: 1.7rem; vertical-align: -0.35rem; margin-right: 0.55rem; }
.logo-mark { width: 1.9rem; height: 1.9rem; }
.brand-mark::before { width: 2rem; height: 2rem; }
