:root {
    --bg: #0b0e14;
    --bg-card: #131722;
    --bg-card-2: #171c2b;
    --border: #232838;
    --text: #e8eaf0;
    --text-dim: #8b91a5;
    --brand: #ffb020;
    --brand-2: #ff7a1a;
    --success: #33d17a;
    --danger: #ff5c5c;
    --radius: 14px;
    color-scheme: dark;
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f5f9;
    --bg-card: #ffffff;
    --bg-card-2: #f7f8fb;
    --border: #e3e5ee;
    --text: #1b1e27;
    --text-dim: #6b7186;
}
[data-theme="light"] body {
    background: radial-gradient(circle at top left, #ffffff 0%, #f0f1f6 55%);
}
[data-theme="light"] .navbar { background: rgba(255,255,255,.9); }

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(circle at top left, #151a28 0%, var(--bg) 55%);
    color: var(--text);
    min-height: 100vh;
}

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

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(19, 23, 34, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.navbar .brand {
    font-weight: 800;
    font-size: 18px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.navbar .nav-links { display: flex; gap: 18px; align-items: center; font-size: 14px; }
.navbar .nav-links a { color: var(--text-dim); transition: color .2s; }
.navbar .nav-links a:hover { color: var(--text); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    color: #12141a;
    transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,122,26,.25); }
.btn.secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn.danger { background: linear-gradient(90deg, #ff5c5c, #d13333); color: #fff; }
.btn.small { padding: 7px 14px; font-size: 12.5px; }
.btn.full { width: 100%; }

.card {
    background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-card { width: 100%; max-width: 420px; text-align: center; }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; text-align: center; }
.auth-card p.subtitle { color: var(--text-dim); font-size: 13.5px; margin-top: 0; margin-bottom: 24px; text-align: center; }
.auth-card form { text-align: left; }
.auth-card .alert { text-align: left; }
.auth-card > p { text-align: center; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; }
.field .hint { font-size: 11.5px; color: var(--text-dim); margin-top: 5px; opacity: .8; }

input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=file], textarea, select {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: var(--bg-card-2);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s, background-color .15s;
}
[data-theme="light"] input[type=text],
[data-theme="light"] input[type=email],
[data-theme="light"] input[type=password],
[data-theme="light"] input[type=tel],
[data-theme="light"] input[type=date],
[data-theme="light"] input[type=time],
[data-theme="light"] input[type=file],
[data-theme="light"] textarea,
[data-theme="light"] select {
    background-color: #fbfbfd;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--brand);
    background-color: var(--bg-card-2);
    color: var(--text);
}
[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
    background-color: #fbfbfd;
    color: var(--text);
}

/* Dropdown option list: force readable colors regardless of OS/browser default */
select option {
    background-color: var(--bg-card-2);
    color: var(--text);
}

/* Kill browser autofill's forced white background (Chrome/Edge/Safari) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text) !important;
    caret-color: var(--text);
    transition: background-color 9999s ease-in-out 0s;
    box-shadow: 0 0 0 1000px var(--bg-card-2) inset !important;
    border-color: var(--brand) !important;
}

textarea { resize: vertical; min-height: 90px; }

.radio-group { display: flex; gap: 18px; margin-top: 4px; }
.radio-group label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text); font-weight: 400; }

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 18px;
}
.alert.error { background: rgba(255,92,92,.1); border: 1px solid rgba(255,92,92,.35); color: #ff8080; }
.alert.success { background: rgba(51,209,122,.1); border: 1px solid rgba(51,209,122,.35); color: #4fe092; }

.section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 28px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    color: var(--brand);
}
.section-title:first-child { margin-top: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
@media (max-width: 800px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card .num { font-size: 26px; font-weight: 800; color: var(--brand); }
.stat-card .label { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:hover td { background: rgba(255,255,255,.02); }

.badge { padding: 4px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.badge.Menunggu { background: rgba(255,176,32,.15); color: var(--brand); }
.badge.Diproses { background: rgba(80,150,255,.15); color: #66a3ff; }
.badge.Dipublikasikan { background: rgba(51,209,122,.15); color: var(--success); }
.badge.Ditolak { background: rgba(255,92,92,.15); color: var(--danger); }

/* Badge status pembayaran */
.badge.bayar-belum { background: rgba(139,145,165,.18); color: var(--text-dim); }
.badge.bayar-menunggu { background: rgba(255,176,32,.15); color: var(--brand); }
.badge.bayar-ditolak { background: rgba(255,92,92,.15); color: var(--danger); }
.badge.bayar-lunas { background: rgba(51,209,122,.15); color: var(--success); }

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

.modal-bg {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-bg.open { display: flex; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); max-width: 560px; width: 100%; max-height: 85vh; overflow-y: auto; padding: 26px; }
.modal h3 { margin-top: 0; color: var(--brand); }
.modal .row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.modal .row .k { color: var(--text-dim); }
.modal .row .v { text-align: right; max-width: 60%; }
.modal-close { float: right; cursor: pointer; color: var(--text-dim); font-size: 20px; }

/* ===== Logo ===== */
.brand-logo { display: flex; align-items: center; gap: 10px; }
.brand-logo img { height: 34px; width: auto; }
.auth-card .logo-top { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-card .logo-top img { height: 46px; width: auto; }

/* ===== Password show/hide ===== */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 42px; }
.password-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    cursor: pointer; color: var(--text-dim); font-size: 13px; user-select: none;
    background: none; border: none;
}

/* ===== Package selection cards ===== */
.package-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 10px; }
@media (max-width: 700px) { .package-grid { grid-template-columns: 1fr; } }
.package-option {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    position: relative;
}
.package-option:hover { border-color: var(--brand); }
.package-option input { position: absolute; opacity: 0; }
.package-option.selected { border-color: var(--brand); background: rgba(255,176,32,.07); }
.package-option .p-title { font-weight: 700; font-size: 14px; }
.package-option .p-price { color: var(--brand); font-weight: 800; font-size: 15px; margin: 4px 0; }
.package-option .p-ket { font-size: 12px; color: var(--text-dim); }

.qris-box { text-align: center; padding: 18px; border: 1px dashed var(--border); border-radius: 12px; margin: 14px 0; }
.qris-box img { max-width: 240px; width: 100%; border-radius: 10px; }
.qris-box .amount { font-size: 20px; font-weight: 800; color: var(--brand); margin-top: 10px; }

/* ===== Profile photo ===== */
.avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); background: var(--bg-card-2); }
.avatar-lg { width: 96px; height: 96px; }
.profile-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }

/* ===== Table numbering & responsive ===== */
table td.num, table th.num { width: 42px; text-align: center; color: var(--text-dim); }
@media (max-width: 780px) {
    .navbar { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
    .navbar .nav-links { gap: 10px; font-size: 12.5px; flex-wrap: wrap; }
    .wrap { padding: 20px 12px 50px; }
    .card { padding: 18px; }
    table { font-size: 12px; }
    th, td { padding: 9px 8px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card .num { font-size: 20px; }
}
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Footer ===== */
.site-footer {
    text-align: center;
    padding: 22px 16px 28px;
    margin-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 12.5px;
}
.site-footer strong { color: var(--text); font-weight: 600; }
