:root {
    --green-900: #083d27;
    --green-800: #0b4f2e;
    --green-700: #0f6b3e;
    --green-600: #14764a;
    --green-500: #2e9e62;
    --gold-600: #a97c15;
    --gold-500: #c9a227;
    --gold-100: #fbf4da;
    --bg: #f3f6f4;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e3e8e4;
    --danger: #c0392b;
    --danger-bg: #fdecea;
    --success: #1e7d4f;
    --success-bg: #e7f6ee;
    --warning: #9a6b0a;
    --warning-bg: #fff7e0;
    --info: #1d5f8a;
    --info-bg: #e7f2fa;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --shadow-md: 0 4px 16px rgba(16, 24, 40, .08);
    --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

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

/* Layout */
.layout { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 264px;
    background: linear-gradient(180deg, #0a3d28 0%, #0b4a2e 55%, #0d5636 100%);
    color: #dbe9e1;
    display: flex;
    flex-direction: column;
    z-index: 40;
    transition: transform .25s ease;
}

.sidebar-brand {
    padding: 20px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-brand img {
    width: 42px;
    height: 42px;
    filter: brightness(0) invert(1);
}

.sidebar-close {
    display: none;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
}

.sidebar-brand .brand-text { line-height: 1.15; }
.sidebar-brand .brand-title { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.sidebar-brand .brand-sub { font-size: 11px; color: #a9c8b7; letter-spacing: .3px; }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px 24px;
}

.nav-section {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: #87ab98;
    padding: 16px 12px 6px;
    font-weight: 700;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    margin-bottom: 3px;
    border-radius: 10px;
    color: #d6e6dc;
    font-weight: 500;
    transition: background .18s ease, color .18s ease;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    text-decoration: none;
}

.sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(201, 162, 39, .28), rgba(201, 162, 39, .10));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--gold-500);
}

.sidebar .nav-link .icon { flex: 0 0 20px; display: inline-flex; }

.sidebar-footer {
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 11.5px;
    color: #a9c8b7;
}

.sidebar-footer strong { color: #fff; display: block; font-size: 12.5px; }

.main {
    margin-left: 264px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 12px 26px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar .page-heading { flex: 1; min-width: 0; }
.topbar .page-heading h1 { margin: 0; font-size: 18px; font-weight: 700; }
.topbar .page-heading p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

.menu-toggle {
    display: none;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 9px;
    padding: 7px 9px;
    cursor: pointer;
    color: var(--text);
}

.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--green-600), var(--green-800));
    color: #fff; display: grid; place-items: center;
    font-weight: 700; font-size: 14px;
}
.user-meta { line-height: 1.2; }
.user-meta strong { display: block; font-size: 13px; }
.user-meta span { font-size: 11px; color: var(--muted); }

.logout-form button {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--danger);
    padding: 7px 10px;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
}
.logout-form button:hover { background: var(--danger-bg); }

.content { padding: 24px 26px 40px; flex: 1; }

/* Hero */
.hero {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    min-height: 230px;
    display: flex;
    align-items: flex-end;
    background: #0b4f2e;
    box-shadow: var(--shadow-md);
    margin-bottom: 22px;
}
.hero img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: .9;
}
.hero::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(6, 42, 27, .88) 0%, rgba(6, 42, 27, .55) 45%, rgba(6, 42, 27, .05) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 28px 32px; color: #fff; max-width: 720px; }
.hero-eyebrow {
    display: inline-block;
    font-size: 10.5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(201, 162, 39, .22);
    border: 1px solid rgba(201, 162, 39, .55);
    color: #ffe9a8;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.hero h2 { margin: 0 0 6px; font-size: 26px; line-height: 1.2; }
.hero p { margin: 0; font-size: 13px; color: #d6e6dc; max-width: 560px; }

/* Cards & stats */
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.card-header h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.card-header p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.card-body { padding: 18px; }

.stat-card { padding: 18px; display: flex; gap: 14px; align-items: flex-start; }
.stat-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; flex: 0 0 44px;
    background: var(--green-500); color: #fff;
}
.stat-icon.gold { background: var(--gold-500); }
.stat-icon.red { background: #c0392b; }
.stat-icon.blue { background: #1d5f8a; }
.stat-icon.orange { background: #c76b19; }
.stat-icon.purple { background: #6d4fa1; }
.stat-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.stat-value { font-size: 24px; font-weight: 800; line-height: 1.15; margin-top: 3px; }
.stat-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data th { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); background: #fafcfa; font-weight: 700; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #f8fbf9; }
.table-actions { display: flex; gap: 6px; align-items: center; }

/* Badges */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 999px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-yellow { background: var(--warning-bg); color: var(--warning); }
.badge-red { background: var(--danger-bg); color: var(--danger); }
.badge-blue { background: var(--info-bg); color: var(--info); }
.badge-gray { background: #eef1ef; color: #4b5563; }
.badge-gold { background: var(--gold-100); color: var(--gold-600); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 14px; border-radius: 10px; border: 1px solid transparent;
    font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit;
    transition: background .18s ease, box-shadow .18s ease, transform .05s ease;
    text-decoration: none !important;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-800); }
.btn-gold { background: var(--gold-500); color: #3c2c05; }
.btn-gold:hover { background: var(--gold-600); color: #fff; }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #f3f6f4; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a93226; }
.btn-sm { padding: 6px 9px; font-size: 11.5px; border-radius: 8px; }
.btn-icon { padding: 7px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12.5px; font-weight: 600; color: #374151; }
.form-group .hint { font-size: 11px; color: var(--muted); }
.form-control {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 10px; font-family: inherit; font-size: 13px; background: #fff; color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(46, 158, 98, .14); }
textarea.form-control { min-height: 90px; resize: vertical; }
.is-invalid { border-color: var(--danger); }
.form-error { color: var(--danger); font-size: 11.5px; }
.form-hint { color: var(--muted); font-size: 11.5px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; }
.form-section-heading { margin: 26px 0 12px; padding-top: 20px; border-top: 1px solid var(--border); }
.form-section-heading h3 { margin: 0; font-size: 16px; color: var(--heading); }
.form-section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.form-section-block { margin-bottom: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: #fcfdfc; }
.form-section-block h4 { margin: 0 0 14px; font-size: 13.5px; color: var(--heading); }
.form-section-subtitle { margin: 8px 0 12px; color: var(--green-700); font-size: 11.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.member-row { margin-bottom: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: #fcfdfc; }
.member-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 13px; border: 1px solid transparent; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: #bfe6d1; }
.alert-danger { background: var(--danger-bg); color: var(--danger); border-color: #f5c6c0; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: #f2dfa4; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

/* Filters */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filter-bar .form-group { min-width: 160px; flex: 1; }
.filter-bar .btn { flex: 0 0 auto; }

/* Empty state */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .empty-icon { width: 54px; height: 54px; border-radius: 50%; background: #eef4f0; display: grid; place-items: center; margin: 0 auto 12px; color: var(--green-600); }
.empty h4 { margin: 0 0 4px; color: var(--text); font-size: 14px; }
.empty p { margin: 0; font-size: 12.5px; }

/* Charts */
.bar-chart { display: flex; flex-direction: column; gap: 13px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 110px; gap: 12px; align-items: center; }
.bar-name { font-size: 12.5px; font-weight: 600; }
.bar-name a { color: inherit; }
.bar-track { height: 16px; background: #eef2ef; border-radius: 999px; overflow: hidden; display: flex; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--green-600), var(--green-500)); }
.bar-fill.ekstrem { background: linear-gradient(90deg, #a93226, #e05b4c); }
.bar-value { font-size: 12px; color: var(--muted); text-align: right; }
.bar-value strong { color: var(--text); }

.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green-500); }
.dot-red { background: #d35445; }
.dot-gray { background: #cfd8d2; }
.dot-rainbow {
    background: linear-gradient(135deg, #0f9d58, #0ea5a4, #0284c7, #4f46e5, #7c3aed, #c026d3, #e11d48, #ea580c, #d97706, #65a30d);
}

.split-bar { display: flex; height: 24px; border-radius: 999px; overflow: hidden; background: #eef2ef; }
.split-bar .seg { height: 100%; display: grid; place-items: center; font-size: 10.5px; color: #fff; font-weight: 700; }

/* Pagination */
.pagination-wrap { padding: 14px 18px; border-top: 1px solid var(--border); }
.pagination { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.pagination li span, .pagination li a {
    display: inline-flex; min-width: 32px; height: 32px; align-items: center; justify-content: center;
    padding: 0 8px; border-radius: 8px; border: 1px solid var(--border);
    background: #fff; color: var(--text); font-size: 12px; text-decoration: none;
}
.pagination li.active span { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.pagination li.disabled span { color: #b6bdb8; }
.pagination li a:hover { background: #f3f6f4; text-decoration: none; }

/* Detail lists */
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.detail-item { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.detail-item .label { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.detail-item .value { font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 9px 14px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.active { color: var(--green-700); border-bottom-color: var(--green-700); }

/* Login */
.login-shell {
    min-height: 100vh;
    background:
        radial-gradient(900px 500px at 0% 0%, rgba(46, 158, 98, .12), transparent 60%),
        radial-gradient(700px 420px at 100% 0%, rgba(201, 162, 39, .12), transparent 58%),
        #eef4f0;
    color: var(--text);
}
.login-topbar {
    max-width: 1280px; margin: 0 auto; padding: 18px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.login-brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.login-brand:hover { text-decoration: none; }
.login-brand img { width: 46px; height: 46px; }
.login-brand strong { display: block; font-size: 14px; letter-spacing: .3px; }
.login-brand span { display: block; font-size: 11.5px; color: var(--muted); }
.login-topnav { display: flex; align-items: center; gap: 18px; font-size: 13px; font-weight: 600; }
.login-topnav a:not(.btn) { color: var(--muted); }
.login-topnav a:not(.btn):hover { color: var(--green-700); text-decoration: none; }
.login-main { max-width: 1280px; margin: 0 auto; padding: 8px 24px 40px; }
.login-hero {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(310px, .7fr); gap: 30px;
    padding: 38px; border-radius: 24px; color: #fff;
    background: linear-gradient(135deg, #083d27 0%, #0f6b3e 58%, #2e9e62 100%);
    box-shadow: 0 18px 45px rgba(8, 61, 39, .16);
}
.login-hero::before {
    content: ""; position: absolute; width: 420px; height: 420px; right: -140px; top: -170px;
    border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.login-hero::after {
    content: ""; position: absolute; width: 260px; height: 260px; left: 36%; bottom: -190px;
    border-radius: 50%; background: rgba(201, 162, 39, .16);
}
.login-hero-copy, .login-leaders { position: relative; z-index: 1; }
.login-hero h1 {
    margin: 0 0 14px; font-size: clamp(28px, 3vw, 44px); line-height: 1.08; letter-spacing: -.02em;
}
.login-hero h1 span { color: #ffe9a8; }
.login-hero p { margin: 0; max-width: 640px; color: #d6e6dc; font-size: 14px; line-height: 1.65; }
.login-badge {
    display: inline-block; font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase;
    background: rgba(201, 162, 39, .22); border: 1px solid rgba(201, 162, 39, .55);
    color: #ffe9a8; padding: 5px 11px; border-radius: 999px; margin-bottom: 14px;
}
.login-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn-outline-light { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .45); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.login-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 28px; }
.login-kpi {
    display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 12px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
}
.login-kpi-icon {
    width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
    background: rgba(201, 162, 39, .2); color: #ffe9a8; flex: 0 0 auto;
}
.login-kpi strong { display: block; font-size: 17px; line-height: 1.1; }
.login-kpi span:not(.login-kpi-icon) { display: block; font-size: 10.5px; color: #cfe4d7; }
.login-leaders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-self: end; }
.leader-card {
    background: rgba(255, 255, 255, .96); border-radius: 16px; padding: 10px;
    color: var(--text); box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
}
.leader-photo { border-radius: 12px; overflow: hidden; background: #eaf2ec; }
.leader-photo img { display: block; width: 100%; height: auto; }
.leader-meta { padding: 10px 4px 4px; }
.leader-meta span {
    display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--gold-600); font-weight: 700;
}
.leader-meta strong { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.3; }
.login-content {
    display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px;
    align-items: start; margin-top: 26px;
}
.login-charts { min-width: 0; }
.login-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 14px; }
.login-section-heading h2 { margin: 4px 0; font-size: 23px; }
.login-section-heading p { margin: 0; color: var(--muted); font-size: 12.5px; }
.login-data-meta {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    margin-top: 6px !important; font-size: 11px !important;
}
.login-data-meta svg { color: var(--green-600); flex: 0 0 auto; }
.login-chart-note { margin: 12px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.login-eyebrow {
    display: block; font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
    color: var(--green-700); font-weight: 800;
}
.login-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.login-chart-card .card-body { padding-top: 14px; }
.login-chart-card .bar-row { grid-template-columns: 112px minmax(0, 1fr) 76px; gap: 9px; }
.login-chart-card .bar-name { font-size: 11.5px; line-height: 1.25; overflow-wrap: anywhere; }
.bar-sub { display: block; color: var(--muted); font-size: 9.5px; font-weight: 500; margin-top: 2px; }
.login-chart-card .bar-value { font-size: 10.5px; white-space: nowrap; }
.login-chart-card .bar-fill { box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08); }
.login-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 18px; }
.login-card { width: 100%; background: #fff; border-radius: 18px; box-shadow: var(--shadow-md); padding: 26px; }
.login-card .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login-card .brand img { width: 44px; height: 44px; }
.login-card .brand strong { display: block; font-size: 14px; }
.login-card .brand span { font-size: 11.5px; color: var(--muted); }
.login-card h2 { margin: 4px 0; font-size: 22px; }
.login-card .sub { margin: 0 0 18px; font-size: 12.5px; color: var(--muted); }
.login-card .btn.btn-primary { width: 100%; margin-top: 6px; }
.login-remember {
    display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #4b5563; margin-bottom: 14px;
}
.login-help {
    margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
    text-align: center; font-size: 12px; color: var(--muted);
}
.login-help a { font-weight: 700; }
.login-note {
    margin-top: 14px; font-size: 11.5px; color: var(--muted); background: #f6f9f7;
    border: 1px dashed var(--border); padding: 10px 12px; border-radius: 10px;
}
.online-cta {
    background: linear-gradient(135deg, #fff8e3, #fffdf7); border: 1px solid #ead79b;
    border-radius: 16px; padding: 20px;
}
.online-cta-icon {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: var(--gold-500); color: #3c2c05; margin-bottom: 10px;
}
.online-cta h3 { margin: 4px 0 6px; font-size: 18px; }
.online-cta p { margin: 0 0 14px; color: #6b5a24; font-size: 12px; line-height: 1.55; }
.online-cta .btn { width: 100%; margin-top: 8px; }
.login-footer {
    max-width: 1280px; margin: 0 auto; padding: 18px 24px 28px;
    display: flex; justify-content: space-between; gap: 12px;
    color: var(--muted); font-size: 11.5px; border-top: 1px solid rgba(227, 232, 228, .9);
}
.login-footer p { margin: 0; }

/* Public pages */
.public-page { background: #f4f7f5; min-height: 100vh; }
.public-header {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
}
.public-header .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.public-header .brand img { width: 40px; height: 40px; }
.public-header .brand strong { display: block; font-size: 14px; }
.public-header .brand span { display: block; font-size: 11px; color: var(--muted); }
.public-nav { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.public-nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.public-nav a:hover { color: var(--green-700); }
.public-content { max-width: 1100px; margin: 0 auto; padding: 24px 18px 48px; }
.public-footer { text-align: center; color: var(--muted); font-size: 11.5px; padding: 18px; border-top: 1px solid var(--border); }
.public-hero {
    background: linear-gradient(135deg, #083d27, #0f6b3e);
    color: #fff; border-radius: 18px; padding: 28px; margin-bottom: 18px;
}
.public-hero h1 { margin: 0 0 8px; font-size: 24px; }
.public-hero p { margin: 0; color: #d6e6dc; font-size: 13px; max-width: 720px; }
.ticket-code {
    display: inline-block; padding: 8px 14px; border-radius: 10px;
    background: #083d27; color: #ffe9a8; font-size: 18px; font-weight: 700; letter-spacing: 1px;
}
.camera-dialog {
    position: fixed; inset: 0; z-index: 100; display: none;
    align-items: center; justify-content: center; padding: 18px;
    background: rgba(8, 30, 20, .65);
}
.camera-dialog.show { display: flex; }
.camera-box { width: 100%; max-width: 520px; background: #fff; border-radius: 16px; padding: 16px; }
.camera-box video { width: 100%; max-height: 60vh; border-radius: 12px; background: #111; object-fit: cover; }
.camera-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.file-camera-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.file-camera-row .form-control { flex: 1 1 180px; }

/* Responsive */
@media (max-width: 1180px) {
    .login-content { grid-template-columns: 1fr; }
    .login-side {
        order: -1; position: static;
        display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
        align-items: start;
    }
}
@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close { display: inline-flex; }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-flex; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .login-hero { grid-template-columns: 1fr; }
    .login-leaders { max-width: 440px; }
    .detail-grid { grid-template-columns: 1fr; }
    .card-header { flex-wrap: wrap; }
}
@media (max-width: 760px) {
    .login-topbar { flex-wrap: wrap; }
    .login-topnav { width: 100%; justify-content: space-between; gap: 8px; }
    .login-nav-stat { display: none; }
    .login-side { grid-template-columns: 1fr; }
    .login-chart-grid { grid-template-columns: 1fr; }
    .login-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .login-section-heading { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 640px) {
    .content { padding: 18px 14px 32px; }
    .topbar { padding: 10px 14px; gap: 10px; }
    .topbar-user { gap: 6px; }
    .user-meta { display: none; }
    .logout-text { display: none; }
    .logout-form button { padding: 7px 9px; }
    .table-wrap table.data { min-width: 680px; }
    .table-wrap table.data td[colspan] { padding: 0; }
    .table-wrap table.data td[colspan] .empty {
        position: sticky;
        left: 0;
        width: calc(100vw - 30px);
        max-width: calc(100vw - 30px);
    }
    .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-actions { flex-wrap: wrap; }
    .form-section-block, .member-row { padding: 12px; }
    .form-section-heading { margin-top: 20px; padding-top: 16px; }
    .detail-item { flex-direction: column; align-items: flex-start; gap: 2px; }
    .detail-item .value { text-align: left; }
    .bar-row { grid-template-columns: 110px 1fr; }
    .bar-value { grid-column: 2; text-align: left; }
    .hero { min-height: 200px; }
    .hero-content { padding: 20px; }
    .hero h2 { font-size: 21px; }
    .login-topbar { padding: 14px; }
    .login-main { padding: 6px 14px 30px; }
    .login-hero { padding: 22px; border-radius: 18px; }
    .login-kpi { padding: 8px 10px; }
    .login-chart-card .bar-row { grid-template-columns: 96px minmax(0, 1fr); }
    .login-chart-card .bar-value { grid-column: 2; text-align: left; }
    .login-card { padding: 22px; }
    .login-footer { flex-direction: column; padding: 16px 14px 24px; }
    .public-header { flex-wrap: wrap; padding: 12px 14px; }
    .public-nav { width: 100%; justify-content: space-between; gap: 8px; }
    .public-nav a { font-size: 12px; }
    .public-content { padding: 18px 14px 36px; }
    .public-hero { padding: 20px; }
    .public-hero h1 { font-size: 20px; }
}
@media (max-width: 420px) {
    .topbar .page-heading p { display: none; }
    .topbar-user .avatar { display: none; }
    .login-topnav { font-size: 11.5px; }
    .login-topnav .btn { padding: 6px 8px; }
    .login-card { padding: 20px; }
    .stat-card { padding: 14px; }
    .card-body { padding: 14px; }
    .card-header { padding: 13px 14px; }
}

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(8, 30, 20, .45); z-index: 35; }
.sidebar-overlay.show { display: block; }
body.sidebar-open { overflow: hidden; }
