/**
 * Bambina Events — Identidad visual
 * Manual mayo 2026: Newspaper, Business Gold, Cheer, Matte Blue, Dark Oak
 */
:root {
    color-scheme: light;
    --newspaper: #f6f1e9;
    --business-gold: #69652a;
    --business-gold-hover: #4f4b28;
    --dark-oak: #642b1b;
    --cheer: #dcd289;
    --matte-blue: #a3b1c3;
    --olive: #84835d;
    --gold-light: #DCD289;

    --bg: var(--newspaper);
    --panel: #ffffff;
    --card: #ffffff;
    --text: #3d3a32;
    --muted: #7a7568;
    --border: rgba(105, 101, 42, .16);
    --primary: var(--business-gold);
    --primary-hover: var(--business-gold-hover);
    --accent: var(--cheer);
    --accent-soft: rgba(220, 210, 137, .28);
    --danger-bg: #fff5f4;
    --danger-text: var(--dark-oak);
    --success-bg: #f4faf4;
    --success-text: #3d5a32;
    --shadow: 0 16px 48px rgba(100, 43, 27, .07), 0 4px 16px rgba(105, 101, 42, .06);
    --radius: 18px;
    --header-h: 64px;
    --subnav-h: 46px;
    --font: Montserrat, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
    background: var(--newspaper);
    color-scheme: only light;
}

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 450;
    color: var(--text);
    background:
        radial-gradient(ellipse 920px 520px at 0% 0%, rgba(163, 177, 195, .18), transparent 58%),
        radial-gradient(ellipse 800px 480px at 100% 8%, rgba(220, 210, 137, .22), transparent 55%),
        var(--bg);
}

input, select, textarea, button {
    color-scheme: only light;
    font-family: inherit;
}

a { color: var(--primary); }

/* ——— Admin shell ——— */
.app {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.app-top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    box-shadow: 0 4px 24px rgba(105, 101, 42, .07);
}

.app-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.app-header::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--business-gold), var(--cheer), var(--matte-blue));
}

.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--header-h);
    padding-top: 10px;
    padding-bottom: 10px;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 0;
    color: inherit;
}

.brand-wordmark {
    display: block;
    width: auto;
    height: 36px;
    max-height: 36px;
    max-width: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.app-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.app-brand-text strong {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--primary);
    line-height: 1.1;
}

.app-brand-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--business-gold);
    white-space: nowrap;
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.subnav {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.subnav-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    padding-top: 8px;
    padding-bottom: 8px;
}

.subnav-inner::-webkit-scrollbar { height: 4px; }
.subnav-inner::-webkit-scrollbar-thumb {
    background: rgba(105, 101, 42, .25);
    border-radius: 999px;
}

.subnav-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--muted);
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}

.subnav-link:hover {
    background: rgba(246, 241, 233, .95);
    color: var(--text);
}

.subnav-link.active {
    background: rgba(105, 101, 42, .1);
    border-color: rgba(105, 101, 42, .22);
    color: var(--primary);
}

.ico {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 15px;
    background: rgba(220, 210, 137, .22);
    border: 1px solid rgba(220, 210, 137, .35);
    flex: 0 0 auto;
}

.ico.blue {
    background: rgba(163, 177, 195, .2);
    border-color: rgba(163, 177, 195, .32);
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    background: #fff;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    transition: background .12s ease, transform .08s ease;
}

.btn:hover { background: var(--primary-hover); }
.btn:active { transform: translateY(1px); }

.btn-sm {
    padding: 8px 12px;
    font-size: 11px;
}

.ghost {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 12px;
    border: 1px solid rgba(105, 101, 42, .22);
    background: rgba(246, 241, 233, .8);
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 12px;
}

.ghost:hover { background: rgba(220, 210, 137, .25); }

.content {
    flex: 1;
    padding: 22px 20px 32px;
    min-width: 0;
    width: 100%;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.app-header .container,
.subnav .container,
.content-inner {
    padding-left: 20px;
    padding-right: 20px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.topbar h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--primary);
}

.topbar p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.topbar .right {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card .hd {
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--newspaper), #fff);
}

.card .bd { padding: 20px; }

.card .hd h2 {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--primary);
}

.card .bd p {
    font-weight: 400;
    color: var(--muted);
}

.section-kicker {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--primary);
}

/* Forms & tables (admin pages) */
.field { margin-bottom: 14px; }

.field label,
label.field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="tel"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 11px 13px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: #fff;
    color: var(--text);
    transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--matte-blue);
    border: 0;
}

table.data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(105, 101, 42, .1);
    vertical-align: top;
}

table.data-table tr:hover td {
    background: rgba(246, 241, 233, .45);
}

.alert {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}

.alert-error {
    background: var(--danger-bg);
    border-color: rgba(100, 43, 27, .18);
    color: var(--danger-text);
}

.alert-success {
    background: var(--success-bg);
    border-color: rgba(61, 90, 50, .18);
    color: var(--success-text);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(220, 210, 137, .45);
    background: rgba(220, 210, 137, .2);
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
}

/* Botones primarios en páginas con estilos propios */
.cot-btn-primary,
.cli-btn-primary,
.evd-btn.primary,
.edl-btn.primary,
.events-btn.primary,
.htf-btn.primary,
.htf-save-menu-btn,
.btn-primary-gradient {
    background: var(--primary) !important;
    color: #fff !important;
    border: 1px solid rgba(105, 101, 42, .28) !important;
    box-shadow: 0 6px 18px rgba(105, 101, 42, .18) !important;
}

.cot-btn-primary:hover,
.cli-btn-primary:hover,
.evd-btn.primary:hover,
.edl-btn.primary:hover,
.events-btn.primary:hover,
.htf-btn.primary:hover,
.htf-save-menu-btn:hover,
.btn-primary-gradient:hover {
    background: var(--primary-hover) !important;
}

/* Calendar */
.cal-wrap { margin-top: 14px; }

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.cal-title { font-size: 16px; font-weight: 700; margin: 0; color: var(--text); }

.cal-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-nav button {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: grid;
    place-items: center;
    color: var(--primary);
    transition: background .15s ease, transform .08s ease;
}

.cal-nav button:hover {
    background: var(--accent-soft);
    border-color: rgba(105, 101, 42, .25);
}

.cal-nav button:active { transform: scale(.96); }

.cal-month-year {
    font-size: 14px;
    font-weight: 700;
    min-width: 140px;
    text-align: center;
    color: var(--primary);
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 6px;
}

.cal-weekdays span {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    padding: 6px 4px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 112px;
    align-items: stretch;
    gap: 1px;
    background: rgba(105, 101, 42, .12);
    border: 1px solid rgba(105, 101, 42, .12);
    border-radius: 14px;
    overflow: hidden;
}

.cal-day {
    height: 100%;
    max-height: 112px;
    min-height: 0;
    box-sizing: border-box;
    background: rgba(255, 255, 255, .95);
    padding: 6px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.cal-day.other-month {
    background: rgba(246, 241, 233, .75);
    color: var(--muted);
}

.cal-day.today {
    background: rgba(220, 210, 137, .28);
    border: 2px solid rgba(105, 101, 42, .35);
    font-weight: 700;
}

.cal-day-num { font-weight: 700; color: var(--text); }

.cal-day-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.cal-event {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 8px;
    background: rgba(163, 177, 195, .22);
    border: 1px solid rgba(163, 177, 195, .35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.cal-legend {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.cal-legend-title {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
    margin-bottom: 10px;
}

.cal-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
}

.cal-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 650;
    color: var(--text);
}

.cal-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 6px;
    flex: 0 0 auto;
    box-sizing: border-box;
    border: 1px solid rgba(105, 101, 42, .15);
}

.cal-event.cal-coord-0, .cal-legend-swatch.cal-coord-0 { background: rgba(163,177,195,.28); border-color: rgba(163,177,195,.4); }
.cal-event.cal-coord-1, .cal-legend-swatch.cal-coord-1 { background: rgba(220,210,137,.45); border-color: rgba(105,101,42,.3); }
.cal-event.cal-coord-2, .cal-legend-swatch.cal-coord-2 { background: rgba(105,101,42,.18); border-color: rgba(105,101,42,.32); }
.cal-event.cal-coord-3, .cal-legend-swatch.cal-coord-3 { background: rgba(100,43,27,.12); border-color: rgba(100,43,27,.25); }
.cal-event.cal-coord-4, .cal-legend-swatch.cal-coord-4 { background: rgba(132,131,93,.22); border-color: rgba(132,131,93,.35); }
.cal-event.cal-coord-5, .cal-legend-swatch.cal-coord-5 { background: rgba(163,177,195,.35); border-color: rgba(163,177,195,.45); }
.cal-event.cal-coord-6, .cal-legend-swatch.cal-coord-6 { background: rgba(220,210,137,.55); border-color: rgba(105,101,42,.35); }
.cal-event.cal-coord-7, .cal-legend-swatch.cal-coord-7 { background: rgba(246,241,233,.95); border-color: rgba(105,101,42,.25); }
.cal-event.cal-coord-fallback, .cal-legend-swatch.cal-coord-fallback { background: rgba(122,117,104,.18); border-color: rgba(122,117,104,.3); }

.cal-more {
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
    padding: 3px 6px;
    border-radius: 8px;
    border: 1px dashed var(--border);
    background: rgba(255, 255, 255, .55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-footer { margin-top: 10px; text-align: right; }

.cal-footer a {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.cal-footer a:hover { text-decoration: underline; }

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(61, 58, 50, .45);
    z-index: 50;
}

.modal.open { display: flex; }

.modal-card {
    width: 100%;
    max-width: 520px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modal-hd {
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    background: var(--newspaper);
}

.modal-hd h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--primary);
}

.modal-hd p {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.modal-x {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    display: grid;
    place-items: center;
    color: var(--muted);
}

.modal-bd { padding: 16px 18px; }

.kv {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px 12px;
    font-size: 13px;
    font-weight: 500;
}

.kv b {
    color: var(--muted);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Auth (login) */
.auth-shell {
    min-height: 100%;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.auth-panel {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.auth-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--business-gold), var(--cheer), var(--matte-blue));
}

.auth-hero {
    padding: 40px 32px 28px;
    text-align: center;
    background:
        radial-gradient(ellipse 420px 180px at 50% 0%, rgba(220, 210, 137, .28), transparent 70%),
        linear-gradient(180deg, var(--newspaper) 0%, #fff 100%);
    border-bottom: 1px solid var(--border);
}

.auth-logo-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 6px;
}

.auth-logo-glow {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: min(92%, 300px);
    height: 110px;
    background: radial-gradient(ellipse at center, rgba(220, 210, 137, .45) 0%, transparent 72%);
    pointer-events: none;
    filter: blur(8px);
}

.auth-logo-frame {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: min(100%, 340px);
    padding: 26px 32px 22px;
    margin: 0 auto 12px;
    background: linear-gradient(160deg, #fff 0%, rgba(246, 241, 233, .92) 100%);
    border: 1px solid rgba(220, 210, 137, .65);
    border-radius: 22px;
    box-shadow:
        0 22px 48px rgba(105, 101, 42, .14),
        0 8px 20px rgba(100, 43, 27, .07),
        inset 0 1px 0 rgba(255, 255, 255, .95);
}

.auth-logo-frame::before {
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(105, 101, 42, .14);
    border-radius: 16px;
    pointer-events: none;
}

.auth-logo-frame::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    transform: translateX(-50%);
    width: 56px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--cheer), var(--business-gold), var(--cheer), transparent);
}

.auth-logo-img {
    display: block;
    width: auto;
    height: clamp(64px, 16vw, 92px);
    max-width: min(100%, 280px);
    max-height: none;
    object-fit: contain;
    filter: drop-shadow(0 8px 22px rgba(105, 101, 42, .2));
}

.auth-logo-tagline {
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    font-style: italic;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--muted);
}

.auth-form {
    padding: 28px 32px 24px;
}

.auth-foot {
    padding: 16px 32px 22px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .04em;
    background: rgba(246, 241, 233, .45);
}

@media (max-width: 480px) {
    .auth-logo-frame {
        width: 100%;
        padding: 20px 18px 18px;
        border-radius: 18px;
    }

    .auth-logo-img {
        height: clamp(58px, 20vw, 78px);
    }
}

/* Survey public */
.survey-shell {
    min-height: 100vh;
    padding: 24px 16px 48px;
}

.survey-wrap {
    max-width: 720px;
    margin: 0 auto;
}

.survey-hero {
    padding: 28px 24px 24px;
    background: linear-gradient(180deg, var(--newspaper), #fff);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.survey-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--accent-soft);
    padding: 8px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.survey-hero .brand-wordmark {
    width: min(100%, 280px);
    margin: 0 auto 14px;
}

.survey-hero h1 {
    margin: 0;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--primary);
    line-height: 1.2;
}

.survey-lead {
    margin: 10px auto 0;
    max-width: 28em;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}

.survey-shell .event-strip {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

@media (min-width: 540px) {
    .survey-shell .event-strip { grid-template-columns: 1fr 1fr; }
}

.survey-shell .event-chip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #fff, var(--newspaper));
    font-size: 14px;
    line-height: 1.45;
}

.survey-shell .event-chip .ico {
    width: auto;
    height: auto;
    border: 0;
    background: transparent;
    font-size: 22px;
}

.survey-shell .event-chip strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--olive);
    font-weight: 700;
    margin-bottom: 4px;
}

.survey-shell .hint-banner {
    font-size: 13px;
    color: var(--muted);
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(163, 177, 195, .12);
    border: 1px solid rgba(163, 177, 195, .22);
    margin-bottom: 8px;
}

.survey-shell .hint-banner strong { color: var(--text); }

.survey-shell .ok,
.survey-shell .bad {
    padding: 18px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.5;
}

.survey-shell .ok {
    border: 1px solid rgba(61, 90, 50, .22);
    background: var(--success-bg);
    color: var(--success-text);
}

.survey-shell .bad {
    border: 1px solid rgba(100, 43, 27, .2);
    background: var(--danger-bg);
    color: var(--danger-text);
}

.survey-shell .section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px dashed rgba(105, 101, 42, .18);
}

.survey-shell .section:first-of-type {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.survey-shell .q-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.survey-shell .q-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    display: grid;
    place-items: center;
}

.survey-shell .q {
    font-weight: 700;
    font-size: 16px;
    margin: 0;
    line-height: 1.35;
    color: var(--text);
}

.survey-shell .q-note {
    font-size: 13px;
    color: var(--muted);
    margin: 6px 0 0;
    font-weight: 500;
}

.survey-shell .rating-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.survey-shell .rating-option { position: relative; display: inline-block; }
.survey-shell .rating-option input { position: absolute; opacity: 0; inset: 0; }

.survey-shell .rating-option span {
    display: inline-block;
    padding: 11px 15px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    min-width: 92px;
    text-align: center;
    transition: border-color .15s, background .15s, transform .12s;
}

.survey-shell .rating-option span:hover {
    border-color: rgba(105, 101, 42, .35);
    transform: translateY(-1px);
}

.survey-shell .rating-option input:checked + span {
    border-color: rgba(105, 101, 42, .45);
    background: linear-gradient(180deg, rgba(220, 210, 137, .35), rgba(220, 210, 137, .15));
    color: var(--primary);
    box-shadow: 0 4px 14px rgba(105, 101, 42, .12);
}

.survey-shell .check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.survey-shell .check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.survey-shell .check-item:hover {
    background: rgba(246, 241, 233, .85);
    border-color: rgba(105, 101, 42, .22);
}

.survey-shell .check-item input {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.survey-shell textarea,
.survey-shell input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    transition: border-color .15s, box-shadow .15s;
}

.survey-shell textarea:focus,
.survey-shell input[type="text"]:focus {
    outline: none;
    border-color: rgba(105, 101, 42, .4);
    box-shadow: 0 0 0 4px rgba(220, 210, 137, .25);
}

.survey-shell textarea { min-height: 120px; resize: vertical; }

.survey-shell .q-obs-wrap {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(105, 101, 42, .14);
}

.survey-shell .q-obs-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--olive);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.survey-shell textarea.q-obs {
    min-height: 72px;
    font-size: 14px;
    padding: 12px 14px;
    background: rgba(246, 241, 233, .5);
}

.survey-shell .btn-wrap { margin-top: 24px; text-align: center; }

.survey-shell .btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary);
    color: #fff;
    border: 0;
    padding: 15px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(105, 101, 42, .22);
    transition: transform .15s, background .15s;
}

.survey-shell .btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.survey-shell .fine-print {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin-top: 16px;
    line-height: 1.45;
}

@media (max-width: 560px) {
    .survey-shell .check-grid { grid-template-columns: 1fr; }
    .survey-shell .rating-option span { min-width: calc(50% - 6px); }
}

/* Error pages */
.error-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.error-panel {
    width: 100%;
    max-width: 480px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.error-panel::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--business-gold), var(--cheer), var(--matte-blue));
}

.error-panel .error-body { padding: 36px 28px 32px; }

.error-panel .error-code {
    margin: 0 0 8px;
    font-size: 56px;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--cheer);
    line-height: 1;
}

.error-panel h1 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--primary);
}

.error-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.error-panel .error-foot {
    padding: 14px 28px 18px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--muted);
    background: rgba(246, 241, 233, .45);
}

@media (max-width: 720px) {
    :root {
        --header-h: 56px;
        --subnav-h: 42px;
    }

    .content { padding: 14px 12px 24px; }

    .app-header-inner {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .brand-wordmark { height: 32px; }

    .app-brand-text strong { font-size: 12px; }

    .app-brand-tag { letter-spacing: .16em; }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .subnav-link {
        padding: 8px 12px;
        font-size: 11px;
    }
}
