:root {
    --navy-950: #061426;
    --navy-900: #0a1d35;
    --navy-800: #103158;
    --blue-700: #0369a1;
    --blue-600: #0284c7;
    --blue-500: #0ea5e9;
    --sky-100: #e0f2fe;
    --gold-600: #b88716;
    --gold-500: #d3a62f;
    --gold-300: #f0d57c;
    --green-600: #16835f;
    --red-600: #c43d4c;
    --amber-600: #b7791f;
    --purple-600: #7454c9;
    --ink: #172033;
    --muted: #68738a;
    --line: #dfe5ee;
    --paper: #ffffff;
    --surface: #f4f7fb;
    --shadow-sm: 0 8px 20px rgba(9, 30, 66, .08);
    --shadow: 0 18px 55px rgba(9, 30, 66, .14);
    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

/* shared */
.container { width: min(1160px, calc(100% - 36px)); margin-inline: auto; }
.page-section { padding: 38px 0 64px; }
.eyebrow {
    margin: 0 0 10px;
    font-size: .73rem;
    font-weight: 850;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold-500);
}
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wrap { flex-wrap: wrap; }
.divider { position: relative; margin: 7px 0; text-align: center; color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.divider::before { content: ""; position: absolute; inset: 50% 0 auto; height: 1px; background: var(--line); }
.divider span { position: relative; padding: 0 12px; background: var(--paper); }

.card {
    background: var(--paper);
    border: 1px solid rgba(210, 220, 232, .9);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-pad { padding: 24px; }
.card-title { margin: 0; font-size: 1.08rem; }
.card-subtitle { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }

.btn {
    appearance: none;
    border: 0;
    border-radius: 11px;
    min-height: 42px;
    padding: 10px 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-weight: 780;
    line-height: 1;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); box-shadow: 0 10px 24px rgba(2, 132, 199, .25); }
.btn-secondary { color: var(--navy-900); background: #eaf2f9; }
.btn-dark { color: #fff; background: var(--navy-900); }
.btn-gold { color: var(--navy-950); background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); box-shadow: 0 10px 24px rgba(211, 166, 47, .2); }
.btn-danger { color: #fff; background: var(--red-600); }
.btn-ghost { color: var(--navy-800); background: transparent; border: 1px solid var(--line); }
.btn-sm { min-height: 34px; padding: 7px 11px; font-size: .83rem; border-radius: 9px; }
.btn-lg { min-height: 52px; padding: 14px 24px; font-size: 1rem; }
.btn-block { width: 100%; }
.icon-button { width: 40px; height: 40px; padding: 0; border-radius: 11px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; }

.alert { padding: 13px 15px; margin: 0 0 18px; border-radius: 11px; border: 1px solid; font-size: .92rem; }
.alert-success { color: #0b6548; background: #eaf9f3; border-color: #b8e7d6; }
.alert-danger { color: #9d2735; background: #fff0f2; border-color: #f3c5cb; }
.alert-warning { color: #82500a; background: #fff7e6; border-color: #f1d9a7; }
.alert-info { color: #075d88; background: #edf8ff; border-color: #bce4f8; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: .73rem; font-weight: 820; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.badge-warning { color: #9b620a; background: #fff4d6; }
.badge-info { color: #0874a7; background: #e5f6fe; }
.badge-success { color: #157558; background: #e8f8f1; }
.badge-danger { color: #ad3040; background: #ffecef; }
.badge-purple { color: #6546b5; background: #f0ebff; }
.badge-muted { color: #68738a; background: #eef1f5; }
.badge-gold { color: #805b0a; background: #fff6d9; }

.field { display: grid; gap: 7px; }
.field label { color: #34415a; font-size: .84rem; font-weight: 760; }
.field label .required { color: var(--red-600); }
.field small { color: var(--muted); font-size: .78rem; }
.field input, .field select, .field textarea,
.filter-bar input, .filter-bar select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cfd8e5;
    border-radius: 10px;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { min-height: 106px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus,
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(14, 165, 233, .12); }
.field input[readonly] { background: #f5f7fa; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: span 2; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.check-row input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--blue-600); }

/* public site */
.public-body { min-height: 100vh; background: radial-gradient(circle at 5% 0%, #dff4ff 0, transparent 28%), radial-gradient(circle at 95% 15%, #fff4ce 0, transparent 22%), var(--surface); }
.public-header { position: relative; z-index: 20; padding: 18px 0; }
.public-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-logo-wrap { width: 52px; height: 58px; padding: 4px; border-radius: 14px; background: #fff; box-shadow: 0 8px 25px rgba(9, 30, 66, .12); overflow: hidden; display: grid; place-items: center; }
.brand-logo-wrap img { height: 50px; width: auto; object-fit: contain; }
.brand-copy strong { display: block; color: var(--navy-900); line-height: 1.2; }
.brand-copy span { display: block; color: var(--muted); font-size: .76rem; }
.public-nav-actions { display: flex; align-items: center; gap: 10px; }

.hero { padding: 40px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-copy h1 { margin: 0; max-width: 750px; font-size: clamp(2.5rem, 5.4vw, 5rem); line-height: .98; letter-spacing: -.052em; color: var(--navy-950); }
.hero-copy h1 span { color: transparent; background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); background-clip: text; -webkit-background-clip: text; }
.hero-copy > p:not(.eyebrow) { max-width: 680px; margin: 22px 0 0; color: #536078; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 16px 24px; margin-top: 28px; color: #4c5971; font-size: .84rem; font-weight: 680; }
.hero-trust span { display: flex; align-items: center; gap: 7px; }
.hero-trust span::before { content: "✓"; color: var(--green-600); font-weight: 900; }
.hero-panel { position: relative; }
.hero-panel::before { content: ""; position: absolute; inset: -22px; border-radius: 42px; background: linear-gradient(140deg, rgba(14,165,233,.16), rgba(211,166,47,.16)); filter: blur(2px); transform: rotate(-2deg); }
.kiosk-card { position: relative; overflow: hidden; padding: 26px; color: #fff; background: linear-gradient(150deg, var(--navy-950), #0d3760 65%, #075b86); border: 1px solid rgba(255,255,255,.14); border-radius: 30px; box-shadow: 0 28px 70px rgba(6, 20, 38, .3); }
.kiosk-card::after { content: ""; position: absolute; width: 220px; height: 220px; right: -90px; top: -90px; border-radius: 50%; border: 40px solid rgba(240,213,124,.14); }
.kiosk-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kiosk-logo { width: 78px; height: 92px; padding: 7px; border-radius: 19px; background: #fff; object-fit: contain; }
.clock-box { text-align: right; }
.clock-box strong { display: block; font-size: 2rem; letter-spacing: -.03em; }
.clock-box span { color: #bed5e8; font-size: .78rem; }
.kiosk-card h2 { position: relative; z-index: 1; margin: 28px 0 8px; font-size: 1.55rem; }
.kiosk-card > p { position: relative; z-index: 1; margin: 0; color: #c5d8e8; }
.kiosk-menu { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.kiosk-action { min-height: 105px; padding: 17px; border-radius: 16px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.13); display: flex; flex-direction: column; justify-content: space-between; }
.kiosk-action strong { font-size: .96rem; }
.kiosk-action span { color: #bad0e1; font-size: .76rem; }
.kiosk-action.primary { color: var(--navy-950); background: linear-gradient(135deg, #fff0ac, var(--gold-500)); border-color: transparent; }
.kiosk-action.primary span { color: #74540d; }
.kiosk-stat { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; margin-top: 17px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.13); color: #c6d8e7; font-size: .79rem; }
.kiosk-stat strong { color: #fff; }

.feature-strip { padding: 0 0 64px; }
.feature-strip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.feature-item { padding: 22px; border-right: 1px solid var(--line); }
.feature-item:last-child { border-right: 0; }
.feature-icon { width: 39px; height: 39px; margin-bottom: 13px; border-radius: 11px; display: grid; place-items: center; color: var(--blue-700); background: var(--sky-100); font-weight: 900; }
.feature-item strong { display: block; font-size: .95rem; }
.feature-item p { margin: 6px 0 0; color: var(--muted); font-size: .82rem; }

.public-footer { padding: 24px 0 30px; color: var(--muted); font-size: .79rem; }
.public-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 22px; border-top: 1px solid var(--line); }

.form-page { padding: 24px 0 62px; }
.form-shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.form-aside { position: sticky; top: 18px; overflow: hidden; color: #fff; background: linear-gradient(160deg, var(--navy-950), #0a4871); border-radius: 24px; box-shadow: var(--shadow); }
.form-aside-top { padding: 25px; }
.form-aside-logo { width: 66px; height: 78px; padding: 6px; border-radius: 17px; background: #fff; object-fit: contain; }
.form-aside h2 { margin: 18px 0 8px; font-size: 1.36rem; line-height: 1.25; }
.form-aside p { margin: 0; color: #c5dae9; font-size: .86rem; }
.progress-list { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.progress-item { display: flex; align-items: center; gap: 12px; color: #a9c3d7; font-size: .82rem; font-weight: 700; }
.progress-dot { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); font-size: .72rem; }
.progress-item.active { color: #fff; }
.progress-item.active .progress-dot { color: var(--navy-950); background: var(--gold-300); border-color: var(--gold-300); }
.form-aside-help { padding: 18px 25px; border-top: 1px solid rgba(255,255,255,.12); color: #bcd0df; font-size: .77rem; }
.form-card { padding: 30px; }
.section-heading { margin-bottom: 22px; }
.section-heading .step-pill { display: inline-flex; margin-bottom: 10px; padding: 5px 9px; border-radius: 99px; color: var(--blue-700); background: var(--sky-100); font-size: .7rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.section-heading h1, .section-heading h2 { margin: 0; color: var(--navy-950); line-height: 1.15; }
.section-heading h1 { font-size: 1.9rem; }
.section-heading h2 { font-size: 1.52rem; }
.section-heading p { margin: 8px 0 0; color: var(--muted); }
.form-step { display: none; }
.form-step.active { display: block; animation: fadeSlide .25s ease; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.type-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-option span { min-height: 68px; display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; border: 1px solid #d4dce7; border-radius: 12px; color: #4d5a70; background: #fff; font-size: .81rem; font-weight: 740; transition: all .16s ease; }
.type-option input:checked + span { color: var(--blue-700); border-color: var(--blue-500); background: #edf9ff; box-shadow: inset 0 0 0 1px var(--blue-500); }
.upload-box { position: relative; min-height: 175px; display: grid; place-items: center; padding: 20px; text-align: center; overflow: hidden; border: 1.5px dashed #b8c7d7; border-radius: 14px; background: #f8fbfe; }
.upload-box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-preview { width: 100%; max-height: 250px; object-fit: contain; border-radius: 10px; }
.signature-wrap { padding: 11px; border: 1px solid #cfd8e5; border-radius: 12px; background: #fff; }
.signature-canvas { width: 100%; height: 160px; display: block; border-radius: 8px; background: #f9fbfd; touch-action: none; }
.signature-toolbar { display: flex; justify-content: flex-end; margin-top: 9px; }
.delivery-panel { margin-top: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #f9fbfd; }

.success-page { min-height: calc(100vh - 90px); display: grid; place-items: center; padding: 30px 0 60px; }
.success-card { width: min(670px, calc(100% - 34px)); overflow: hidden; text-align: center; }
.success-top { padding: 35px 30px 26px; color: #fff; background: linear-gradient(145deg, var(--navy-950), #075b86); }
.success-mark { width: 72px; height: 72px; margin: 0 auto 17px; border-radius: 50%; display: grid; place-items: center; color: var(--navy-950); background: linear-gradient(135deg, #fff1af, var(--gold-500)); font-size: 2rem; font-weight: 900; box-shadow: 0 13px 30px rgba(0,0,0,.18); }
.success-top h1 { margin: 0; }
.success-top p { margin: 8px 0 0; color: #c7dbe9; }
.visit-code { display: inline-block; margin-top: 19px; padding: 10px 16px; border: 1px solid rgba(255,255,255,.2); border-radius: 11px; background: rgba(255,255,255,.1); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 850; letter-spacing: .06em; }
.success-body { padding: 27px 30px 31px; }
.info-list { display: grid; gap: 0; margin: 0; text-align: left; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.info-row { display: grid; grid-template-columns: 145px 1fr; gap: 15px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row dt { color: var(--muted); font-size: .81rem; }
.info-row dd { margin: 0; font-weight: 700; font-size: .88rem; }

/* install */
.install-body { min-height: 100vh; background: linear-gradient(120deg, var(--navy-950) 0 42%, #eef5fa 42%); }
.install-shell { min-height: 100vh; width: min(1180px, calc(100% - 40px)); margin: auto; display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 70px; padding: 45px 0; }
.install-brand { position: relative; color: #fff; }
.install-brand h1 { margin: 0; font-size: clamp(2.6rem, 5vw, 4.5rem); line-height: .98; letter-spacing: -.05em; }
.install-brand > p:not(.eyebrow) { max-width: 490px; color: #bcd1e2; font-size: 1rem; }
.install-logo { width: 88px; height: 108px; padding: 7px; margin-bottom: 24px; object-fit: contain; border-radius: 20px; background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.brand-glow { position: absolute; width: 350px; height: 350px; left: -190px; top: -130px; border-radius: 50%; background: rgba(14,165,233,.22); filter: blur(45px); pointer-events: none; }
.feature-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 27px; }
.feature-mini-grid span { padding: 10px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.06); color: #d4e3ee; font-size: .8rem; }
.install-card { padding: 31px; background: #fff; border-radius: 25px; box-shadow: var(--shadow); }

/* auth */
.auth-body { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(440px, .95fr); background: #fff; }
.auth-visual { position: relative; overflow: hidden; padding: 50px; color: #fff; background: linear-gradient(150deg, var(--navy-950), #0c416b 70%, #0879a9); display: flex; flex-direction: column; justify-content: space-between; }
.auth-visual::before { content: ""; position: absolute; width: 480px; height: 480px; left: -190px; bottom: -220px; border: 90px solid rgba(240,213,124,.14); border-radius: 50%; }
.auth-brand { position: relative; z-index: 1; }
.auth-brand img { width: 72px; height: 87px; padding: 6px; border-radius: 17px; background: #fff; object-fit: contain; }
.auth-quote { position: relative; z-index: 1; max-width: 570px; }
.auth-quote h1 { margin: 0; font-size: clamp(2.5rem, 4.8vw, 4.8rem); line-height: .98; letter-spacing: -.05em; }
.auth-quote p { max-width: 500px; color: #c2d7e6; }
.auth-form-side { display: grid; place-items: center; padding: 35px; background: #f8fafc; }
.auth-card { width: min(440px, 100%); padding: 32px; }

/* admin */
.admin-body { min-height: 100vh; background: #f3f6fa; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: 260px; overflow-y: auto; color: #d8e7f2; background: linear-gradient(180deg, var(--navy-950), #0b2c4c); border-right: 1px solid rgba(255,255,255,.08); }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 22px 19px; border-bottom: 1px solid rgba(255,255,255,.09); }
.sidebar-brand img { width: 43px; height: 51px; padding: 4px; border-radius: 11px; background: #fff; object-fit: contain; }
.sidebar-brand strong { display: block; color: #fff; line-height: 1.15; font-size: .88rem; }
.sidebar-brand span { display: block; color: #94aec2; font-size: .67rem; }
.sidebar-menu { padding: 16px 12px 90px; }
.sidebar-label { margin: 16px 9px 7px; color: #7895aa; font-size: .64rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-link { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 10px 11px; margin-bottom: 4px; border-radius: 10px; color: #bcd0df; font-size: .84rem; font-weight: 680; }
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-link.active { color: var(--navy-950); background: linear-gradient(135deg, #fff0af, var(--gold-500)); box-shadow: 0 10px 25px rgba(0,0,0,.16); }
.sidebar-icon { width: 23px; text-align: center; font-size: 1rem; }
.sidebar-footer { position: fixed; left: 0; bottom: 0; width: 260px; padding: 13px 15px; background: rgba(5,20,37,.94); border-top: 1px solid rgba(255,255,255,.09); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 35px; height: 35px; flex: 0 0 35px; border-radius: 11px; display: grid; place-items: center; color: var(--navy-950); background: var(--gold-300); font-weight: 900; }
.sidebar-user strong { display: block; color: #fff; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.sidebar-user span { display: block; color: #8ea8bb; font-size: .66rem; }
.admin-main { grid-column: 2; min-width: 0; }
.admin-topbar { position: sticky; top: 0; z-index: 30; min-height: 68px; padding: 0 26px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: rgba(255,255,255,.91); backdrop-filter: blur(12px); border-bottom: 1px solid #e3e8ef; }
.mobile-menu-button { display: none; }
.topbar-title strong { display: block; color: var(--navy-950); }
.topbar-title span { display: block; color: var(--muted); font-size: .74rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.admin-content { width: min(1500px, 100%); padding: 27px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-heading h1 { margin: 0; color: var(--navy-950); font-size: 1.7rem; line-height: 1.15; }
.page-heading p { margin: 6px 0 0; color: var(--muted); font-size: .87rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.stat-card { position: relative; overflow: hidden; padding: 20px; }
.stat-card::after { content: ""; position: absolute; right: -24px; top: -29px; width: 92px; height: 92px; border-radius: 50%; background: rgba(14,165,233,.08); }
.stat-label { color: var(--muted); font-size: .78rem; font-weight: 700; }
.stat-value { margin: 7px 0 2px; color: var(--navy-950); font-size: 2rem; font-weight: 880; letter-spacing: -.04em; }
.stat-note { color: var(--muted); font-size: .71rem; }
.stat-icon { position: absolute; right: 17px; bottom: 17px; color: var(--blue-600); font-size: 1.35rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); gap: 16px; margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 19px 20px 14px; }
.panel-head h2 { margin: 0; font-size: 1rem; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: .76rem; }
.panel-body { padding: 0 20px 20px; }
.quick-list { display: grid; gap: 10px; }
.quick-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
.quick-item strong { font-size: .85rem; }
.quick-item span { color: var(--muted); font-size: .75rem; }

.filter-card { margin-bottom: 16px; padding: 15px; }
.filter-bar { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(150px, .7fr)) auto; gap: 10px; align-items: end; }
.filter-item { display: grid; gap: 5px; }
.filter-item label { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 14px; text-align: left; color: #6a7589; background: #f8fafc; border-bottom: 1px solid var(--line); font-size: .69rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid #edf0f4; font-size: .82rem; vertical-align: middle; }
tbody tr:hover { background: #fafcff; }
tbody tr:last-child td { border-bottom: 0; }
.table-primary { font-weight: 760; color: var(--navy-900); }
.table-secondary { display: block; margin-top: 2px; color: var(--muted); font-size: .72rem; }
.table-actions { display: flex; justify-content: flex-end; gap: 6px; }
.empty-state { padding: 48px 25px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--navy-900); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 17px; border-top: 1px solid var(--line); }
.page-links { display: flex; gap: 5px; }
.page-link { min-width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: .78rem; }
.page-link.active { color: #fff; background: var(--blue-700); border-color: var(--blue-700); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 17px; align-items: start; }
.detail-section { padding: 21px; }
.detail-section + .detail-section { margin-top: 16px; }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.detail-heading h2 { margin: 0; font-size: 1rem; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.detail-item { padding: 13px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-item:nth-child(2n) { border-right: 0; }
.detail-item:nth-last-child(-n+2) { border-bottom: 0; }
.detail-item.full { grid-column: span 2; border-right: 0; }
.detail-item.full:last-child { border-bottom: 0; }
.detail-label { color: var(--muted); font-size: .7rem; font-weight: 780; text-transform: uppercase; letter-spacing: .05em; }
.detail-value { margin-top: 4px; font-size: .86rem; font-weight: 680; overflow-wrap: anywhere; }
.photo-frame { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #edf1f5; }
.photo-frame img { display: block; width: 100%; max-height: 390px; object-fit: contain; }
.timeline { position: relative; display: grid; gap: 16px; padding-left: 17px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 7px; bottom: 8px; width: 2px; background: #dbe3ec; }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; left: -17px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue-500); box-shadow: 0 0 0 4px #e8f7fe; }
.timeline-item strong { display: block; font-size: .81rem; }
.timeline-item span { display: block; color: var(--muted); font-size: .72rem; }
.timeline-item p { margin: 5px 0 0; font-size: .79rem; }
.disposition-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.disposition-card + .disposition-card { margin-top: 10px; }
.priority-high { border-left: 4px solid var(--red-600); }
.priority-normal { border-left: 4px solid var(--blue-500); }
.priority-low { border-left: 4px solid #7c8799; }

.settings-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 17px; }
.settings-nav { padding: 10px; }
.settings-nav a { display: block; padding: 10px 12px; border-radius: 9px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.settings-nav a.active { color: var(--blue-700); background: var(--sky-100); }

/* preview mockup */
.preview-ribbon { position: fixed; right: -48px; top: 28px; z-index: 99; width: 190px; padding: 7px; transform: rotate(37deg); text-align: center; color: var(--navy-950); background: var(--gold-300); font-size: .68rem; font-weight: 900; letter-spacing: .1em; }

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-bar { grid-template-columns: 1.4fr repeat(2, minmax(140px, .7fr)); }
    .filter-bar .filter-item:nth-child(4) { grid-column: span 2; }
    .feature-strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-item:nth-child(2) { border-right: 0; }
    .feature-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-panel { width: min(600px, 100%); margin: 0 auto; }
    .form-shell { grid-template-columns: 1fr; }
    .form-aside { position: static; }
    .progress-list { grid-template-columns: repeat(4, 1fr); gap: 7px; }
    .progress-item { flex-direction: column; text-align: center; font-size: .69rem; }
    .form-aside-help { display: none; }
    .install-body { background: linear-gradient(180deg, var(--navy-950) 0 34%, #eef5fa 34%); }
    .install-shell { grid-template-columns: 1fr; gap: 35px; }
    .install-brand { text-align: center; }
    .install-brand > p:not(.eyebrow) { margin-inline: auto; }
    .feature-mini-grid { width: min(460px, 100%); margin-inline: auto; }
    .auth-body { grid-template-columns: 1fr; }
    .auth-visual { min-height: 360px; }
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
    .sidebar.open { transform: translateX(0); }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-main { grid-column: 1; }
    .admin-topbar { padding: 0 18px; }
    .mobile-menu-button { display: grid; }
    .admin-content { padding: 20px 16px; }
    .detail-grid, .dashboard-grid, .settings-grid { grid-template-columns: 1fr; }
    .sidebar-footer { transform: translateX(-100%); transition: transform .22s ease; }
    .sidebar.open + .sidebar-footer { transform: translateX(0); }
}

@media (max-width: 680px) {
    .container { width: min(100% - 24px, 1160px); }
    .public-nav-actions .btn-ghost { display: none; }
    .brand-copy span { display: none; }
    .hero { padding-top: 18px; }
    .hero-copy h1 { font-size: clamp(2.35rem, 13vw, 4rem); }
    .hero-actions .btn { width: 100%; }
    .kiosk-menu { grid-template-columns: 1fr; }
    .feature-strip-grid, .stats-grid { grid-template-columns: 1fr; }
    .feature-item { border-right: 0; border-bottom: 1px solid var(--line); }
    .feature-item:last-child { border-bottom: 0; }
    .public-footer-inner { flex-direction: column; align-items: flex-start; }
    .form-card { padding: 20px 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
    .type-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
    .progress-list { overflow-x: auto; grid-template-columns: repeat(4, minmax(95px, 1fr)); }
    .info-row { grid-template-columns: 1fr; gap: 3px; }
    .success-top, .success-body { padding-inline: 19px; }
    .install-shell { width: min(100% - 24px, 1180px); padding: 24px 0; }
    .install-card { padding: 21px 16px; }
    .auth-visual { padding: 30px 24px; min-height: 310px; }
    .auth-form-side { padding: 20px 12px; }
    .auth-card { padding: 23px 18px; }
    .page-heading { flex-direction: column; align-items: flex-start; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .filter-bar { grid-template-columns: 1fr; }
    .filter-bar .filter-item:nth-child(4) { grid-column: auto; }
    .filter-bar .btn { width: 100%; }
    .detail-list { grid-template-columns: 1fr; }
    .detail-item, .detail-item:nth-child(2n), .detail-item.full { grid-column: span 1; border-right: 0; border-bottom: 1px solid var(--line); }
    .detail-item:last-child { border-bottom: 0; }
    .pagination { flex-direction: column; align-items: flex-start; }
}

@media print {
    .no-print, .sidebar, .sidebar-footer, .admin-topbar, .public-header, .public-footer, .page-actions, .filter-card, .table-actions { display: none !important; }
    body, .admin-body, .public-body { background: #fff !important; }
    .admin-shell, .admin-main { display: block; }
    .admin-content { width: 100%; padding: 0; }
    .card, .table-card { box-shadow: none; border: 1px solid #999; }
    .page-heading { margin-bottom: 15px; }
    table { font-size: 9pt; }
    th, td { padding: 6px 7px; }
    @page { size: A4 landscape; margin: 12mm; }
}

/* V4: portal tamu tanpa password + login NIP */
.portal-hero { padding-top: 26px; }
.portal-access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 30px; }
.portal-access-card {
    position: relative;
    min-height: 176px;
    padding: 20px;
    overflow: hidden;
    border-radius: 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: end;
    gap: 14px;
    border: 1px solid rgba(255,255,255,.25);
    box-shadow: 0 17px 42px rgba(9,30,66,.16);
    transition: transform .2s ease, box-shadow .2s ease;
}
.portal-access-card:hover { transform: translateY(-4px); box-shadow: 0 23px 55px rgba(9,30,66,.22); }
.portal-access-card::after { content: ""; position: absolute; width: 150px; height: 150px; right: -70px; top: -68px; border-radius: 50%; border: 30px solid rgba(255,255,255,.11); }
.portal-access-guest { color: var(--navy-950); background: linear-gradient(145deg, #fff5c5, #e8bc42 72%, #c38b12); }
.portal-access-staff { color: #fff; background: linear-gradient(145deg, var(--navy-950), #0b4773 72%, #087fae); }
.portal-access-number { align-self: start; position: relative; z-index: 1; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font-size: .72rem; font-weight: 900; background: rgba(255,255,255,.5); }
.portal-access-staff .portal-access-number { background: rgba(255,255,255,.12); }
.portal-access-copy { position: relative; z-index: 1; display: grid; gap: 4px; }
.portal-access-copy small { opacity: .72; font-size: .68rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.portal-access-copy strong { font-size: 1.38rem; letter-spacing: -.02em; }
.portal-access-copy > span { opacity: .8; font-size: .76rem; line-height: 1.4; }
.portal-access-arrow { position: relative; z-index: 1; align-self: center; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.44); font-size: 1.25rem; font-weight: 900; }
.portal-access-staff .portal-access-arrow { background: rgba(255,255,255,.12); }
.hero-utility-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.portal-kiosk { padding: 29px; }
.kiosk-overline { margin-top: 26px !important; color: var(--gold-300) !important; font-size: .67rem !important; font-weight: 900; letter-spacing: .2em; }
.portal-kiosk h2 { margin-top: 7px; font-size: 2rem; letter-spacing: -.03em; }
.kiosk-guest-button { position: relative; z-index: 1; margin-top: 25px; min-height: 92px; padding: 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; color: var(--navy-950); background: linear-gradient(135deg, #fff5c4, #e8bc42); border-radius: 18px; box-shadow: 0 15px 35px rgba(0,0,0,.18); }
.kiosk-guest-button:hover { transform: translateY(-2px); }
.kiosk-guest-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: #fff; background: var(--navy-950); font-size: 1.25rem; font-weight: 900; }
.kiosk-guest-button strong { display: block; font-size: 1rem; }
.kiosk-guest-button small { display: block; margin-top: 4px; color: #76520a; font-size: .73rem; }
.kiosk-guest-button b { font-size: 1.5rem; }
.kiosk-menu-compact { grid-template-columns: repeat(3, 1fr); }
.kiosk-menu-compact .kiosk-action { min-height: 92px; }

.auth-portal-body .auth-visual { background: radial-gradient(circle at 78% 15%, rgba(240,213,124,.18), transparent 24%), linear-gradient(145deg, var(--navy-950), #0b3b62 66%, #087ca9); }
.auth-kicker { margin: 0 0 12px !important; color: var(--gold-300) !important; font-size: .68rem !important; font-weight: 900; letter-spacing: .22em; }
.auth-security-note { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: #bcd1df; font-size: .77rem; }
.auth-security-note span { color: #65d8ae; }
.auth-portal-card { width: min(480px, 100%); }
.guest-entry-card { position: relative; min-height: 112px; padding: 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; overflow: hidden; color: var(--navy-950); border-radius: 18px; background: linear-gradient(135deg, #fff8d8, #ecc85d); box-shadow: 0 16px 36px rgba(184,135,22,.24); transition: transform .18s ease, box-shadow .18s ease; }
.guest-entry-card:hover { transform: translateY(-2px); box-shadow: 0 20px 42px rgba(184,135,22,.3); }
.guest-entry-card::after { content: ""; position: absolute; width: 110px; height: 110px; right: -48px; top: -55px; border-radius: 50%; border: 22px solid rgba(255,255,255,.35); }
.guest-entry-icon { position: relative; z-index: 1; width: 55px; height: 55px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--navy-950), #0b4773); border-radius: 17px; font-size: 1.35rem; font-weight: 900; box-shadow: 0 10px 25px rgba(6,20,38,.24); }
.guest-entry-copy { position: relative; z-index: 1; display: grid; gap: 2px; }
.guest-entry-copy small { color: #76520a; font-size: .66rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.guest-entry-copy strong { font-size: 1.16rem; }
.guest-entry-copy span { color: #6f581b; font-size: .75rem; }
.guest-entry-arrow { position: relative; z-index: 1; font-size: 1.5rem; font-weight: 900; }
.auth-divider { margin: 22px 0; }
.auth-back-link { display: block; margin-top: 20px; text-align: center; color: var(--muted); font-size: .79rem; font-weight: 700; }
.auth-back-link:hover { color: var(--blue-700); }

@media (max-width: 1100px) {
    .portal-access-grid { grid-template-columns: 1fr; }
    .portal-access-card { min-height: 145px; }
    .kiosk-menu-compact { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .portal-access-grid { margin-top: 23px; }
    .portal-access-card { min-height: 132px; padding: 16px; }
    .portal-access-copy strong { font-size: 1.18rem; }
    .hero-utility-actions .btn { width: 100%; }
    .portal-kiosk { padding: 22px 17px; }
    .kiosk-guest-button { min-height: 84px; }
    .auth-security-note { display: none; }
}
