/* =====================================================================
   Doorprize Online — panel admin & super admin
   Design tokens -> base -> layout -> components -> pages -> responsive
   ===================================================================== */

@font-face { font-family: 'Montserrat'; src: url('../../../assets/font/Montserrat-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('../../../assets/font/Montserrat-Black.ttf') format('truetype'); font-weight: 800; font-display: swap; }

:root {
    /* Brand */
    --blue: #0b63c5;
    --blue-dark: #0a3d7a;
    --blue-50: #eef5ff;
    --blue-100: #dbeafe;
    /* Neutrals */
    --bg: #f4f6fb;
    --surface: #ffffff;
    --border: #e4e9f1;
    --border-strong: #cfd8e3;
    --text: #0f1b2d;
    --text-2: #3b4a5e;
    --muted: #6b7a90;
    /* Status */
    --success: #12a150;
    --success-50: #e7f7ee;
    --warning: #b86e00;
    --warning-50: #fff5e0;
    --danger: #d93a3a;
    --danger-50: #fdecec;
    --info-50: #e8f3ff;
    /* Sidebar */
    --side-bg: #0b1a33;
    --side-bg-2: #0f2448;
    --side-text: #b6c3d8;
    --side-active: rgba(255, 255, 255, 0.08);
    /* Shape */
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.04), 0 1px 3px rgba(15, 27, 45, 0.06);
    --shadow: 0 4px 24px rgba(15, 27, 45, 0.06);
    --shadow-lg: 0 20px 50px rgba(15, 27, 45, 0.18);
    --font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Montserrat', var(--font);
    --sidebar-w: 256px;
}
.is-sa { --side-bg: #1a1238; --side-bg-2: #2a1d57; --blue: #5b45d6; --blue-dark: #3a2a99; --blue-50: #f1eeff; --blue-100: #e2dcff; }

/* ---------------- Base ---------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: none; color: var(--blue-dark); }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; }
img { max-width: 100%; }
.icon { width: 18px; height: 18px; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------------- App shell ---------------- */
.app-shell { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main-content { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: 32px 40px 48px; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column; padding: 20px 14px;
    background: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg-2) 100%); color: var(--side-text);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; margin-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.brand-mark {
    width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #3b8bff, #0b63c5); color: #fff; box-shadow: 0 6px 16px rgba(11, 99, 197, 0.35);
}
.is-sa .brand-mark { background: linear-gradient(135deg, #8b7bff, #5b45d6); box-shadow: 0 6px 16px rgba(91, 69, 214, 0.35); }
.brand-mark .icon { width: 20px; height: 20px; }
.brand-mark.sm { width: 28px; height: 28px; border-radius: 8px; box-shadow: none; }
.brand-mark.sm .icon { width: 16px; height: 16px; }
.brand-text { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: #fff; line-height: 1.25; min-width: 0; }
.brand-text small { display: block; font-family: var(--font); font-weight: 400; font-size: 12px; color: var(--side-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.sidebar .sidebar-close { display: none; margin-left: auto; color: #fff; }

.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
    color: var(--side-text); font-size: 14px; font-weight: 500; transition: background .15s ease, color .15s ease;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.sidebar nav a.active { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 #4ea1ff; }
.is-sa .sidebar nav a.active { box-shadow: inset 3px 0 0 #a596ff; }
.sidebar nav a.disabled { opacity: .45; cursor: not-allowed; }
.sidebar nav a.disabled:hover { background: none; color: var(--side-text); }
.sidebar nav a .lock { margin-left: auto; width: 14px; height: 14px; }
.nav-count { margin-left: auto; background: #ff9f1a; color: #1a1238; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.nav-cta {
    display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 11px 14px; border-radius: 12px;
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); color: #fff !important; font-weight: 600;
}
.nav-cta:hover { background: rgba(255, 255, 255, 0.14); }
.sidebar-foot { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #4ea1ff, #0b63c5); color: #fff; font-weight: 700; }
.is-sa .avatar { background: linear-gradient(135deg, #a596ff, #5b45d6); }
.user-chip-text { min-width: 0; flex: 1; line-height: 1.3; }
.user-chip-text b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-text small { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; position: relative; width: 36px; height: 36px; border-radius: 10px; border: none; background: transparent; color: inherit; cursor: pointer; }
.sidebar .icon-btn { color: var(--side-text); }
.sidebar .icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: #ff9f1a; }
.sidebar-backdrop { display: none; }

/* Mobile top bar (disembunyikan di desktop) */
.mobile-bar { display: none; }

/* ---------------- Page header ---------------- */
.page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 24px; }
.page-header h1 { font-size: 26px; font-weight: 600; margin: 0; color: var(--text); }
.page-header > div:last-child:not(:first-child) { display: flex; flex-wrap: wrap; gap: 8px; }
.hint-text { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

/* ---------------- Cards ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.card-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 16px; }
.card h2 { color: var(--text); font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.stat-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--blue); }
.stat-card:nth-child(2)::before { background: #7c5cff; }
.stat-card:nth-child(3)::before { background: var(--success); }
.stat-card:nth-child(4)::before { background: #ff9f1a; }
.stat-card .num { font-family: var(--font-display); font-size: 30px; font-weight: 600; color: var(--text); line-height: 1.15; }
.stat-card .label { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px;
    border-radius: var(--radius-sm); border: 1px solid transparent; font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; background: var(--blue); color: #fff; white-space: nowrap; transition: background .15s ease, box-shadow .15s ease, transform .05s ease;
    box-shadow: 0 1px 2px rgba(11, 99, 197, 0.25);
}
.btn:hover { background: var(--blue-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.secondary { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn.secondary:hover { background: #f6f8fb; color: var(--text); }
.btn.danger { background: var(--danger); box-shadow: 0 1px 2px rgba(217, 58, 58, 0.25); }
.btn.danger:hover { background: #b82f2f; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }

/* ---------------- Forms ---------------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
    font-family: inherit; font-size: 14px; color: var(--text); background: var(--surface);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; transition: border-color .15s ease, box-shadow .15s ease;
}
.form-group input, .form-group select, .form-group textarea { width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
input:disabled { background: #f4f6fa; color: var(--muted); }
input[type=file] { font-size: 13px; padding: 8px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); width: 100%; background: #fafbfd; }
.form-group input[type=color] { width: 64px; height: 42px; padding: 3px; cursor: pointer; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.inline-check { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; margin-top: 8px; cursor: pointer; }
.inline-check input { width: 16px !important; height: 16px; accent-color: var(--blue); }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar input[type=text] { min-width: 220px; }

/* ---------------- Tables ---------------- */
.table-wrap {
    width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 12px;
    /* Bayangan di tepi kiri/kanan saat tabel bisa digeser (petunjuk ada kolom tersembunyi) */
    background:
        linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) 0 0 / 40px 100% no-repeat local,
        linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) 100% 0 / 40px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, rgba(15, 27, 45, 0.14), transparent) 0 0 / 14px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, rgba(15, 27, 45, 0.14), transparent) 100% 0 / 14px 100% no-repeat scroll;
}
/* Tabel kosong ("Belum ada data") tidak perlu lebar minimum */
.table-wrap:has(td[colspan]) table { min-width: 0 !important; }
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; text-align: left; vertical-align: middle; }
table th { background: #f8fafc; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
table tbody tr:last-child td { border-bottom: none; }
table tbody tr:hover td { background: #fafcff; }
table th.sortable { cursor: pointer; user-select: none; }
table th.sortable:hover, table th.sortable.sort-active { color: var(--blue); }
table th.sortable .sort-indicator { font-size: 10px; margin-left: 3px; }
.actions-cell { white-space: nowrap; }
.actions-cell .btn { margin: 2px 2px 2px 0; }
td .btn.small + .btn.small { margin-left: 4px; }
.hadiah-thumb { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; background: #f6f8fb; }
.bukti-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.mono { font-family: Consolas, 'SFMono-Regular', monospace; font-size: 13px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.win { background: var(--success-50); color: #0c7a3c; }
.badge.wait { background: var(--warning-50); color: var(--warning); }
.badge.lose { background: var(--danger-50); color: #b42323; }
.badge.info { background: var(--info-50); color: #0b4f8a; }

/* Pagination */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pagination span { margin-right: auto !important; color: var(--muted) !important; }
.pagination button { min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.pagination button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.pagination button.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.pagination button:disabled { opacity: .4; cursor: default; }

/* Alerts */
.alert { display: block; padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 14px; line-height: 1.6; }
.alert.warn { background: var(--warning-50); color: #7a4a00; border: 1px solid #fcd9a0; }
.alert.info { background: var(--info-50); color: #0b4f8a; border: 1px solid #c4defc; }
.alert a { display: inline-block; font-weight: 600; margin-left: 6px; white-space: nowrap; }
.warn-text { color: var(--warning); }
.steps { line-height: 1.9; padding-left: 20px; }

/* Filter pills */
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tabs a { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-2); font-size: 13px; font-weight: 500; }
.filter-tabs a:hover { border-color: var(--blue); color: var(--blue); }
.filter-tabs a.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 20, 40, 0.5); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; z-index: 300; padding: 16px; }
.modal-backdrop.show { display: flex; }
.modal { background: var(--surface); border-radius: 18px; padding: 28px; width: 460px; max-width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modal-in .18s ease; }
.modal h2 { margin: 0 0 18px; font-size: 19px; color: var(--text); }
@keyframes modal-in { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

/* Toast */
.toast { position: fixed; top: 20px; right: 20px; max-width: calc(100vw - 40px); background: #0f1b2d; color: #fff; padding: 12px 18px 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 400; display: none; font-size: 14px; border-left: 4px solid var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.show { display: block; animation: modal-in .2s ease; }

.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.tabs button { padding: 10px 18px; border: none; background: none; cursor: pointer; font-size: 14px; border-bottom: 3px solid transparent; color: var(--muted); }
.tabs button.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.import-result { margin-top: 14px; font-size: 13px; }

/* ---------------- Language switcher ---------------- */
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: #eef2f7; font-size: 12px; }
.lang-switch a { padding: 4px 11px; border-radius: 999px; color: var(--muted); font-weight: 700; letter-spacing: .03em; }
.lang-switch a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.sidebar-lang { align-self: flex-start; background: rgba(255, 255, 255, 0.07); }
.sidebar-lang a { color: var(--side-text); }
.sidebar-lang a.active { background: #fff; color: var(--side-bg); }

/* =====================================================================
   Auth pages (login / register / super admin login)
   ===================================================================== */
.login-wrapper {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px;
    background:
        radial-gradient(circle at 15% 20%, rgba(78, 161, 255, 0.35), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(124, 92, 255, 0.25), transparent 45%),
        linear-gradient(160deg, #0b1a33 0%, #102a55 100%);
}
.login-box { position: relative; width: 420px; max-width: 100%; background: var(--surface); padding: 60px 36px 32px; border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); text-align: center; }
.login-box > .lang-switch { position: absolute; top: 16px; right: 16px; }
.login-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .08em; color: var(--blue); text-transform: uppercase; }
.login-box h1 { font-size: 24px; font-weight: 600; color: var(--text); margin: 10px 0 8px; }
.login-sub { font-size: 13px; color: var(--muted); margin: 0 0 22px; line-height: 1.6; }
.login-box form { margin-top: 18px; }
.login-box input { width: 100%; height: 46px; margin-bottom: 12px; }
.login-box button[type=submit] {
    width: 100%; height: 48px; margin-top: 4px; border: none; border-radius: 12px; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 600; color: #fff;
    background: linear-gradient(135deg, #2f86f0, #0b63c5); box-shadow: 0 8px 20px rgba(11, 99, 197, 0.3);
}
.login-box button[type=submit]:hover { filter: brightness(1.05); }
.login-box.sa button[type=submit] { background: linear-gradient(135deg, #7c6bff, #4b36c4); box-shadow: 0 8px 20px rgba(91, 69, 214, 0.3); }
.login-box.sa .login-brand { color: #5b45d6; }
.login-alt { font-size: 14px; color: var(--muted); margin: 18px 0 0; }
.login-alt a { font-weight: 600; }
.login-error { background: var(--danger-50); color: #b42323; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; display: none; text-align: left; }
.register-contact { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.register-contact-title { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.register-contact .chat-buttons { justify-content: center; }

/* Chat buttons */
.chat-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.chat-buttons.compact .chat-btn { padding: 8px 14px; font-size: 13px; }
.chat-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; color: #fff !important; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-sm); }
.chat-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.chat-btn.wa { background: #22c35e; }
.chat-btn.wa:hover { background: #1aa851; }
.chat-btn.tg { background: #229ed9; }
.chat-btn.tg:hover { background: #1b8bc0; }
.chat-float { position: fixed; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%; background: #22c35e; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28); z-index: 150; transition: transform .15s ease; }
.chat-float svg { width: 30px; height: 30px; }
.chat-float:hover { transform: scale(1.06); color: #fff; }

/* =====================================================================
   Pages
   ===================================================================== */
/* ---- Tampilan ---- */
.tampilan-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: start; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.radio-row label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer; font-size: 14px; }
.radio-row label:has(input:checked) { border-color: var(--blue); background: var(--blue-50); color: var(--blue-dark); font-weight: 600; }
.radio-row input { accent-color: var(--blue); margin: 0; }
.color-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.logo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.logo-preview { height: 76px; border: 1px dashed var(--border-strong); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; background: repeating-conic-gradient(#f2f5f9 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.logo-preview img { max-height: 60px; max-width: 90%; object-fit: contain; }
.logo-preview span { font-size: 12px; color: var(--muted); }
.preview-card { position: sticky; top: 24px; }
.preview-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.preview-tabs button { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; color: var(--text-2); font-family: inherit; }
.preview-tabs button.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.preview-frame { width: 100%; overflow: hidden; border-radius: 12px; box-shadow: 0 0 0 1px var(--border), var(--shadow); position: relative; }
.preview-stage { width: 1920px; height: 1080px; transform-origin: 0 0; position: absolute; left: 0; top: 0; font-family: var(--font-display); --primary: #0068B5; --pill-text: #fff; }
.pv-logo { position: absolute; top: 28px; max-height: 100px; max-width: 400px; object-fit: contain; }
.pv-logo.left { left: 50px; }
.pv-logo.right { right: 50px; }
.pv-left { position: absolute; top: 180px; bottom: 150px; left: 130px; width: 870px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pv-left img { max-width: 100%; max-height: 480px; }
.pv-hadiah { margin-top: 26px; font-size: 46px; font-weight: 800; color: var(--primary); }
.pv-right { position: absolute; top: 170px; bottom: 140px; left: 1111px; width: 525px; display: flex; flex-direction: column; justify-content: center; }
.pv-title { text-align: center; font-size: 52px; font-weight: 800; color: var(--primary); margin-bottom: 30px; text-transform: uppercase; white-space: nowrap; }
.pv-rows { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); gap: 18px 26px; }
.pv-pill { background: var(--primary); color: var(--pill-text); border-radius: 999px; height: 118px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; }
.pv-pill b { font-size: 38px; letter-spacing: 1px; }
.pv-pill span { font-size: 26px; margin-top: 4px; }
.preview-stage[data-cols="2"] .pv-left { left: 60px; width: 640px; }
.preview-stage[data-cols="2"] .pv-left img { max-height: 420px; }
.preview-stage[data-cols="2"] .pv-right { left: 760px; width: 1100px; }
.preview-stage[data-cols="2"] .pv-pill { height: 112px; }
.preview-stage[data-cols="3"] .pv-left { left: 40px; width: 480px; }
.preview-stage[data-cols="3"] .pv-left img { max-height: 360px; }
.preview-stage[data-cols="3"] .pv-right { left: 560px; width: 1320px; }
.preview-stage[data-cols="3"] .pv-pill { height: 106px; }
.preview-stage[data-cols="3"] .pv-pill b { font-size: 30px; }
.preview-stage[data-cols="3"] .pv-pill span { font-size: 21px; }

/* ---- Langganan ---- */
.status-card { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; border-left: 5px solid var(--danger); }
.status-card.ok { border-left-color: var(--success); }
.status-label { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .08em; font-weight: 600; }
.status-value { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--text); }
.status-card .chat-buttons { margin-left: auto; }
.pay-layout { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.pay-amount { font-family: var(--font-display); font-size: 42px; font-weight: 600; color: var(--success); line-height: 1.1; }
.pay-amount span { font-size: 18px; color: var(--muted); }
.pay-sub { font-size: 13px; color: var(--muted); margin: 6px 0 16px; }
.pay-qr { display: block; width: 240px; max-width: 100%; margin: 8px auto 6px; border: 1px solid var(--border); border-radius: 16px; padding: 10px; background: #fff; box-shadow: var(--shadow); }
.pay-qr.qris { width: 280px; }
.pay-info { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 12px; font-size: 14px; margin: 18px 0; }
.pay-info dt { color: var(--muted); }
.pay-info dd { margin: 0; word-break: break-all; }
.pay-info code { background: #f2f5f9; padding: 3px 7px; border-radius: 6px; font-size: 13px; }
.pay-instruksi { font-size: 13px; color: var(--text-2); background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; line-height: 1.6; }
.method-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 18px; }
.method-tabs button { border: 2px solid var(--border); background: var(--surface); border-radius: 12px; padding: 10px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); }
.method-tabs button small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
.method-tabs button.active { border-color: var(--blue); background: var(--blue-50); color: var(--blue-dark); }

/* ---- Super admin: pengaturan ---- */
.method-toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.method-toggle { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--border); border-radius: 12px; padding: 14px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.method-toggle:has(input:checked) { border-color: var(--blue); background: var(--blue-50); }
.method-toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }
.method-toggle b { display: block; font-size: 15px; }
.method-toggle small { color: var(--muted); font-size: 13px; }
.method-section.off { opacity: .55; }
.method-section.off .card-title::after { content: ' ' attr(data-off-label); font-family: var(--font); font-size: 13px; font-weight: 400; color: var(--warning); }

/* ---- Tutorial ---- */
.tut-callout { display: flex; align-items: center; gap: 16px; background: linear-gradient(100deg, var(--blue-50), #fff 70%); border-color: var(--blue-100); }
.tut-callout .btn { margin-left: auto; }
.tut-callout-icon { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; }
.tut-callout-icon .icon { width: 22px; height: 22px; }
.page-header > .tut-progress-wrap { display: block; min-width: 220px; text-align: right; }
.tut-progress-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.tut-progress { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.tut-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #22c35e, var(--success)); transition: width .3s ease; }
.tut-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.tut-nav { list-style: none; margin: 0; padding: 10px; position: sticky; top: 24px; }
.tut-nav button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: none; background: none; border-radius: 10px; cursor: pointer; text-align: left; font-family: inherit; font-size: 14px; color: var(--text-2); }
.tut-nav button:hover { background: #f4f6fa; }
.tut-nav button.active { background: var(--blue-50); color: var(--blue-dark); font-weight: 600; }
.tut-num { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--border); color: var(--text-2); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.tut-nav button.active .tut-num { background: var(--blue); color: #fff; }
.tut-nav button.done .tut-num { background: var(--success); color: #fff; font-size: 0; }
.tut-nav button.done .tut-num::after { content: '\2713'; font-size: 14px; }
.tut-card { padding: 32px; min-height: 420px; }
.tut-step-count { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); font-weight: 700; }
.tut-step h2 { margin: 6px 0 10px; font-size: 24px; color: var(--text); }
.tut-intro { font-size: 15px; color: var(--text-2); margin: 0 0 18px; }
.tut-items { padding-left: 22px; margin: 0 0 18px; line-height: 1.7; font-size: 15px; }
.tut-items li { margin-bottom: 6px; padding-left: 4px; }
.tut-note { background: var(--warning-50); border-left: 4px solid #f0b400; padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; }
.tut-showme { margin-right: 8px; }
.tut-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); }
.tut-actions .tut-done { margin: 0 auto 0 4px; }
.tut-finish { text-align: center; }
.tut-finish .tut-items { display: inline-block; text-align: left; }
.tut-finish .tut-actions { justify-content: center; }
.tut-finish-icon { font-size: 54px; }
.tut-visual { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 18px; overflow-x: auto; }
.tut-excel { width: auto; border-collapse: collapse; font-family: Consolas, monospace; font-size: 13px; background: #fff; }
.tut-excel th, .tut-excel td { border: 1px solid var(--border-strong); padding: 6px 14px; text-transform: none; letter-spacing: 0; }
.tut-excel th { background: #eef2f7; color: var(--muted); text-align: center; font-size: 13px; }
.tut-excel tbody tr:hover td, .tut-excel tr:hover td { background: #fff; }
.tut-rounds-head, .tut-rounds-foot { font-size: 14px; margin-bottom: 10px; }
.tut-rounds-foot { margin: 10px 0 0; color: var(--muted); }
.tut-round { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 14px; }
.tut-round-label { width: 70px; flex-shrink: 0; color: var(--muted); }
.tut-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.tut-pills i { width: 22px; height: 12px; border-radius: 999px; background: var(--blue); display: block; }
.tut-keys { display: flex; flex-wrap: wrap; gap: 14px; }
.tut-key { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 76px; font-size: 13px; color: var(--text-2); }
.tut-key kbd { min-width: 44px; height: 44px; padding: 0 10px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--border-strong); border-bottom-width: 4px; border-radius: 8px; font-family: inherit; font-size: 18px; font-weight: 700; color: var(--blue-dark); }

/* Sorotan "Show me" */
.tour-highlight { position: relative; z-index: 1001; box-shadow: 0 0 0 4px #ffb020, 0 0 0 9999px rgba(10, 20, 40, 0.55) !important; border-radius: 10px; }
.tour-bubble { position: absolute; z-index: 1002; width: 320px; max-width: calc(100vw - 24px); background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-lg); border-top: 4px solid #ffb020; }
.tour-bubble-step { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--warning); font-weight: 700; }
.tour-bubble-title { font-weight: 700; color: var(--text); margin: 2px 0 6px; }
.tour-bubble p { margin: 0 0 12px; font-size: 14px; color: var(--text-2); }
.tour-bubble-actions { display: flex; justify-content: space-between; gap: 8px; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1200px) {
    .tampilan-layout, .pay-layout { grid-template-columns: minmax(0, 1fr); }
    .preview-card { position: static; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Tablet & HP: sidebar jadi laci (drawer) + top bar */
@media (max-width: 960px) {
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; z-index: 500; height: 100%;
        transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow-lg);
    }
    .sidebar-open .sidebar { transform: none; }
    .sidebar .sidebar-close { display: inline-flex; }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 450; background: rgba(10, 20, 40, 0.5); }
    .sidebar-open .sidebar-backdrop { display: block; }
    .sidebar-open { overflow: hidden; }

    .mobile-bar {
        display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 100;
        height: 58px; padding: 0 12px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border);
    }
    .mobile-bar .icon-btn { color: var(--text); }
    .mobile-bar .icon-btn:hover { background: #f1f4f8; }
    .mobile-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--text); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mobile-bar .lang-switch { margin-left: auto; flex-shrink: 0; }
    .main-content { padding: 22px 20px 40px; }
    .tut-layout { grid-template-columns: minmax(0, 1fr); }
    .tut-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 8px; }
    .tut-nav li { flex-shrink: 0; }
    .tut-nav-title { display: none; }
}

@media (max-width: 640px) {
    body { font-size: 14px; }
    .main-content { padding: 18px 14px 36px; }
    .page-header { margin-bottom: 18px; }
    .page-header h1 { font-size: 22px; }
    .page-header > div:last-child:not(:first-child) { width: 100%; }
    .page-header > div:last-child:not(:first-child) .btn { flex: 1 1 calc(50% - 4px); }
    .page-header > .btn, .page-header > a.btn { width: 100%; }
    .card { padding: 18px 16px; border-radius: 12px; margin-bottom: 16px; }
    .stat-grid { gap: 10px; margin-bottom: 16px; }
    .stat-card { padding: 14px 16px; }
    .stat-card .num { font-size: 24px; }
    .stat-card .label { font-size: 12px; }
    .toolbar { gap: 8px; }
    .toolbar input[type=text] { flex: 1 1 100%; min-width: 0; }
    .toolbar select { flex: 1 1 calc(50% - 4px); }
    .toolbar .btn { flex: 1 1 100%; }
    table th, table td { padding: 10px 12px; }
    .table-wrap table { min-width: 560px; }
    .pagination span { width: 100%; margin-bottom: 2px; }
    .logo-grid, .method-toggles { grid-template-columns: minmax(0, 1fr); }
    .status-card { flex-direction: column; align-items: flex-start; gap: 8px; }
    .status-card .chat-buttons { margin-left: 0; }
    .pay-info { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .pay-info dd { margin-bottom: 8px; }
    .pay-amount { font-size: 34px; }
    .tut-callout { flex-wrap: wrap; }
    .tut-callout .btn { width: 100%; margin-left: 0; }
    .tut-card { padding: 20px 16px; }
    .tut-step h2 { font-size: 20px; }
    .tut-progress-wrap { width: 100%; text-align: left; min-width: 0; }
    .tut-actions > .btn { flex: 1; }
    .tut-actions .tut-done { order: -1; width: 100%; margin: 0; }
    .form-actions .btn { flex: 1; }
    .modal-backdrop { align-items: flex-end; padding: 0; }
    .modal { width: 100%; border-radius: 18px 18px 0 0; max-height: 92vh; padding: 22px 18px; }
    .login-box { padding: 58px 22px 26px; border-radius: 18px; }
    .login-box h1 { font-size: 21px; }
    .toast { left: 14px; right: 14px; top: 70px; }
}

/* Watermark akun demo di preview Tampilan Layar (sama dengan layar undian) */
.preview-stage { overflow: hidden; }
.preview-stage .demo-watermark { position: absolute; inset: -40%; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 150px 140px; transform: rotate(-22deg); pointer-events: none; z-index: 40; }
.preview-stage .demo-watermark span { font-weight: 800; font-size: 44px; letter-spacing: 6px; text-transform: uppercase; white-space: nowrap; color: rgba(0, 0, 0, 0.13); }
.preview-stage .demo-ribbon { position: absolute; left: 40px; bottom: 36px; z-index: 41; background: #d93a3a; color: #fff; font-weight: 800; font-size: 22px; letter-spacing: 3px; padding: 10px 26px; border-radius: 999px; }
.demo-note { background: var(--success-50); color: #0c6b35; border: 1px solid #bfe8cf; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; text-align: left; }
