/* Sweatbox Gym — WEWENIZA Control Center theme
   Matched to the live Joavi Lodge (Weweniza Lodge & Bar) Control Center:
   navy topbar + gold nav-strip (not a sidebar), the traced WEWENIZA badge
   mark, and the same variable names/values used in that app's CSS. */

:root {
    --navy: #0a1228;
    --gold: #d9ad4d;
    --line: #e2e4ea;
    --muted: #6b7280;
    --ok: #22c55e;
    --warn: #d9ad4d;
    --alert: #ef4444;
    --info: #3b82f6;
    --page-bg: #eef0f4;
    --ok-bg: #eafbf1;
    --alert-bg: #fdecec;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--page-bg);
    color: #16192b;
}
a { color: var(--navy); text-decoration: none; }

.layout { min-height: 100vh; display: flex; flex-direction: column; }

/* ---- Topbar ---- */
.topbar {
    background: var(--navy);
    color: #fff;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { width: 40px; height: 40px; flex-shrink: 0; }
.brand .text strong { display: block; font-size: 14px; letter-spacing: .02em; }
.brand .text small { display: block; font-size: 11px; color: #9aa0ba; font-style: italic; margin-top: 1px; }

.usernav { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.rolebadge { color: #cfd3e2; }
.rolebadge .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 6px; }

.btn { font: 600 12px Arial, Helvetica, sans-serif; padding: 8px 14px; border-radius: 5px; text-decoration: none; border: 1px solid transparent; cursor: pointer; display: inline-block; background: var(--navy); color: #fff; }
.btn.ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn.gold { background: var(--gold); color: var(--navy); font-weight: 700; border-color: var(--gold); }
.btn.small { padding: 5px 10px; font-size: 11px; }
.btn.danger { background: var(--alert); color: #fff; border-color: var(--alert); }
.btn:hover { opacity: .9; }

/* Ghost buttons sit on the navy topbar itself, so they need the inverse treatment. */
.topbar .btn.ghost { background: transparent; color: #fff; border-color: #39406b; }

/* ---- Nav strip (module tabs, gold underline on the active one) ---- */
.nav-strip { background: #101a37; padding: 0 22px; display: flex; gap: 2px; flex-wrap: wrap; }
.nav-strip a { padding: 10px 14px; font-size: 12px; color: #9aa0ba; border-bottom: 2px solid transparent; }
.nav-strip a:hover { color: #fff; }
.nav-strip a.on { color: #fff; border-bottom-color: var(--gold); font-weight: 700; }

.main { flex: 1; }
.content { padding: 24px 28px; max-width: 1100px; margin: 0 auto; }

/* ---- Panels (cards) ---- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.panel h3 { margin-top: 0; color: var(--navy); font-size: 15px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat-card { background: #f4f5f8; border-radius: 8px; padding: 14px 16px; }
.stat-card.navy { background: var(--navy); }
.stat-card.navy .stat-label { color: var(--gold); }
.stat-card.navy .stat-value { color: #fff; }
.stat-card.warn { background: var(--alert-bg); }
.stat-card.warn .stat-value { color: var(--alert); }
.stat-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--navy); margin-top: 4px; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.data th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table-scroll { overflow-x: auto; }

.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.tag.ok { background: var(--ok-bg); color: #15803d; }
.tag.warn { background: var(--alert-bg); color: #b91c1c; }

.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; align-items: end; }
.grid-form label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.grid-form input, .grid-form select, .grid-form textarea {
    width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; font-size: 13px; font-family: inherit;
}
.form-actions { display: flex; align-items: end; }

.inline { display: inline-flex; gap: 6px; align-items: center; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.muted { color: var(--muted); }

.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.alert-success { background: var(--ok-bg); color: #15803d; border: 1px solid #bbf0d1; }
.alert-error { background: var(--alert-bg); color: #b91c1c; border: 1px solid #f6c2c2; }

/* ---- Sign-in gate ---- */
.gate { background: var(--navy); min-height: 100vh; padding: 60px 20px; display: flex; justify-content: center; align-items: flex-start; }
.gate-card { background: #fff; border-radius: 10px; padding: 34px 34px 28px; width: 290px; text-align: center; }
.gate-card svg { width: 60px; height: 60px; margin-bottom: 14px; }
.gate-card h1 { font-size: 17px; margin: 0 0 2px; color: var(--navy); }
.gate-card .tagline { font-size: 11.5px; color: var(--muted); font-style: italic; margin: 0 0 20px; }
.gate-card label { display: block; text-align: left; font-size: 11px; font-weight: 700; color: #444; margin: 12px 0 4px; }
.gate-card input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; font-size: 13px; font-family: inherit; }
.gate-card .btn.gold.full { display: block; width: 100%; text-align: center; padding: 10px; margin-top: 18px; font-size: 13px; border: none; }

/* ---- Printable invoice ---- */
.invoice-sheet { background: #fff; padding: 30px 34px; border-radius: 8px; border: 1px solid var(--line); max-width: 640px; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--navy); padding-bottom: 12px; margin-bottom: 16px; }
.inv-brand { text-align: right; color: var(--navy); font-size: 12.5px; line-height: 1.5; }
.inv-brand strong { font-size: 13.5px; }
.inv-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; font-size: 12.5px; }
.inv-meta small { color: var(--muted); }
.inv-total td { background: var(--navy); color: #fff; font-size: 15px; }
.foot-note { font-size: 11px; color: var(--muted); margin-top: 14px; }

@media print { .topbar, .nav-strip, .no-print { display: none !important; } .content { padding: 0; max-width: none; } }

@media (max-width: 860px) {
    .topbar { flex-wrap: wrap; gap: 10px; }
    .nav-strip { overflow-x: auto; }
}
