:root {
    --ink: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --surface: #ffffff;
    --soft: #f6f7fb;
    --brand: #1f3a8a;
    --brand-dark: #172554;
    --accent: #5b16a3;
    --gold: #b98209;
    --danger: #b42318;
    --warning: #9a6700;
    --success: #137333;
    --footer: #060b13;
    --shadow: 0 10px 26px rgba(17, 24, 39, 0.10);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: var(--soft); line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.container,
.site-main > .page-title,
.site-main > .home-title,
.site-main > .grid,
.site-main > .feature-grid,
.site-main > .detail-layout,
.site-main > .content-page,
.site-main > .panel,
.site-main > .auth-box,
.site-main > .table-wrap,
.site-main > form.panel,
.site-main > .tabs { width: min(1120px, calc(100% - 32px)); margin-left: auto; margin-right: auto; }
.site-header, .admin-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header::after { content: ""; display: block; height: 36px; background: linear-gradient(90deg, #3a085d, #4c0f66); }
.admin-header::after { content: ""; display: block; height: 8px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.header-inner, .admin-header-inner { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--brand); font-weight: 800; font-size: 16px; }
.brand::before { content: "LD"; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; font-size: 11px; }
.brand img { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; }
.brand.with-logo::before { display: none; }
.main-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 16px; font-size: 13px; }
.main-nav a, .nav-user { color: #1f2937; }
.nav-cta { padding: 8px 12px; border-radius: 6px; background: linear-gradient(90deg, var(--brand), var(--accent)); color: #fff !important; }
.menu-toggle { display: none; width: 42px; height: 42px; padding: 8px; border: 1px solid var(--line); background: #fff; border-radius: 6px; }
.menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 999px; background: var(--ink); }
.site-main { min-height: calc(100vh - 145px); padding: 36px 0 0; }
.admin-main { padding-left: 24px; padding-right: 24px; padding-bottom: 48px; }
.admin-main > .container,
.admin-main > .page-title,
.admin-main > .grid,
.admin-main > .stats-grid,
.admin-main > .detail-layout,
.admin-main > .content-page,
.admin-main > .panel,
.admin-main > .auth-box,
.admin-main > .table-wrap,
.admin-main > form.panel,
.admin-main > .tabs { width: min(1180px, 100%); }
.home-title, .page-title { text-align: center; margin-bottom: 28px; }
.split-title, .admin-main .page-title { text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.home-title h1, .page-title h1, .home-title h2 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 38px); line-height: 1.15; }
.home-title p, .page-title p { margin: 0 auto; color: var(--muted); max-width: 760px; }
.grid, .feature-grid, .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; }
.draw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.draw-card, .panel, .auth-box, .stat-card, .feature-card, .content-page { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.draw-card { overflow: hidden; display: flex; flex-direction: column; }
.draw-media { position: relative; }
.draw-card img, .draw-image { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #f3f6fb; display: block; }
.draw-placeholder { width: 100%; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #dfe7f3, #ded8f0); display: grid; place-items: center; color: var(--muted); font-weight: 700; }
.status-pill { position: absolute; top: 10px; right: 10px; min-height: 24px; padding: 4px 9px; border-radius: 999px; background: #c08a10; color: #fff; font-size: 12px; font-weight: 700; }
.status-pill.active { background: var(--brand); }
.draw-card-body, .panel, .auth-box, .stat-card, .feature-card, .content-page { padding: 20px; }
.draw-card h2, .panel h2, .auth-box h1, .page-title h1, .content-page h1 { overflow-wrap: anywhere; }
.draw-card h2 { font-size: 18px; margin: 0 0 6px; }
.draw-summary { color: var(--muted); font-size: 14px; min-height: 42px; margin: 0 0 12px; }
.draw-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 8px; border-radius: 6px; background: #eef2ff; color: var(--brand-dark); font-size: 13px; }
.badge.success { background: #dff4e6; color: var(--success); }
.badge.warning { background: #fff4dc; color: var(--warning); }
.badge.danger { background: #ffe4e1; color: var(--danger); }
.progress-label { margin: 8px 0 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.progress { height: 8px; background: #e8e8f0; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; min-width: 0; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.progress-row { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 14px; color: var(--muted); font-size: 13px; }
.btn, button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 10px 15px; border: 1px solid var(--brand); border-radius: 6px; background: var(--surface); color: var(--brand); font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.primary, button.primary { background: linear-gradient(90deg, var(--brand), var(--accent)); border-color: transparent; color: #fff !important; }
.draw-card .btn.primary { width: 100%; }
.btn.secondary, button.secondary { border-color: var(--line); color: var(--ink); }
.btn.danger, button.danger { border-color: var(--danger); color: var(--danger); }
.feature-heading { margin-top: 64px; }
.feature-card { min-height: 148px; }
.feature-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #eef2ff; color: var(--brand); font-weight: 800; font-size: 12px; }
.stats-band { margin-top: 58px; padding: 34px max(16px, calc((100% - 1120px) / 2)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; text-align: center; color: #fff; background: linear-gradient(90deg, #20206b, #3e1478); }
.stats-band strong { display: block; font-size: clamp(24px, 3vw, 34px); }
.stats-band span { color: #c9c6ee; font-size: 13px; }
.cta-band { text-align: center; padding: 56px 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-row { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.form-row.full { grid-column: 1 / -1; }
label { font-weight: 700; }
input, textarea, select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font: inherit; background: #fff; }
textarea { min-height: 120px; resize: vertical; }
.help { color: var(--muted); font-size: 13px; }
.auth-box { max-width: 520px; }
.wallet-total { min-width: 220px; padding: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--brand), var(--accent)); color: #fff; box-shadow: var(--shadow); }
.wallet-total span, .wallet-total strong { display: block; }
.wallet-total strong { font-size: 26px; }
.payment-box { text-align: center; }
.payment-qr { display: block; width: min(280px, 100%); height: auto; margin: 18px auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.payment-summary { margin: 16px 0; padding: 12px; border-radius: 8px; background: #f1f4fb; text-align: left; }
.payment-summary p { margin: 4px 0; overflow-wrap: anywhere; }
.payment-verification { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0; padding: 14px; border: 1px solid #c7d2fe; border-radius: 8px; background: #eef2ff; text-align: left; }
.payment-verification strong { display: block; margin-bottom: 3px; }
.payment-verification p { margin: 0; color: var(--muted); font-size: 13px; }
.verification-indicator { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; border: 2px solid #a5b4fc; border-top-color: var(--brand); border-radius: 50%; animation: verification-spin 0.9s linear infinite; }
.payment-verification.is-complete { border-color: #b9e2c8; background: #e0f3e8; }
.payment-verification.is-complete .verification-indicator { border: 0; background: var(--success); animation: none; }
.payment-verification.is-failed { border-color: #efb4ae; background: #ffe4e1; }
.payment-verification.is-failed .verification-indicator { border: 0; background: var(--danger); animation: none; }
.payment-verification.is-waiting { border-color: #f4d28e; background: #fff4dc; }
.payment-verification.is-waiting .verification-indicator { border: 0; background: var(--warning); animation: none; }
@keyframes verification-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .verification-indicator { animation: none; }
}
.inline-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.confirm-modal[hidden] { display: none; }
.confirm-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(6, 11, 19, 0.58); }
.confirm-card { width: min(420px, 100%); padding: 22px; border-radius: 8px; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24); }
.confirm-card .actions { justify-content: flex-end; margin-top: 18px; }
.alert { border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; background: #e8eef6; border: 1px solid var(--line); }
.alert-success { background: #e0f3e8; border-color: #b9e2c8; }
.alert-warning { background: #fff4dc; border-color: #f4d28e; }
.alert-danger, .alert-error { background: #ffe4e1; border-color: #efb4ae; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.panel + .panel, .table-wrap, .compact-table { margin-top: 18px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f1f4fb; font-size: 12px; text-transform: uppercase; letter-spacing: 0; }
tr:last-child td { border-bottom: 0; }
.stats-grid { margin-bottom: 22px; }
.dashboard-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
.dashboard-stats .stat-card { display: flex; min-height: 126px; flex-direction: column; justify-content: center; }
.dashboard-stats .stat-card strong { overflow-wrap: anywhere; font-size: clamp(21px, 2vw, 28px); }
.stat-card strong { display: block; font-size: 26px; }
.stat-card { min-height: 112px; }
.checkbox-row label { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; }
.checkbox-row input[type="checkbox"] { width: auto; min-height: 0; margin-top: 4px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tabs a { padding: 10px 14px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; }
.tabs a.active { color: #fff; border-color: transparent; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.site-footer { background: var(--footer); color: #b7c0d1; padding: 42px 0 22px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; }
.footer-grid h3, .footer-grid h4 { color: #fff; margin: 0 0 12px; }
.footer-grid p, .footer-grid a { color: #b7c0d1; }
.footer-grid nav { display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); margin-top: 28px; padding-top: 18px; text-align: center; color: #7d8798; }
.table-wrap .actions { gap: 6px; }
.table-wrap .actions .btn, .table-wrap .actions button { min-height: 34px; padding: 7px 10px; font-size: 12px; }
@media (max-width: 900px) {
    .draw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-band, .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-layout { grid-template-columns: 1fr; }
    .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .split-title, .admin-main .page-title { display: block; }
    .header-inner, .admin-header-inner { position: relative; }
    .menu-toggle { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; margin-left: auto; }
    .main-nav { display: none; position: absolute; top: calc(100% + 8px); right: 0; width: min(280px, calc(100vw - 32px)); padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); z-index: 20; flex-direction: column; align-items: stretch; gap: 0; }
    .main-nav.is-open { display: flex; }
    .main-nav a, .nav-user { display: block; padding: 11px 12px; border-radius: 6px; }
    .site-header::after { height: 22px; }
    .form-grid { grid-template-columns: 1fr; }
    .admin-main { padding-left: 16px; padding-right: 16px; }
    .wallet-total { margin-top: 14px; }
    .draw-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .stats-band, .footer-grid { grid-template-columns: 1fr; }
    .site-main { padding-top: 26px; }
    .dashboard-stats { grid-template-columns: 1fr; }
}
