/* ============================================================================
   Minha Festa VIP — Design System (Admin White)
   ----------------------------------------------------------------------------
   CSS próprio, sem etapa de build (compatível com hospedagem compartilhada
   sem Node). Tokens em :root; visual claro, enterprise, com um único acento
   violeta usado com moderação. Mobile first.

   NOTA (Fase 2): quando o volume de telas crescer, o pipeline de utilitários
   Tailwind (via Tailwind CLI standalone, sem Node em produção) será adicionado
   e este arquivo passará a conter apenas tokens + componentes de base.
   ============================================================================ */

:root {
    --bg:            #f6f7f9;
    --surface:       #ffffff;
    --border:        #e5e7eb;
    --border-strong: #d1d5db;
    --text:          #111827;
    --text-muted:    #6b7280;
    --text-subtle:   #9ca3af;

    --primary:       #6d28d9;
    --primary-hover: #5b21b6;
    --primary-soft:  #f5f3ff;
    --primary-ring:  rgba(109, 40, 217, .35);

    --danger:        #dc2626;
    --danger-soft:   #fef2f2;
    --success:       #16a34a;
    --success-soft:  #f0fdf4;
    --warning:       #d97706;

    --radius:   10px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow:    0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-lg: 0 10px 25px -5px rgba(16, 24, 40, .12), 0 8px 10px -6px rgba(16, 24, 40, .06);

    --sidebar-w: 256px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Utilitários mínimos --------------------------------------------------- */
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }

/* --- Botões ---------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 18px;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
    text-decoration: none;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.btn-primary { background: var(--primary); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { background: #f9fafb; text-decoration: none; }

/* --- Campos de formulário -------------------------------------------------- */
.field { margin-bottom: 18px; }
.label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #374151; }
.input {
    width: 100%; height: 44px; padding: 0 14px;
    background: #fff; border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); font-size: 15px; color: var(--text);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder { color: var(--text-subtle); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }

/* --- Alertas --------------------------------------------------------------- */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; }
.alert-error { background: var(--danger-soft); color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: var(--success-soft); color: #166534; border: 1px solid #bbf7d0; }

/* ============================================================================
   Layout de autenticação (login) — painel dividido em duas colunas no desktop
   ============================================================================ */
.auth {
    min-height: 100vh; display: grid; grid-template-columns: 1fr;
}
.auth__brandside {
    display: none;
    background: linear-gradient(155deg, #4c1d95 0%, #6d28d9 55%, #7c3aed 100%);
    color: #fff; padding: 48px;
    flex-direction: column; justify-content: space-between;
}
.auth__formside {
    display: flex; align-items: center; justify-content: center;
    padding: 32px 20px; min-height: 100vh;
}
.auth__card { width: 100%; max-width: 400px; }
.auth__logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.auth__title { font-size: 24px; font-weight: 700; margin: 28px 0 6px; letter-spacing: -.01em; }
.auth__quote { font-size: 22px; font-weight: 600; line-height: 1.35; max-width: 420px; }
.auth__brandfoot { font-size: 13px; opacity: .8; }

.logo-mark {
    width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 16px;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 900px) {
    .auth { grid-template-columns: 1.05fr 1fr; }
    .auth__brandside { display: flex; }
}

/* ============================================================================
   Shell administrativo (sidebar + topbar + conteúdo)
   ============================================================================ */
.shell { min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
    background: var(--surface); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; padding: 18px 14px;
    transform: translateX(-100%); transition: transform .2s ease; z-index: 40;
}
.sidebar.is-open { transform: translateX(0); }
.sidebar__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; padding: 6px 8px 18px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--text-subtle); padding: 14px 10px 6px; }
.nav__item {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px;
    border-radius: var(--radius-sm); color: #374151; font-size: 14px; font-weight: 500;
}
.nav__item:hover { background: #f9fafb; text-decoration: none; }
.nav__item.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav__icon { width: 18px; height: 18px; flex-shrink: 0; }

.topbar {
    position: sticky; top: 0; z-index: 30;
    height: 60px; background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 12px; padding: 0 18px;
}
.topbar__title { font-weight: 600; font-size: 15px; }
.topbar__spacer { flex: 1; }
.icon-btn {
    width: 40px; height: 40px; border: 1px solid var(--border); background: #fff;
    border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-muted);
}
.icon-btn:hover { background: #f9fafb; }

.usermenu { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft);
    color: var(--primary); font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px;
}

.content { padding: 24px 18px 48px; }
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 4px; }

/* Cards de indicadores */
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 20px; }
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
}
.card__label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.card__value { font-size: 30px; font-weight: 700; margin-top: 8px; letter-spacing: -.02em; }
.card__hint { font-size: 12px; color: var(--text-subtle); margin-top: 6px; }

.panel {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); margin-top: 20px;
}

.backdrop {
    position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 35; display: none;
}
.backdrop.is-open { display: block; }

@media (min-width: 1024px) {
    .sidebar { transform: translateX(0); }
    .shell__main { margin-left: var(--sidebar-w); }
    .menu-toggle { display: none; }
    .backdrop { display: none !important; }
    .cards { grid-template-columns: repeat(4, 1fr); }
    .content { padding: 28px 32px 56px; }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
}

/* Acessibilidade: respeitar preferência por menos movimento */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* ============================================================================
   Fase 2 — Eventos (listagem, formulário, detalhe)
   ============================================================================ */

/* Botões: no contexto do painel os botões têm largura automática (o 100% do
   .btn-primary é específico do formulário de login). */
.page-head .btn, .page-head__actions .btn, .toolbar .btn, .table .btn,
.form-actions .btn, .danger-zone .btn, .pagination .btn, .empty-state .btn,
.invite-preview + .btn { width: auto; }

.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; text-decoration: none; }
.btn.is-disabled { opacity: .5; pointer-events: none; }

/* Cabeçalho de página com ação à direita */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Barra de busca */
.toolbar { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .input { width: auto; flex: 1 1 260px; height: 42px; }

/* Tabela */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table thead th {
    text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted);
    border-bottom: 1px solid var(--border); background: #fafafa;
}
.table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafafa; }
.table__actions { text-align: right; white-space: nowrap; }
.table__actions .btn { margin-left: 4px; }
.link-strong { font-weight: 600; color: var(--text); }
.link-strong:hover { color: var(--primary); }

/* Badges de status/tipo */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; line-height: 1.5;
}
.badge--success { background: var(--success-soft); color: #166534; border: 1px solid #bbf7d0; }
.badge--muted   { background: #f3f4f6; color: #4b5563; border: 1px solid var(--border); }
.badge--neutral { background: var(--primary-soft); color: var(--primary-hover); border: 1px solid #ddd6fe; }

/* Paginação */
.pagination { display: flex; align-items: center; gap: 14px; margin-top: 16px; justify-content: center; }
.pagination__info { font-size: 13px; color: var(--text-muted); }

/* Estado vazio */
.empty-state { text-align: center; padding: 40px 20px; }

/* Formulário */
.form { max-width: 760px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--border); }
textarea.input { height: auto; min-height: 104px; padding: 10px 14px; resize: vertical; font-family: inherit; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
input[type="file"].input { height: auto; padding: 9px 12px; background: #fff; }
.input.has-error { border-color: var(--danger); }
.input.has-error:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .25); }
.field-error { display: block; margin-top: 6px; font-size: 13px; color: var(--danger); }

/* Detalhe / preview */
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.section-title { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
.def-list { margin: 0; display: grid; gap: 12px; }
.def-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 8px; }
.def-list dt { color: var(--text-muted); font-size: 13px; margin: 0; }
.def-list dd { margin: 0; font-size: 14px; }
.code-inline { background: #f3f4f6; border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 13px; }
.invite-preview img { width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); display: block; }
.invite-preview { display: flex; flex-direction: column; gap: 6px; }
.danger-zone {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px; border: 1px solid #fecaca; background: var(--danger-soft); border-radius: var(--radius-sm); flex-wrap: wrap;
}

/* Card clicável (dashboard) */
.card--link { display: block; text-decoration: none; color: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.card--link:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow); }

/* Responsivo */
@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .def-list > div { grid-template-columns: 110px 1fr; }
}

/* ============================================================================
   Fase 3 — Convidados (contexto do evento, filtros, grupos, importação)
   ============================================================================ */

/* Cabeçalho de contexto + abas */
.ctx-head { margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.ctx-head__title { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.ctx-back { color: var(--text-muted); }
.ctx-sep { margin: 0 6px; color: var(--text-subtle); }
.ctx-name { color: var(--text); font-weight: 600; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
    padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--text-muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }

/* Chips de resumo por status */
.status-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    padding: 6px 14px; font-size: 13px; color: var(--text-muted);
}
.chip strong { color: var(--text); margin-right: 2px; }

/* Barra de filtros: selects com largura automática */
.toolbar--filters .input { flex: 0 1 auto; width: auto; min-width: 150px; }
.toolbar--filters input[type="search"] { flex: 1 1 240px; }

.badge--danger { background: var(--danger-soft); color: #991b1b; border: 1px solid #fecaca; }

/* Grupos e categorias — CRUD inline */
.inline-add { display: flex; gap: 8px; margin-bottom: 8px; }
.inline-add .input { flex: 1; }
.inline-add .btn { width: auto; }
.item-list { list-style: none; margin: 8px 0 0; padding: 0; }
.item-row {
    display: flex; align-items: center; gap: 10px; padding: 10px 0;
    border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.item-row:last-child { border-bottom: none; }
.item-edit { display: flex; gap: 6px; align-items: center; flex: 1 1 220px; }
.item-edit .input { flex: 1; height: 38px; }
.item-edit .btn, .item-row .btn { width: auto; }
.item-count { white-space: nowrap; }

/* Lista de ajuda (importação) */
.help-list { margin: 6px 0 14px; padding-left: 18px; }
.help-list li { margin-bottom: 4px; font-size: 14px; }

/* ============================================================================
   Fase 4 — Confirmação (RSVP): área pública + elementos do painel
   ============================================================================ */

/* Chips extras */
.chip--ok { border-color:#bbf7d0; }
.chip--ok strong { color: var(--success, #16a34a); }
.chip--no { border-color:#fecaca; }
.chip--no strong { color:#dc2626; }
.chip--count { background: var(--primary-soft, #f5f3ff); border-color: #ddd6fe; }
.chip--count strong { color: var(--primary); }

button.is-copied { color: var(--success, #16a34a) !important; }

/* Área pública */
.public-body {
    margin: 0; min-height: 100vh; background: linear-gradient(160deg,#faf5ff 0%, #f8fafc 60%);
    display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px;
}
.public-wrap { width: 100%; max-width: 560px; }
.public-foot { text-align: center; color: var(--text-subtle,#94a3b8); font-size: 12px; margin-top: 18px; }

.invite-card {
    background: var(--surface,#fff); border: 1px solid var(--border,#e5e7eb);
    border-radius: 18px; overflow: hidden; box-shadow: 0 12px 40px rgba(76,29,149,.08);
}
.invite-hero { background:#f1f5f9; }
.invite-hero img { display:block; width:100%; max-height:340px; object-fit:cover; }
.invite-body { padding: 28px 26px; }
.invite-body--center { text-align:center; }
.invite-kicker { text-transform:uppercase; letter-spacing:.08em; font-size:12px; color:var(--primary); font-weight:700; margin:0 0 6px; }
.invite-title { font-size: 26px; line-height:1.2; margin:0 0 14px; color:var(--text,#0f172a); }
.invite-meta { margin:6px 0; color:var(--text-muted,#475569); font-size:15px; }
.invite-desc { margin:16px 0 0; color:var(--text-muted,#475569); line-height:1.6; }
.invite-note { margin-top:22px; padding:14px 16px; background:var(--primary-soft,#f5f3ff); border-radius:12px; color:var(--text-muted,#475569); font-size:14px; }
.invite-note p { margin:0; }

/* Formulário de RSVP */
.rsvp-form { margin-top: 8px; }
.rsvp-current { margin: 4px 0 18px; padding:12px 14px; background:#f8fafc; border:1px solid var(--border,#e5e7eb); border-radius:10px; font-size:14px; color:var(--text-muted,#475569); }
.rsvp-choice { border:0; padding:0; margin:0 0 14px; display:flex; gap:10px; flex-wrap:wrap; }
.rsvp-opt { flex:1 1 180px; display:flex; align-items:center; gap:10px; padding:14px 16px; border:2px solid var(--border,#e5e7eb); border-radius:12px; cursor:pointer; font-weight:600; }
.rsvp-opt:has(input:checked) { border-color:var(--primary); background:var(--primary-soft,#f5f3ff); }
.rsvp-opt input { accent-color:var(--primary); width:18px; height:18px; }
.rsvp-companions { margin-top: 4px; }
.btn-block { width:100%; justify-content:center; margin-top: 8px; }

/* Confirmação familiar */
.rsvp-member { padding:14px 0; border-bottom:1px solid var(--border,#e5e7eb); }
.rsvp-member:last-of-type { border-bottom:0; }
.rsvp-member.has-error { background:#fff1f2; border-radius:8px; padding:14px 10px; }
.rsvp-member__name { font-weight:600; margin-bottom:8px; }
.rsvp-member__controls { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.rsvp-pill { display:inline-flex; align-items:center; gap:6px; padding:8px 12px; border:2px solid var(--border,#e5e7eb); border-radius:999px; cursor:pointer; font-size:14px; }
.rsvp-pill:has(input:checked) { border-color:var(--primary); background:var(--primary-soft,#f5f3ff); }
.rsvp-pill input { accent-color:var(--primary); }
.rsvp-comp { display:inline-flex; align-items:center; gap:6px; font-size:14px; color:var(--text-muted,#475569); margin-left:auto; }
.rsvp-comp .input { width:72px; height:38px; }

.rsvp-done-mark { font-size:44px; margin-bottom:6px; }

/* ============================================================
   Fase 6 — Relatórios (cards, donut, barras, linha do tempo)
   ============================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.stat-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-num { font-size: 1.8rem; font-weight: 700; line-height: 1; color: #111827; }
.stat-label { font-size: .8rem; color: var(--muted, #6b7280); }

.rep-donut-wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.rep-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rep-legend li { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.rep-legend strong { margin-left: auto; }
.rep-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.rep-bars { display: grid; gap: 10px; }
.rep-bar-row { display: grid; grid-template-columns: 120px 1fr 40px; align-items: center; gap: 10px; }
.rep-bar-label { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-bar-track { background: #eef0f4; border-radius: 6px; height: 16px; overflow: hidden; }
.rep-bar-fill { display: flex; height: 100%; border-radius: 6px; overflow: hidden; }
.rep-bar-fill > span { display: block; height: 100%; }
.rep-bar-value { font-size: .85rem; font-weight: 600; text-align: right; }

.rep-timeline { display: flex; align-items: flex-end; gap: 8px; height: 160px; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; }
.rep-tl-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 34px; height: 100%; justify-content: flex-end; }
.rep-tl-bars { display: flex; align-items: flex-end; gap: 3px; height: 100%; }
.rep-tl-bars > span { width: 10px; border-radius: 3px 3px 0 0; min-height: 2px; }
.rep-tl-date { font-size: .7rem; color: var(--muted, #6b7280); white-space: nowrap; }

.rep-filter { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rep-filter .input { padding: 4px 8px; }

/* ============================================================
   Fase 7 — Check-in / recepção (mobile-first), QR e ingresso
   ============================================================ */
.input-lg { padding: 12px 14px; font-size: 1.05rem; }
.btn-lg { padding: 12px 18px; font-size: 1.02rem; }
.btn-xl { padding: 16px 26px; font-size: 1.15rem; width: 100%; max-width: 340px; }

.checkin-scoreboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.ci-score { background: var(--surface,#fff); border: 1px solid var(--border,#e5e7eb); border-radius: 12px; padding: 14px; text-align: center; }
.ci-num { display: block; font-size: 1.9rem; font-weight: 700; line-height: 1; color: #111827; }
.ci-lbl { font-size: .78rem; color: var(--muted,#6b7280); }

.checkin-search { display: flex; gap: 8px; margin-bottom: 16px; }
.checkin-search .input { flex: 1; }

.checkin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checkin-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--border,#e5e7eb); border-radius: 12px; flex-wrap: wrap; }
.ci-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ci-name { font-weight: 600; font-size: 1.05rem; }
.ci-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ci-action .ci-confirm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.checkin-confirm { max-width: 420px; margin: 8vh auto 0; text-align: center; padding: 0 16px; }
.ci-badge-big { display: inline-block; padding: 14px 22px; border-radius: 14px; font-size: 1.2rem; font-weight: 700; }
.ci-badge-big--ok { background: #dcfce7; color: #166534; }
.ci-badge-big--no { background: #fee2e2; color: #991b1b; }

.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.qr-card { border: 1px dashed #cbd5e1; border-radius: 12px; padding: 14px; text-align: center; background: #fff; }
.qr-img svg { width: 100%; height: auto; max-width: 150px; }
.qr-name { font-weight: 600; margin-top: 8px; }
.qr-event { font-size: .8rem; }

.ticket-card { max-width: 380px; margin: 4vh auto; background: #fff; border-radius: 18px; padding: 26px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.ticket-event { color: var(--muted,#6b7280); margin: 0; }
.ticket-name { font-size: 1.5rem; margin: 4px 0 10px; }
.ticket-qr { margin: 18px auto; }
.ticket-qr svg { width: 100%; height: auto; max-width: 260px; }
.ticket-hint { margin: 6px 0 0; }

@media (max-width: 640px) {
    .checkin-item { align-items: stretch; }
    .ci-action, .ci-action form, .ci-action .btn { width: 100%; }
    .btn-xl { max-width: none; }
}

@media print {
    .no-print, .app-nav, .tabs, .flash, header, nav { display: none !important; }
    .qr-card { break-inside: avoid; }
    body { background: #fff; }
}

/* ============================================================
   Fase 8 — Acessibilidade, auditoria, LGPD
   ============================================================ */

/* Skip link: visível apenas ao receber foco (teclado). */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
    background: var(--accent, #6d28d9);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 8px 0;
    font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Conteúdo só para leitores de tela. */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* Foco visível e consistente para navegação por teclado (WCAG 2.4.7). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--accent, #6d28d9);
    outline-offset: 2px;
    border-radius: 4px;
}
main:focus { outline: none; }

.audit-filter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
}
.audit-filter .field--actions { display: flex; gap: 8px; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.legal { max-width: 720px; margin: 0 auto; line-height: 1.7; }
.legal h1 { margin-bottom: 4px; }
.legal h2 { margin-top: 24px; font-size: 1.15rem; }
.legal p { margin: 8px 0; }

.public-foot a { color: inherit; }

/* Ações de LGPD no formulário do convidado. */
.lgpd-box {
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    background: #fafafa;
}
.lgpd-box h3 { margin: 0 0 6px; font-size: 1rem; }
.lgpd-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
