/*
  El Rincón del Español — Brotas Gourmet (13–16/08/2026)
  Conceito: a página de captura é uma "comanda" de tapas bar — um tíquete
  de papel creme sobre o fundo vinho da casa. No sucesso, o mesmo tíquete
  ganha um selo/carimbo dourado com o código do voucher, como um "vale"
  de balcão espanhol. Sem fontes externas (rede do evento pode cair) —
  tudo em pilhas de fontes de sistema.
*/

:root {
    --wine-950: #3d0b14;
    --wine-800: #5c1220;
    --wine-700: #7a1b2e;
    --gold-500: #d4a537;
    --gold-300: #e8c468;
    --cream-100: #faf3e6;
    --cream-200: #f1e6d2;
    --ink-900: #2b1710;
    --flame-600: #d6431f;
    --flame-700: #b02e14;

    --font-display: 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Times New Roman', serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'SF Mono', 'Menlo', Consolas, 'Liberation Mono', monospace;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink-900);
    background: var(--wine-800);
}

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--gold-300);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

/* ---------- Página pública (formulário / sucesso) ---------- */

.page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(20px, 6vw, 48px) 16px 40px;
    background:
        radial-gradient(circle at 50% -10%, var(--wine-700) 0%, var(--wine-800) 55%, var(--wine-950) 100%);
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--cream-100);
    max-width: 420px;
    width: 100%;
}

.brand-mark {
    width: auto;
    height: 62px;
    margin-bottom: 10px;
}

.eyebrow {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-500);
    margin: 0 0 4px;
}

.eyebrow-sub {
    font-size: 12px;
    color: var(--cream-200);
    opacity: 0.75;
    margin: 0 0 22px;
    letter-spacing: 0.04em;
}

.headline {
    font-family: var(--font-display);
    font-weight: 600;
    font-style: normal;
    font-size: clamp(24px, 6vw, 30px);
    line-height: 1.25;
    margin: 0 0 28px;
    color: var(--cream-100);
}

.headline em {
    font-style: normal;
    color: var(--gold-300);
}

/* ---------- O tíquete ---------- */

.ticket {
    width: 100%;
    max-width: 420px;
    background: var(--cream-100);
    position: relative;
    padding: 30px 24px 26px;
    border-top: 3px dashed var(--wine-700);
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.45);
}

.ticket::before,
.ticket::after {
    content: '';
    position: absolute;
    top: -14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--wine-800);
}

.ticket::before {
    left: -14px;
}

.ticket::after {
    right: -14px;
}

.field {
    margin-bottom: 18px;
}

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

.field input[type='text'],
.field input[type='tel'] {
    width: 100%;
    font-family: var(--font-body);
    font-size: 16px;
    padding: 12px 14px;
    border: 1.5px solid var(--cream-200);
    background: #fff;
    border-radius: 6px;
    color: var(--ink-900);
}

.field input:focus {
    border-color: var(--gold-500);
}

.field-error {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--flame-700);
    font-weight: 600;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.checkbox-row input[type='checkbox'] {
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--flame-600);
    flex-shrink: 0;
}

.checkbox-row label {
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--ink-900);
}

.checkbox-row.required label {
    font-weight: 600;
}

.radio-group {
    border: none;
    margin: 0 0 14px;
    padding: 0;
}

.radio-group legend {
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wine-700);
    margin-bottom: 8px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    cursor: pointer;
}

.radio-option input[type='radio'] {
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--flame-600);
    flex-shrink: 0;
}

.radio-option span {
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--ink-900);
}

.form-alert {
    background: #fbe4de;
    border: 1px solid var(--flame-700);
    color: var(--flame-700);
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 18px;
}

.btn-primary {
    display: block;
    width: 100%;
    appearance: none;
    border: none;
    cursor: pointer;
    padding: 16px 20px;
    min-height: 52px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--flame-600), var(--flame-700));
    box-shadow: 0 8px 18px -6px rgba(214, 67, 31, 0.55);
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -6px rgba(214, 67, 31, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.legal-note {
    margin-top: 16px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--wine-700);
    opacity: 0.8;
    text-align: center;
}

.site-credit {
    margin-top: 24px;
    text-align: center;
}

.site-credit a {
    font-size: 11.5px;
    color: var(--cream-200);
    opacity: 0.55;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.site-credit a:hover {
    opacity: 0.85;
    text-decoration: underline;
}

/* ---------- Selo / voucher (tela de sucesso) ---------- */

.stamp-wrap {
    display: flex;
    justify-content: center;
    margin: 6px 0 22px;
}

.stamp {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    border: 3px solid var(--gold-500);
    outline: 1px solid var(--gold-500);
    outline-offset: 5px;
    background: var(--wine-800);
    color: var(--cream-100);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotate(-4deg);
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.5);
}

.stamp-label {
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-300);
    margin-bottom: 6px;
}

.stamp-code {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.stamp-valid {
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold-300);
    opacity: 0.85;
    margin-top: 6px;
}

.success-name {
    text-align: center;
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--wine-800);
    margin: 0 0 4px;
}

.success-copy {
    text-align: center;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-900);
    margin: 0 0 22px;
}

.screenshot-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--cream-200);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--wine-800);
    font-weight: 600;
    margin-bottom: 24px;
}

.screenshot-hint svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--flame-600);
}

.info-block {
    border-top: 1px dashed var(--cream-200);
    padding-top: 18px;
    margin-top: 4px;
}

.info-block h2 {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wine-700);
    margin: 0 0 8px;
}

.info-block p {
    font-size: 13.5px;
    line-height: 1.55;
    margin: 0 0 12px;
    color: var(--ink-900);
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 16px;
}

.contact-links a {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
}

.contact-links a.maps-link {
    color: var(--flame-700);
}

.contact-links a.whatsapp-link {
    color: #1f8c4d;
}

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

.hours-table td {
    padding: 5px 0;
    border-bottom: 1px solid var(--cream-200);
}

.hours-table td:first-child {
    font-weight: 600;
    color: var(--wine-800);
}

.hours-table td:last-child {
    text-align: right;
    color: var(--ink-900);
}

.hours-table td.hours-closed {
    color: var(--wine-700);
    opacity: 0.65;
    font-style: italic;
}

/* ---------- Área administrativa (/lista) ---------- */

.admin-page {
    min-height: 100dvh;
    background: var(--wine-800);
    padding: 24px 16px 48px;
    font-family: var(--font-body);
}

.admin-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.admin-header {
    color: var(--cream-100);
    margin-bottom: 20px;
}

.admin-header .eyebrow {
    margin-bottom: 2px;
}

.admin-header h1 {
    font-family: var(--font-display);
    font-size: 22px;
    margin: 0;
    color: var(--cream-100);
}

.admin-card {
    background: var(--cream-100);
    border-radius: 10px;
    padding: 28px 24px;
    max-width: 380px;
    margin: 40px auto 0;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.45);
}

.admin-card p.lede {
    font-size: 13.5px;
    color: var(--wine-700);
    margin: 0 0 18px;
}

.admin-card .field input[type='password'] {
    width: 100%;
    font-size: 16px;
    padding: 12px 14px;
    border: 1.5px solid var(--cream-200);
    border-radius: 6px;
    background: #fff;
    color: var(--ink-900);
}

.lock-notice {
    background: #fbe4de;
    border: 1px solid var(--flame-700);
    color: var(--flame-700);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.admin-count {
    color: var(--cream-200);
    font-size: 13px;
}

.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gold-500);
    color: var(--wine-950);
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 6px;
}

.search-bar {
    margin-bottom: 14px;
}

.search-bar input[type='search'] {
    width: 100%;
    font-size: 16px;
    padding: 12px 14px;
    border: 1.5px solid transparent;
    border-radius: 8px;
    background: var(--cream-100);
    color: var(--ink-900);
}

.search-bar input[type='search']:focus {
    border-color: var(--gold-500);
}

.table-scroll {
    overflow-x: auto;
    background: var(--cream-100);
    border-radius: 10px;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.45);
}

table.leads {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    white-space: nowrap;
}

table.leads th {
    text-align: left;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wine-700);
    padding: 12px 14px;
    border-bottom: 2px solid var(--cream-200);
}

table.leads td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--cream-200);
    color: var(--ink-900);
}

table.leads tr:last-child td {
    border-bottom: none;
}

.badge-optin {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
}

.badge-optin.yes {
    background: #e4f0e1;
    color: #2f6b27;
}

.badge-optin.no {
    background: #efe6da;
    color: #7a6a52;
}

.redeem-label[hidden] {
    display: none;
}

.clicks-cell {
    display: flex;
    gap: 6px;
}

.redeem-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-toggle {
    appearance: none;
    border: 1.5px solid var(--wine-700);
    background: transparent;
    color: var(--wine-700);
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-toggle.mark {
    border-color: var(--flame-600);
    color: var(--flame-700);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--wine-700);
    font-size: 14px;
}

/* ---------- Cortesia do Chef ---------- */

.field label .optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.7;
}

.birthday-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
}

.field select {
    width: 100%;
    font-family: var(--font-body);
    font-size: 16px;
    padding: 12px 10px;
    border: 1.5px solid var(--cream-200);
    border-radius: 8px;
    background: #fff;
    color: var(--ink-900);
}

.field select:focus {
    border-color: var(--gold-500);
}

.stamp-date {
    font-family: var(--font-mono);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

/* Tíquete da página /cortesia: furos laterais recortados (e não pintados).
   O fundo é um degradê; círculos de cor sólida destoam dele conforme a altura. */
.ticket-cut::before,
.ticket-cut::after {
    display: none;
}

.ticket-cut {
    box-shadow: none;
    -webkit-mask:
        radial-gradient(circle 14px at 0 0, #0000 98%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle 14px at 100% 0, #0000 98%, #000) right / 51% 100% no-repeat;
    mask:
        radial-gradient(circle 14px at 0 0, #0000 98%, #000) left / 51% 100% no-repeat,
        radial-gradient(circle 14px at 100% 0, #0000 98%, #000) right / 51% 100% no-repeat;
}
