/* ═══════════════════════════════════════════════════════════════
   Rifa Solidaria — Design System v3 (inspirado rifeme.com.br)
   Tipografia : Inter (Google Fonts)
   Paleta     : Teal/Cyan + Slate
   ════════════════════════════════════════════════════════════ */

:root {
    /* Superfícies */
    --bg:            #f1f5f9;
    --surface:       #ffffff;
    --surface-2:     #f8fafc;
    --border:        #e2e8f0;
    --border-strong: #cbd5e1;

    /* Texto */
    --text:   #0f172a;
    --muted:  #64748b;
    --subtle: #94a3b8;

    /* Marca — teal/ciano */
    --brand:       #0891b2;
    --brand-dark:  #0e7490;
    --brand-light: #ecfeff;
    --brand-mid:   rgba(8, 145, 178, 0.10);

    /* Acento — verde (confirmações) */
    --accent:       #16a34a;
    --accent-light: #f0fdf4;
    --accent-mid:   rgba(22, 163, 74, 0.12);

    /* Feedback */
    --success:    #15803d;
    --success-bg: #f0fdf4;
    --success-bd: #bbf7d0;
    --danger:     #dc2626;
    --danger-bg:  #fef2f2;
    --danger-bd:  #fecaca;
    --warning:    #d97706;

    /* Sombras */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow:    0 4px 14px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.05);

    /* Geometria */
    --radius:    16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body  { margin: 0; }
a     { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
h1, h2, h3, h4, h5, h6, p, dl, dd { margin: 0; }

/* ── Tipografia base ───────────────────────────────────────── */
body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════════
   BARRA DE TOPO
   ════════════════════════════════════════════════════════════ */

.top-bar {
    background: var(--brand);
    color: #fff;
    text-align: center;
    padding: 9px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT SHELL
   ════════════════════════════════════════════════════════════ */

.page-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Cabeçalho ─────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(16px, 5vw, 56px);
    height: 64px;
    gap: 24px;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand);
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.brand-copy {
    display: none;
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0;
    font-weight: 400;
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 2px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.nav-toggle:hover {
    background: var(--surface-2);
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.top-nav > a {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted);
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    transition: color 0.15s, background 0.15s;
}

.top-nav > a:hover {
    color: var(--text);
    background: var(--surface-2);
}

/* ── Grid principal ────────────────────────────────────────── */
.content-grid {
    flex: 1;
    display: grid;
    gap: 24px;
    width: min(1200px, calc(100% - clamp(32px, 8vw, 112px)));
    margin: 36px auto 64px;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS & PAINÉIS
   ════════════════════════════════════════════════════════════ */

.panel,
.hero-card,
.info-card,
.raffle-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.panel,
.hero-card {
    padding: 32px;
}

/* ── Hero (home) ───────────────────────────────────────────── */
.hero-card {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    border: none;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 78% 40%, rgba(255,255,255,0.08) 0%, transparent 55%),
        radial-gradient(circle at 15% 85%, rgba(255,255,255,0.05) 0%, transparent 45%);
    pointer-events: none;
}

.hero-card h1 {
    font-size: clamp(1.35rem, 2.5vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    max-width: 680px;
    color: #fff;
    position: relative;
}

.hero-card p {
    color: rgba(255, 255, 255, 0.78);
    max-width: 580px;
    margin-top: 10px;
    font-size: 0.95rem;
    position: relative;
}

/* Stats row (hero) */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-top: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.stats-row > div {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.10);
}

.stats-row strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 2px;
    line-height: 1.1;
}

.stats-row span {
    font-size: 0.78rem;
    opacity: 0.78;
    font-weight: 400;
}

/* Trust pills (hero) */
.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    position: relative;
}

.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.24);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
}

/* ── Eyebrow ───────────────────────────────────────────────── */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand);
    margin-bottom: 8px;
}

.hero-card .eyebrow {
    color: rgba(255, 255, 255, 0.65);
}

/* ═══════════════════════════════════════════════════════════════
   MENSAGENS DE FEEDBACK
   ════════════════════════════════════════════════════════════ */

.message {
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 500;
}

.message.success {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success-bd);
}

.message.error {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger-bd);
}

.message.neutral {
    background: var(--brand-light);
    border-color: rgba(8, 145, 178, 0.18);
    color: var(--brand-dark);
}

/* ═══════════════════════════════════════════════════════════════
   TIPOGRAFIA / SEÇÕES
   ════════════════════════════════════════════════════════════ */

.section-head {
    display: grid;
    gap: 4px;
    margin-bottom: 24px;
}

.section-head h1,
.section-head h2,
.detail-head h1 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.section-head p,
.detail-head p,
.raffle-card p,
.empty-state p,
.info-card > p {
    color: var(--muted);
    font-size: 0.9rem;
}

.compact-head { margin-bottom: 16px; }

.align-between {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.single-column { display: grid; gap: 24px; }

/* ═══════════════════════════════════════════════════════════════
   GRADE DE RIFAS (HOME)
   ════════════════════════════════════════════════════════════ */

.raffle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.raffle-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    padding: 0;
}

.raffle-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* ── Cabeçalho visual do card (área de destaque) ───────────── */
.card-visual {
    height: clamp(180px, 24vw, 240px);
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.card-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 25%, rgba(255,255,255,0.12), transparent 60%);
    pointer-events: none;
}

.card-visual.status-encerrada,
.card-visual.status-encerrado {
    background: linear-gradient(135deg, #b45309 0%, #78350f 100%);
}

.card-visual.status-sorteada,
.card-visual.status-sorteado {
    background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
}

.card-visual.status-rascunho {
    background: linear-gradient(135deg, #64748b 0%, #334155 100%);
}

.cv-initial {
    font-size: 3rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.22);
    letter-spacing: -0.06em;
    user-select: none;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    max-width: 90%;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}

.cv-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.03em;
}

/* ── Corpo do card ─────────────────────────────────────────── */
.card-body {
    padding: 18px 18px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.raffle-card h3 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--text);
}

.raffle-card p {
    font-size: 0.84rem;
    color: var(--muted);
    flex: 1;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Barra de progresso */
.progress-track {
    height: 5px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), #06b6d4);
    transition: width 0.5s ease;
}

.progress-fill.full {
    background: var(--accent);
}

.progress-label {
    font-size: 0.75rem;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    margin-top: 3px;
}

/* Stats inline no card */
.card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    margin-top: 2px;
}

.card-stats > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card-stats span {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
}

.card-stats strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

/* Rodapé do card */
.card-footer {
    border-top: 1px solid var(--border);
    padding: 13px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: var(--surface-2);
}

.card-price {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.card-price span {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 500;
}

.card-price strong {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.card-date {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
}

.card-date strong {
    display: block;
    font-size: 0.84rem;
    color: var(--text);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   STATUS BADGES & PREÇO
   ════════════════════════════════════════════════════════════ */

.status-badge,
.price-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.status-badge {
    background: var(--brand-light);
    color: var(--brand-dark);
    border: 1px solid rgba(8, 145, 178, 0.18);
}

.status-badge.status-encerrada,
.status-badge.status-encerrado {
    background: #fffbeb;
    color: var(--warning);
    border-color: rgba(217, 119, 6, 0.18);
}

.status-badge.status-sorteada,
.status-badge.status-sorteado {
    background: #f5f3ff;
    color: #7c3aed;
    border-color: rgba(124, 58, 237, 0.18);
}

.status-badge.status-rascunho {
    background: var(--surface-2);
    color: var(--muted);
    border-color: var(--border);
}

.payment-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    border: 1px solid transparent;
}

.payment-status-pending {
    background: #fff7ed;
    color: #c2410c;
    border-color: rgba(194, 65, 12, 0.18);
}

.payment-status-approved {
    background: #ecfdf5;
    color: #15803d;
    border-color: rgba(21, 128, 61, 0.18);
}

.payment-status-cancelled,
.payment-status-expired,
.payment-status-failed,
.payment-status-refunded {
    background: #fef2f2;
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.18);
}

.price-tag {
    background: var(--brand-mid);
    color: var(--brand-dark);
    border: 1px solid rgba(8, 145, 178, 0.15);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   META LIST (DL)
   ════════════════════════════════════════════════════════════ */

.meta-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
}

.meta-list dt {
    font-size: 0.83rem;
    color: var(--muted);
    font-weight: 400;
    white-space: nowrap;
}

.meta-list dd {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: right;
}

.meta-list.stacked div { flex-direction: column; gap: 2px; }
.meta-list.stacked dd  { text-align: left; font-size: 0.95rem; }

/* ═══════════════════════════════════════════════════════════════
   BOTÕES
   ════════════════════════════════════════════════════════════ */

.button,
.button.ghost,
.button.secondary,
.button.danger {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 22px;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.button {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.button:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.35);
}

.button.secondary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.button.secondary:hover {
    background: #15803d;
    border-color: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28);
}

.button.danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger-bd);
}

.button.danger:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.24);
}

.button.ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
    border-radius: var(--radius-xs);
}

.button.ghost:hover {
    background: var(--surface-2);
    border-color: var(--muted);
}

/* ── Botões de quantidade rápida ───────────────────────────── */
.qty-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
}

.qty-btn {
    padding: 9px 18px;
    border-radius: 999px;
    border: 2px solid var(--brand);
    background: transparent;
    color: var(--brand);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.01em;
}

.qty-btn:hover {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 3px 10px rgba(8, 145, 178, 0.3);
}

/* ── Stepper de quantidade ─────────────────────────────────── */
.stepper-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.stepper-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stepper {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.step-btn {
    width: 52px;
    height: 52px;
    border: none;
    background: var(--surface-2);
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-btn:hover {
    background: var(--brand);
    color: #fff;
}

.stepper input[type="number"] {
    width: 90px;
    text-align: center;
    border: none;
    border-left: 2px solid var(--border-strong);
    border-right: 2px solid var(--border-strong);
    height: 52px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    background: var(--surface);
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.stepper input[type="number"]::-webkit-outer-spin-button,
.stepper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.qty-total-preview {
    font-size: 0.9rem;
    color: var(--brand);
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   FORMULÁRIOS
   ════════════════════════════════════════════════════════════ */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-grid label {
    display: grid;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.full-width { grid-column: 1 / -1; }

.form-grid input,
.form-grid textarea,
.form-grid select {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}

.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.form-grid textarea {
    min-height: 96px;
    resize: vertical;
}

/* ── Upload de imagem ──────────────────────────────────────── */
.upload-area {
    position: relative;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--brand);
    background: var(--brand-light);
}

.upload-area .upload-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    padding: 0 !important;
    border: none !important;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    text-align: center;
    padding: 24px;
    color: var(--muted);
    font-size: 0.88rem;
}

.upload-icon {
    font-size: 2rem;
    line-height: 1;
}

.upload-placeholder small {
    font-size: 0.78rem;
    color: var(--muted);
}

.upload-preview {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-radius: calc(var(--radius-sm) - 2px);
}

.upload-current-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 0.76rem;
    text-align: center;
    padding: 6px 10px;
    z-index: 1;
}

/* ── Imagem na página de detalhe da rifa ───────────────────── */
.raffle-product-img {
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-height: 320px;
    background: var(--surface-2);
}

.raffle-product-img img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

/* ── Imagem no card da home ────────────────────────────────── */
.card-visual .cv-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    padding: 10px;
    background: #fff;
    position: absolute;
    inset: 0;
    z-index: 0;
}


   ════════════════════════════════════════════════════════════ */

.trust-block {
    padding: 22px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    display: grid;
    gap: 16px;
}

.trust-block-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brand);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trust-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.trust-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.trust-item-text strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}

.trust-item-text span {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.55;
}

/* ═══════════════════════════════════════════════════════════════
   PÁGINA DA RIFA (DETALHE PÚBLICO)
   ════════════════════════════════════════════════════════════ */

.detail-head {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    justify-content: space-between;
}

.detail-head h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.detail-price {
    flex-shrink: 0;
    min-width: 148px;
    background: var(--brand-light);
    border: 1px solid rgba(8, 145, 178, 0.15);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    text-align: center;
}

.detail-price span {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.detail-price strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand);
    letter-spacing: -0.03em;
    margin-top: 4px;
}

/* Barra de stats de tickets (TOTAL / LIVRES / VENDIDOS) */
.ticket-stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: 6px;
}

.tsb-cell {
    padding: 14px 10px;
    text-align: center;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tsb-cell span {
    font-size: 0.63rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--muted);
    font-weight: 700;
}

.tsb-cell strong {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.tsb-cell.tsb-sold strong { color: var(--brand); }
.tsb-cell.tsb-free strong  { color: var(--accent); }

.detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
}

.info-card {
    padding: 24px;
}

.info-card h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
    color: var(--text);
}

.accent-card {
    background: linear-gradient(160deg, var(--brand-light) 0%, var(--surface) 55%);
    border-color: rgba(8, 145, 178, 0.14);
}

.purchase-code-card {
    display: grid;
    gap: 10px;
    margin: 14px 0 16px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(8, 145, 178, 0.18);
    box-shadow: var(--shadow-xs);
}

.purchase-code-label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-dark);
}

.purchase-code-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.purchase-code-value {
    display: inline-flex;
    align-items: center;
    min-height: 56px;
    padding: 0 18px;
    border-radius: var(--radius-xs);
    background: var(--surface);
    border: 2px solid var(--brand-mid);
    color: var(--brand-dark);
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    font-family: 'JetBrains Mono', ui-monospace, 'Fira Code', monospace;
    -webkit-user-select: all;
    user-select: all;
}

.purchase-code-copy {
    min-height: 48px;
    padding-inline: 18px;
    white-space: nowrap;
}

.purchase-code-card p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--muted);
}

/* Números sorteados */
.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.number-grid span,
.winner-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 2px solid var(--brand-mid);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--brand-dark);
    letter-spacing: 0.06em;
    box-shadow: var(--shadow-xs);
    font-family: 'JetBrains Mono', ui-monospace, 'Fira Code', monospace;
}

.winner-number {
    min-height: 110px;
    font-size: 2.6rem;
    margin: 16px 0;
    background: linear-gradient(135deg, var(--brand-light), var(--surface));
    border-color: var(--brand);
    border-width: 2px;
}

/* Painel de compra */
.purchase-panel { padding: 28px; }

/* ═══════════════════════════════════════════════════════════════
   TABELAS (ADMIN)
   ════════════════════════════════════════════════════════════ */

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

table  { width: 100%; border-collapse: collapse; }

th {
    padding: 11px 16px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    font-size: 0.88rem;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td      { background: #fafbfc; }

td small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
    font-size: 0.78rem;
}

td code {
    font-family: 'JetBrains Mono', ui-monospace, 'Fira Code', monospace;
    font-size: 0.8rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 2px 7px;
    color: var(--brand-dark);
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN — AÇÕES & GRADE DE COMPRAS
   ════════════════════════════════════════════════════════════ */

.action-stack { display: flex; flex-direction: column; gap: 6px; }

.action-stack .button,
.action-stack .button.ghost,
.action-stack .button.secondary,
.action-stack .button.danger {
    font-size: 0.8rem;
    padding: 8px 14px;
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-xs);
}

.admin-purchase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.purchase-record  { display: grid; gap: 16px; }
.purchase-list    { display: grid; gap: 10px; }

.purchase-entry {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    transition: background 0.15s, box-shadow 0.15s;
}

.purchase-entry:hover {
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.purchase-entry-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.purchase-entry-head strong { font-size: 0.88rem; font-weight: 600; }
.purchase-entry-head small  { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════
   TICKETS / PILLS
   ════════════════════════════════════════════════════════════ */

.ticket-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.ticket-pill-row span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 5px 10px;
    border-radius: var(--radius-xs);
    background: var(--brand-light);
    border: 1px solid rgba(8, 145, 178, 0.18);
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--brand-dark);
    letter-spacing: 0.04em;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* ═══════════════════════════════════════════════════════════════
   PIX
   ════════════════════════════════════════════════════════════ */

.pix-card {
    margin-top: 20px;
    padding: 20px;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    border: 1px solid rgba(22, 163, 74, 0.2);
    display: grid;
    gap: 14px;
}

.pix-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--accent); }

.pix-copy-block {
    display: grid;
    gap: 10px;
}

.pix-key {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.95rem;
    font-weight: 600;
    word-break: break-all;
    overflow-wrap: anywhere;
    -webkit-user-select: all;
    user-select: all;
    -webkit-touch-callout: default;
    background: var(--surface);
    padding: 9px 13px;
    border-radius: var(--radius-xs);
    border: 1px dashed rgba(22, 163, 74, 0.4);
    color: var(--text);
    display: block;
    cursor: copy;
}

.pix-copy-button {
    min-height: 46px;
    width: fit-content;
    max-width: 100%;
}

@media (max-width: 640px) {
    .pix-copy-button {
        width: 100%;
    }
}

.pix-note,
.email-sent-note {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 4px 0 0;
}

.purchase-email-resend-form {
    margin-top: 10px;
}

.purchase-email-resend-button {
    min-height: 42px;
    padding-inline: 16px;
}

.payment-status-line {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pix-qrcode-wrap {
    display: flex;
    justify-content: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-sm);
    border: 1px dashed rgba(22, 163, 74, 0.28);
}

.pix-qrcode {
    width: min(220px, 100%);
    height: auto;
    display: block;
}

.email-sent-note strong { color: var(--text); font-weight: 600; }

.purchase-entry-badges,
.purchase-actions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.purchase-actions-inline form {
    margin: 0;
}

.purchase-actions-inline .button {
    padding: 7px 12px;
    font-size: 0.78rem;
}

/* ═══════════════════════════════════════════════════════════════
   PAGINAÇÃO
   ════════════════════════════════════════════════════════════ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 22px 0 4px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    border: 2px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    transition: all 0.15s;
}

.page-link:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.25);
}

.page-link.disabled {
    color: var(--subtle);
    pointer-events: none;
    background: var(--surface-2);
    border-color: var(--border);
}

.page-info { font-size: 0.86rem; color: var(--muted); padding: 0 8px; }

/* ═══════════════════════════════════════════════════════════════
   BUSCA
   ════════════════════════════════════════════════════════════ */

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 18px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 240px;
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.10);
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* ═══════════════════════════════════════════════════════════════
   RECEITA (DASHBOARD)
   ════════════════════════════════════════════════════════════ */

.revenue-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.revenue-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.revenue-card .eyebrow { color: var(--muted); font-size: 0.68rem; margin-bottom: 4px; }
.revenue-card strong   { font-size: 1.5rem; font-weight: 800; color: var(--brand); letter-spacing: -0.03em; line-height: 1.1; }
.revenue-card small    { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════
   MISCELÂNEA
   ════════════════════════════════════════════════════════════ */

.auth-panel,
.auth-form { max-width: 480px; margin: 0 auto; }

.auth-panel .section-head { text-align: center; margin-bottom: 28px; }
.auth-panel .section-head h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.auth-form.form-grid { grid-template-columns: 1fr; }

.text-link {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.15s;
}

.text-link:hover { color: var(--brand-dark); }
.text-link::before { content: "←"; font-size: 0.85em; }

.empty-state {
    display: grid;
    place-items: center;
    text-align: center;
    padding: 48px 24px;
}

.empty-state h2,
.empty-state h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }

.detail-grid .action-stack .button,
.detail-grid .action-stack form { width: 100%; }

.detail-grid .info-card > p { margin-top: 6px; color: var(--muted); }

.portal-grid {
    display: grid;
    gap: 18px;
}

.portal-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.portal-summary-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    padding: 18px 20px;
    display: grid;
    gap: 4px;
}

.portal-summary-card span {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--muted);
    font-weight: 700;
}

.portal-summary-card strong {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--brand-dark);
    letter-spacing: -0.03em;
}

.portal-email {
    color: var(--muted);
    font-size: 0.92rem;
}

.portal-purchase-list {
    display: grid;
    gap: 16px;
}

.portal-purchase-card {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
    align-items: start;
}

.portal-purchase-media {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-purchase-media img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background: #fff;
    padding: 10px;
    display: block;
}

.portal-purchase-fallback {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--subtle);
}

.portal-purchase-body {
    display: grid;
    gap: 14px;
}

.portal-purchase-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.portal-purchase-header h2 {
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0;
}

.portal-purchase-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.portal-access-note {
    font-size: 0.84rem;
    color: var(--muted);
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   PRIVACIDADE
   ════════════════════════════════════════════════════════════ */

.legal-content {
    max-width: 960px;
    margin: 0 auto;
}

.legal-meta {
    font-size: 0.82rem;
    color: var(--muted);
}

.legal-stack {
    display: grid;
    gap: 16px;
}

.legal-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.legal-card h2 {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    color: var(--text);
}

.legal-card p {
    color: var(--muted);
    font-size: 0.94rem;
}

.legal-card p + p,
.legal-card ul {
    margin-top: 12px;
}

.legal-card ul {
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: var(--muted);
}

.legal-card a {
    color: var(--brand-dark);
    font-weight: 700;
}

.privacy-consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 250;
}

.privacy-consent[hidden] {
    display: none;
}

.privacy-consent__panel {
    width: min(960px, 100%);
    margin: 0 auto;
    padding: 20px 22px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.96);
    color: #e2e8f0;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    transform: translateY(18px);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.privacy-consent.is-visible .privacy-consent__panel {
    transform: translateY(0);
    opacity: 1;
}

.privacy-consent__copy {
    display: grid;
    gap: 8px;
    max-width: 640px;
}

.privacy-consent__eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #67e8f9;
}

.privacy-consent__copy strong {
    font-size: 1rem;
    letter-spacing: -0.02em;
    color: #fff;
}

.privacy-consent__copy p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.6;
}

.privacy-consent__actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.privacy-consent .button.ghost {
    background: transparent;
    border-color: rgba(226, 232, 240, 0.18);
    color: #fff;
}

.privacy-consent .button.ghost:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER MULTI-COLUNA
   ════════════════════════════════════════════════════════════ */

.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 48px clamp(16px, 5vw, 56px) 0;
    margin-top: auto;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-brand strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 0.84rem;
    line-height: 1.65;
    max-width: 320px;
    color: #94a3b8;
    margin: 0;
}

.footer-col h4 {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 14px;
}

.footer-col ul {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-col li {
    font-size: 0.86rem;
    color: #94a3b8;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.footer-trust-bar {
    background: rgba(255,255,255,0.05);
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 14px clamp(16px, 5vw, 56px);
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.footer-trust-bar strong { color: var(--brand); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 16px 0;
    text-align: center;
    font-size: 0.76rem;
    max-width: 1200px;
    margin: 0 auto;
    color: #475569;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVO
   ════════════════════════════════════════════════════════════ */

@media (min-width: 900px) {
    .brand-copy { display: block; }
}

@media (max-width: 860px) {
    .site-header { height: auto; padding: 12px 16px; }
    .site-header__brand { flex: 1; }
    .site-header__actions { margin-left: auto; }
    .nav-toggle { display: inline-flex; }

    .top-nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        width: min(320px, calc(100vw - 32px));
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: rgba(255, 255, 255, 0.98);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        box-shadow: var(--shadow-md);
    }

    .top-nav.is-open {
        display: flex;
    }

    .top-nav > a,
    .top-nav form,
    .top-nav form .button,
    .top-nav .dark-toggle {
        width: 100%;
    }

    .top-nav > a,
    .top-nav form .button,
    .top-nav .dark-toggle {
        min-height: 44px;
        justify-content: center;
    }

    .detail-head,
    .align-between { flex-direction: column; align-items: stretch; }

    .detail-price {
        text-align: left;
        min-width: unset;
        display: flex;
        align-items: baseline;
        gap: 12px;
    }

    .stats-row,
    .detail-grid,
    .form-grid,
    .footer-inner { grid-template-columns: 1fr; }

    .stats-row { gap: 0; }
    .stats-row > div { border-top: 1px solid rgba(255,255,255,0.15); }

    .purchase-entry-head { flex-direction: column; }

    .portal-purchase-card { grid-template-columns: 1fr; }

    .privacy-consent__panel {
        flex-direction: column;
        align-items: stretch;
    }

    .privacy-consent__actions {
        justify-content: stretch;
    }

    .privacy-consent__actions .button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .content-grid { width: calc(100% - 24px); margin: 20px auto 40px; }
    .panel, .hero-card { padding: 20px; }
    .info-card { padding: 18px; }
    .number-grid span { min-height: 50px; font-size: 0.9rem; }
    .top-nav > a { font-size: 0.88rem; padding: 10px 12px; }

    .card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .card-footer .button { width: 100%; justify-content: center; }
    .qty-presets { justify-content: center; }
    .ticket-stats-bar { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------------------------------------------------------------
   DARK MODE
   ------------------------------------------------------------ */
[data-theme="dark"] {
    --surface:       #111827;
    --surface-2:     #1f2937;
    --surface-hover: #374151;
    --border:        #374151;
    --border-strong: #4b5563;
    --text:          #f9fafb;
    --muted:         #9ca3af;
    --subtle:        #6b7280;
    --brand:         #38bdf8;
    --brand-dark:    #0ea5e9;
    --brand-light:   rgba(56,189,248,0.12);
}
[data-theme="dark"] body { background: #0f172a; }
[data-theme="dark"] .top-bar { background: #1e293b; }
[data-theme="dark"] .site-header { background: #111827; border-bottom-color: #374151; }
[data-theme="dark"] .site-footer { background: #111827; }
[data-theme="dark"] .raffle-card { background: #1f2937; }
[data-theme="dark"] .info-card  { background: #1f2937; }
[data-theme="dark"] .panel      { background: #1f2937; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
    background: #374151; color: #f9fafb; border-color: #4b5563;
}

.dark-toggle {
    background: none;
    border: 2px solid var(--border-strong);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text);
    line-height: 1;
    transition: background 0.15s;
}
.dark-toggle:hover { background: var(--surface-hover); }

/* ---------------------------------------------------------------
   HOME TOOLBAR (busca + categorias)
   ------------------------------------------------------------ */
.home-toolbar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-search-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.home-search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.93rem;
}
.home-search-input:focus { outline: 2px solid var(--brand); border-color: transparent; }

.category-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.cat-tab {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1.5px solid var(--border-strong);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.cat-tab:hover { background: var(--surface-hover); color: var(--text); }
.cat-tab.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 2px 8px rgba(8,145,178,0.25);
}

/* category badge no card */
.cv-category {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------
   PAGE-BTN (alias .page-link para as novas views)
   ------------------------------------------------------------ */
.page-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    border: 2px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    transition: all 0.15s;
}
.page-btn:hover, .page-btn.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 2px 8px rgba(8,145,178,0.25);
}

/* ---------------------------------------------------------------
   CAROUSEL
   ------------------------------------------------------------ */
.carousel {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-2);
    aspect-ratio: 16/9;
    max-height: 420px;
    margin-bottom: 22px;
}
.carousel-track { position: relative; width: 100%; height: 100%; }
.carousel-slide {
    display: none;
    width: 100%; height: 100%;
    position: absolute; inset: 0;
}
.carousel-slide.active { display: flex; align-items: center; justify-content: center; }
.carousel-slide img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 0;
}
.carousel-btn {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: none;
    padding: 10px 16px;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
    z-index: 2;
    transition: background 0.15s;
}
.carousel-btn:hover { background: rgba(0,0,0,0.7); }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }
.carousel-dots {
    position: absolute;
    bottom: 12px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 2;
}
.carousel-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, transform 0.15s;
}
.carousel-dot.active { background: #fff; transform: scale(1.3); }

/* ---------------------------------------------------------------
   SHARE BAR
   ------------------------------------------------------------ */
.share-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px 0 0;
    margin-top: 16px;
    border-top: 1px solid var(--border);
}
.share-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--muted);
    margin-right: 4px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s, transform 0.1s;
}
.share-btn:hover { opacity: 0.88; transform: scale(1.04); }
.share-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.share-btn.whatsapp  { background: #25d366; color: #fff; }
.share-btn.telegram  { background: #2ca5e0; color: #fff; }
.share-btn.facebook  { background: #1877f2; color: #fff; }
.share-btn.copy      { background: var(--surface-2); color: var(--text); border: 1.5px solid var(--border-strong); }

/* ---------------------------------------------------------------
   WINNERS PAGE
   ------------------------------------------------------------ */
.winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
    margin-top: 16px;
}
.winner-card {
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s, box-shadow 0.18s;
}
.winner-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,0.12); }
.winner-img {
    height: 160px;
    background: var(--brand-light);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.winner-img img { width: 100%; height: 100%; object-fit: cover; }
.winner-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.winner-body h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.winner-number-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--brand);
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
}
.winner-number-badge span { font-size: 0.75rem; opacity: 0.9; }
.winner-number-badge strong { font-size: 1.4rem; font-weight: 800; letter-spacing: 2px; }
.winner-name { font-weight: 600; font-size: 0.93rem; margin: 0; }
.winner-date { font-size: 0.8rem; color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------
   ADMIN EXTRA IMAGES GALLERY
   ------------------------------------------------------------ */
.extra-images-gallery { margin-top: 4px; }
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}
.gallery-item {
    position: relative;
    width: 120px; height: 90px;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid var(--border);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-delete-form { position: absolute; top: 4px; right: 4px; margin: 0; }
.btn-icon-danger {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(220,38,38,0.85);
    color: #fff;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
.btn-icon-danger:hover { background: #dc2626; }

@media (max-width: 600px) {
    .home-search-form { flex-direction: column; }
    .carousel { aspect-ratio: 4/3; }
    .winners-grid { grid-template-columns: 1fr; }
    .share-bar { gap: 6px; }
    .share-btn { font-size: 0.76rem; padding: 6px 10px; }
}
