:root {
    --bg-dark: #050b14;
    --bg-sidebar: #0a1628;
    --bg-card: #0f1f35;
    --bg-card-alt: #152538;
    --gold: #d4af37;
    --gold-light: #f5e6c8;
    --gold-dark: #b8860b;
    --cream: #f8f1e3;
    --text: #e8e0d0;
    --muted: #8a9aaa;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --border: rgba(212, 175, 55, 0.25);
    --radius: 12px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 28px 20px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.logo-circle {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #1a2a40, #0f1f35);
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 26px;
    color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.sidebar-title {
    font-family: 'Oxanium', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--cream);
    letter-spacing: 1px;
}

.sidebar-title span {
    color: var(--gold);
}

.sidebar-subtitle {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 2px;
    margin-top: 4px;
    text-transform: uppercase;
}

.info-box {
    margin: 20px 16px;
    padding: 16px;
    background: linear-gradient(145deg, #1a2a40, #0f1f35);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.info-label {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.info-value {
    font-family: 'Oxanium', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--gold);
    margin: 6px 0 2px;
}

.info-value small {
    font-size: 14px;
    color: var(--gold-light);
}

.info-sub {
    font-size: 12px;
    color: var(--muted);
}

.sidebar-menu {
    flex: 1;
    padding: 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.menu-item:hover {
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold-light);
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.15), transparent);
    color: var(--gold);
    border-left: 3px solid var(--gold);
}

.menu-icon {
    width: 22px;
    text-align: center;
    font-size: 15px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--success);
    font-weight: 600;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.version {
    color: var(--muted);
    font-size: 11px;
}

/* ========== MAIN ========== */
.main-content {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.marquee-box {
    background: linear-gradient(90deg, #0f1f35, #1a2a40);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.marquee-badge {
    background: var(--gold);
    color: #0a1628;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    white-space: nowrap;
}

.marquee-box marquee {
    color: var(--gold-light);
    flex: 1;
}

.header {
    padding: 24px 28px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}

.header-title-wrap h1 {
    font-family: 'Oxanium', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--cream);
    margin-bottom: 4px;
}

.header-title-wrap p {
    font-size: 13px;
    color: var(--muted);
}

.badge-total {
    background: linear-gradient(135deg, #1a2a40, #0f1f35);
    border: 1px solid var(--gold);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--gold-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-total strong {
    color: var(--gold);
    font-family: 'Oxanium', sans-serif;
}

/* ========== CONTENT PANELS ========== */
.content-panel {
    display: none;
    padding: 0 28px 32px;
    flex: 1;
}

.content-panel.active {
    display: block;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-val {
    font-family: 'Oxanium', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--cream);
}

.stat-val.gold { color: var(--gold); }
.stat-val.success { color: var(--success); }
.stat-val.warning { color: var(--warning); }
.stat-val.danger { color: var(--danger); }

.stat-change {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

.stat-change.success { color: var(--success); }
.stat-change.warning { color: var(--warning); }

/* Table Card */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table-head-bar {
    padding: 14px 20px;
    background: linear-gradient(90deg, #1a2a40, #0f1f35);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
}

.table-head-bar .muted {
    color: var(--muted);
    font-weight: 400;
    font-size: 12px;
}

.table-scroll {
    overflow-x: auto;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.result-table thead th {
    background: #0a1628;
    color: var(--gold);
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.result-table tbody td {
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}

.result-table tbody tr:nth-child(even) {
    background: var(--bg-card-alt);
}

.result-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.06);
}

.num {
    font-family: 'Oxanium', sans-serif;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
}

.name {
    font-weight: 600;
    color: var(--cream);
}

.name.empty {
    color: var(--muted);
    font-style: italic;
    font-weight: 400;
}

.amount {
    font-family: 'Oxanium', sans-serif;
    font-weight: 700;
    color: var(--gold);
}

.muted {
    color: var(--muted);
    font-size: 11px;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.status-badge.paid {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
    border: 1px solid rgba(74, 222, 128, 0.4);
}

.status-badge.unpaid {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.status-badge:hover {
    transform: scale(1.04);
}

.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

/* Ketentuan */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
    box-shadow: var(--shadow);
}

.info-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1a2a40, #0f1f35);
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 18px;
    color: var(--gold);
}

.info-card h3 {
    font-family: 'Oxanium', sans-serif;
    font-size: 15px;
    color: var(--gold);
    margin-bottom: 8px;
}

.info-card p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.info-card strong {
    color: var(--cream);
}

.rules-content {
    padding: 20px 28px;
}

.rules-content ol {
    padding-left: 20px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.9;
}

.rules-content strong {
    color: var(--gold);
}

/* Progress */
.progress-overview {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.progress-circle-wrap {
    text-align: center;
}

.progress-circle {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 12px;
}

.progress-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-circle .bg {
    fill: none;
    stroke: #1a2a40;
    stroke-width: 10;
}

.progress-circle .progress {
    fill: none;
    stroke: var(--gold);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-text .pct {
    display: block;
    font-family: 'Oxanium', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--gold);
}

.progress-text small {
    font-size: 12px;
    color: var(--muted);
}

.progress-label {
    font-size: 13px;
    color: var(--muted);
}

.progress-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.progress-item-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
}

.progress-item-value {
    font-family: 'Oxanium', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 8px;
}

.bar {
    height: 8px;
    background: #1a2a40;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.bar-fill.gold { background: var(--gold); }
.bar-fill.success { background: var(--success); }

/* History */
.history-list {
    padding: 8px 0;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    font-family: 'Oxanium', sans-serif;
    font-weight: 700;
    color: var(--gold);
    width: 80px;
    font-size: 13px;
}

.history-name {
    flex: 1;
    font-weight: 500;
    color: var(--cream);
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.main-footer strong {
    color: var(--gold);
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .main-content {
        margin-left: 0;
    }
    .progress-overview {
        grid-template-columns: 1fr;
    }
    body {
        flex-direction: column;
    }
}
