:root {
    --bg: #11161b;
    --card: #1a222a;
    --card-2: #202932;
    --line: rgba(255,255,255,0.08);
    --text: #f3f5f7;
    --muted: #aab6c3;
    --green: #8cbe26;
    --green-dark: #6e9c13;
    --danger: #ef4444;
    --success: #22c55e;
    --shadow: 0 18px 45px rgba(0,0,0,0.25);
    --radius: 24px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: linear-gradient(180deg, #0f1418 0%, #182028 100%); color: var(--text); }
body { min-height: 100vh; }

.app-shell { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 40px; }
.app-shell.narrow { width: min(760px, calc(100% - 28px)); }
.app-shell.wide { width: min(1280px, calc(100% - 32px)); }

.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.hero-card { margin-bottom: 20px; }
.center-text { text-align: center; }
.brand {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(140,190,38,0.14);
    color: #dff4af;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 12px;
}
.brand-large { font-size: 14px; padding: 10px 18px; }

h1, h2 { margin: 0 0 10px; }
p { margin: 0; color: var(--muted); line-height: 1.5; }

.grid.two-up {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stack-lg > * + * { margin-top: 16px; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
input, textarea, select {
    width: 100%;
    background: var(--card-2);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px;
    font-size: 16px;
    outline: none;
}
textarea { resize: vertical; min-height: 100px; }
input:focus, textarea:focus, select:focus { border-color: rgba(140,190,38,0.7); box-shadow: 0 0 0 4px rgba(140,190,38,0.12); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    border: 0;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    padding: 14px 22px;
    cursor: pointer;
}
.btn-primary { background: linear-gradient(180deg, var(--green), #7cab1f); color: #11161b; }
.btn-primary:hover { background: linear-gradient(180deg, #99cb30, #7cab1f); }
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--text); }
.btn-large { width: 100%; min-height: 60px; font-size: 18px; }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.top-actions { margin-top: 18px; }

.alert { padding: 14px 16px; border-radius: 16px; font-weight: 600; margin-bottom: 16px; }
.alert.error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fecaca; }
.alert.success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); color: #bbf7d0; }
.muted { color: var(--muted); }
.required { color: #dff4af; }

.location-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.location-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border-radius: 18px;
    text-decoration: none;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text);
}
.location-item span { color: var(--muted); font-size: 14px; }

.field-pickers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.field-card {
    display: block;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 16px;
}
.field-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.field-card-top input[type="checkbox"], .required-toggle input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--green); }
.field-title { font-weight: 700; }
.field-meta { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.required-toggle { display: flex; align-items: center; gap: 10px; margin: 0; }
.required-toggle span { margin-top: 1px; }

.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
th { color: #dff4af; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.table-link { color: #dff4af; text-decoration: none; font-weight: 700; }

.kiosk-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(140,190,38,0.18), transparent 32%),
        linear-gradient(180deg, #0a0f13 0%, #11161b 100%);
}
.kiosk-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}
.kiosk-panel {
    width: min(1180px, 100%);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 32px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.35);
    padding: 28px;
    backdrop-filter: blur(12px);
}
.kiosk-header { margin-bottom: 20px; }
.kiosk-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.kiosk-field.full-width { grid-column: 1 / -1; }
.kiosk-field label { font-size: 15px; margin-bottom: 10px; }
.kiosk-field input,
.kiosk-field textarea {
    min-height: 64px;
    font-size: 18px;
    border-radius: 18px;
    padding: 18px;
    background: rgba(255,255,255,0.04);
}
.kiosk-field textarea { min-height: 120px; }
.kiosk-form .btn-large { margin-top: 8px; min-height: 68px; font-size: 20px; }
#hidden-admin-trigger {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 90px;
    height: 90px;
    opacity: 0.01;
    border: 0;
    background: transparent;
    z-index: 9999;
}

@media (max-width: 860px) {
    .grid.two-up { grid-template-columns: 1fr; }
    .kiosk-grid { grid-template-columns: 1fr; }
    .kiosk-field.full-width { grid-column: auto; }
}

@media (max-width: 640px) {
    .app-shell, .app-shell.narrow, .app-shell.wide { width: calc(100% - 20px); }
    .card { padding: 18px; border-radius: 20px; }
    .button-row { flex-direction: column; }
    .btn { width: 100%; }
    .kiosk-shell { padding: 12px; }
    .kiosk-panel { padding: 18px; border-radius: 24px; }
}

.kiosk-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(140,190,38,0.12);
    color: #dff4af;
    border: 1px solid rgba(140,190,38,0.32);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.thankyou-body {
    background:
        radial-gradient(circle at top, rgba(140,190,38,0.22), transparent 28%),
        radial-gradient(circle at bottom right, rgba(255,255,255,0.08), transparent 20%),
        linear-gradient(180deg, #0a0f13 0%, #11161b 100%);
}

.thankyou-panel {
    text-align: center;
    max-width: 1120px;
}

.thankyou-mark {
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 800;
    color: #08100a;
    background: linear-gradient(180deg, #b8ef4c 0%, #8cbe26 100%);
    box-shadow: 0 12px 32px rgba(140,190,38,0.35);
}

.thankyou-copy {
    max-width: 760px;
    margin: 0 auto 24px;
}

.thankyou-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    align-items: stretch;
    margin: 30px 0 18px;
    text-align: left;
}

.qr-card,
.detail-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 20px;
}

.qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.qr-image {
    width: min(100%, 280px);
    height: auto;
    background: #fff;
    border-radius: 20px;
    padding: 14px;
}

.qr-caption {
    color: var(--muted);
    font-size: 15px;
    margin-top: 14px;
    line-height: 1.5;
}

.thankyou-details {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.thankyou-list {
    margin: 14px 0 0 20px;
    padding: 0;
    color: var(--text);
}

.thankyou-list li + li {
    margin-top: 10px;
}

.detail-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 12px;
    margin-bottom: 10px;
}

.detail-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.detail-link {
    color: #dff4af;
    text-decoration: none;
    font-weight: 700;
    word-break: break-word;
}

.thankyou-timer {
    margin-top: 24px;
    font-size: 15px;
}

@media (max-width: 860px) {
    .thankyou-grid {
        grid-template-columns: 1fr;
    }
}


.admin-two-up { align-items: start; }
.qr-preview-card { display: flex; flex-direction: column; gap: 16px; }
.qr-preview-box {
    margin: 0 auto;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}
.qr-image { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.qr-image.small { max-width: 220px; }
.qr-caption { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.thankyou-copy { max-width: 760px; margin: 10px auto 0; }
.thankyou-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 18px;
    align-items: start;
    margin-top: 28px;
}
.qr-card, .detail-card {
    padding: 20px;
    border-radius: 24px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}
.detail-card.compact { text-align: left; }
.detail-label { color: #dff4af; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.detail-value { font-weight: 700; font-size: 20px; color: var(--text); }
.detail-link { display: inline-block; margin-top: 8px; color: #dff4af; text-decoration: none; }
.left-text { text-align: left; }
.url-break { word-break: break-word; font-size: 16px; line-height: 1.5; }
.thankyou-list { margin: 0; padding-left: 20px; color: var(--muted); text-align: left; }
.thankyou-list li + li { margin-top: 10px; }
.thankyou-timer { margin-top: 24px; }
.thankyou-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 800;
    color: #11161b;
    background: linear-gradient(180deg, #b6e24e, #8cbe26);
    box-shadow: 0 18px 45px rgba(140,190,38,0.25);
}
@media (max-width: 860px) {
    .thankyou-grid { grid-template-columns: 1fr; }
}

:root {
    --brand-primary: #8CBE26;
    --brand-secondary: #DFF4AF;
    --brand-bg: #11161B;
    --brand-surface: #1A222A;
    --brand-text: #F3F5F7;
}

.admin-body {
    background: linear-gradient(180deg, #0f1418 0%, #182028 100%);
}

.kiosk-body {
    color: var(--brand-text);
    background:
        radial-gradient(circle at top, color-mix(in srgb, var(--brand-primary) 22%, transparent), transparent 32%),
        linear-gradient(180deg, color-mix(in srgb, var(--brand-bg) 92%, black) 0%, var(--brand-bg) 100%);
}

.kiosk-panel,
.themed-surface,
.qr-card,
.detail-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand-surface) 92%, white 8%), color-mix(in srgb, var(--brand-surface) 98%, black 2%));
    color: var(--brand-text);
}

.kiosk-field input,
.kiosk-field textarea {
    color: var(--brand-text);
    background: color-mix(in srgb, var(--brand-surface) 82%, white 4%);
}

.btn-primary {
    background: linear-gradient(180deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 80%, black));
    color: #101418;
}

.btn-primary:hover {
    background: linear-gradient(180deg, color-mix(in srgb, var(--brand-primary) 88%, white 12%), color-mix(in srgb, var(--brand-primary) 80%, black));
}

.brand,
.kiosk-badge,
.preview-badge {
    background: color-mix(in srgb, var(--brand-primary) 15%, transparent);
    color: var(--brand-secondary);
    border-color: color-mix(in srgb, var(--brand-primary) 35%, transparent);
}

.required,
.table-link,
th { color: var(--brand-secondary); }

.kiosk-logo,
.preview-logo,
.logo-thumb {
    display: block;
    max-width: 280px;
    max-height: 90px;
    width: auto;
    height: auto;
    margin: 0 auto 16px;
    object-fit: contain;
}

.thankyou-logo {
    max-height: 84px;
    margin-bottom: 18px;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.color-grid input[type="color"] {
    min-height: 56px;
    padding: 6px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--green);
}

.upload-help {
    margin-top: 8px;
    font-size: 13px;
}

.kiosk-preview-shell {
    min-height: 100%;
    border-radius: 28px;
    padding: 28px;
    border: 1px solid rgba(255,255,255,0.08);
}

.preview-swatch-row {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.swatch {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.1);
}

.swatch-outline {
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
}

.preview-detail {
    margin-top: 22px;
}


.kiosk-logo-large,
.preview-logo-large {
    max-width: 460px;
    max-height: 150px;
    margin-bottom: 20px;
}

.thankyou-logo {
    max-width: 420px;
    max-height: 132px;
}

.kiosk-logo-placeholder {
    width: min(460px, 100%);
    min-height: 132px;
    margin: 0 auto 20px;
    padding: 24px;
    border-radius: 28px;
    border: 1px dashed color-mix(in srgb, var(--brand-primary) 42%, rgba(255,255,255,0.2));
    background: color-mix(in srgb, var(--brand-surface) 88%, white 6%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.thankyou-logo-placeholder {
    max-width: 420px;
}

.placeholder-mark {
    font-size: 32px;
    font-weight: 800;
    color: var(--brand-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.placeholder-subtitle {
    color: var(--muted);
    font-size: 14px;
}
