/* Portal do parceiro MeerkOn: identidade do design "Portal do Parceiro" (Docs/Projeto PME). */
:root {
    --bg: #0E0D12;
    --bg-nav: #121116;
    --card: #16141B;
    --card-active: #1E1B24;
    --line: #2C2820;
    --line-strong: #4A4338;
    --gold: #C9A46A;
    --gold-light: #E2C48F;
    --cream: #F0E8D7;
    --muted: #A39B8E;
    --danger: #E5675B;
    --ok: #5FB37A;
    --serif: 'Instrument Serif', Georgia, serif;
    --sans: 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--cream);
    font-family: var(--sans);
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); }
a:hover { color: var(--gold-light); }

h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0; }
h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.05; }
h2 { font-size: 32px; }
h1 em, h2 em { color: var(--gold); }

button, input, select { font-family: var(--sans); }

.boot { min-height: 100vh; display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; color: var(--muted); }

/* ── Layout ── */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }

.nav {
    flex: 1 1 240px;
    max-width: 100%;
    padding: 28px 20px;
    border-right: 1px solid var(--line);
    background: var(--bg-nav);
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover .who { color: var(--cream); }
.brand img { width: 40px; height: 40px; }
.brand .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .24em; color: var(--gold); }
.brand .who { font-size: 13px; color: var(--muted); }

.nav-links { display: flex; flex-direction: column; gap: 4px; }
.nav-links a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 10px;
    color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px;
}
.nav-links a.active { background: var(--card-active); color: var(--cream); font-weight: 600; }
.nav-links a.active svg { stroke: var(--gold); }

.nav-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.soon { padding: 16px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; }
.soon .label { font-size: 12px; font-weight: 700; letter-spacing: .18em; color: var(--muted); }

.main { flex: 999 1 560px; min-width: 0; padding: 40px 48px 56px; display: flex; flex-direction: column; gap: 36px; }
@media (max-width: 720px) { .main { padding: 24px 16px 40px; } .nav { border-right: none; border-bottom: 1px solid var(--line); gap: 16px; } .nav-foot { display: none; } }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-head .intro { display: flex; flex-direction: column; gap: 10px; }
.lead { margin: 0; font-size: 16px; color: var(--muted); }
.eyebrow-gold { font-size: 13px; font-weight: 700; letter-spacing: .2em; color: var(--gold); }

/* ── Peças ── */
.badge {
    display: inline-flex; align-self: flex-start; align-items: center; gap: 8px;
    padding: 6px 12px; border: 1px solid var(--gold); border-radius: 999px;
    font-size: 13px; font-weight: 600; color: var(--gold);
}
.badge.muted { border-color: var(--muted); color: var(--muted); }
.badge.danger { border-color: var(--danger); color: var(--danger); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 22px; border-radius: 12px; border: none;
    background: var(--gold); color: var(--bg); font-weight: 700; font-size: 15px;
    text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--gold-light); color: var(--bg); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.small { padding: 10px 14px; font-size: 14px; border-radius: 10px; }
.btn.ghost { background: transparent; color: var(--cream); border: 1px solid var(--line-strong); font-weight: 600; }
.btn.ghost:hover { border-color: var(--gold); color: var(--cream); }
.btn.block { width: 100%; height: 52px; border-radius: 14px; font-size: 16px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stat { padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); display: flex; flex-direction: column; gap: 8px; }
.stat .k { font-size: 13px; font-weight: 600; color: var(--muted); }
.stat .v { font-family: var(--serif); font-size: 48px; line-height: 1; }
.stat .v small { font-size: 24px; color: var(--muted); }
.stat .v.gold { color: var(--gold); }
.stat .s { font-size: 13px; color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--line); }
.bar > div { height: 6px; border-radius: 3px; background: var(--gold); }

.section { display: flex; flex-direction: column; gap: 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; color: var(--muted); font-size: 12px; letter-spacing: .12em; padding: 14px 20px; font-weight: 700; }
td { padding: 16px 20px; border-top: 1px solid var(--line); }
td.muted { color: var(--muted); }
td.right { text-align: right; }
.pill { padding: 5px 10px; border-radius: 999px; background: var(--gold); color: var(--bg); font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill.outline { background: transparent; border: 1px solid var(--muted); color: var(--cream); font-weight: 600; }
.checked { color: var(--gold); font-weight: 700; }

.terms { max-width: 640px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); display: flex; flex-direction: column; gap: 16px; }
.terms.featured { border-color: var(--gold); }
.terms h3 { margin: 0; font-size: 20px; font-weight: 700; }
.terms .price { font-family: var(--serif); font-size: 32px; color: var(--gold); white-space: nowrap; }
.terms .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.slots { display: grid; gap: 4px; }
.slots span { height: 10px; border-radius: 3px; background: var(--line); }
.slots span.on { background: var(--gold); }
.stock { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.stepper button { width: 44px; height: 44px; border: none; background: transparent; color: var(--cream); font-size: 20px; cursor: pointer; }
.stepper span { width: 52px; text-align: center; font-weight: 700; font-size: 16px; }

.card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); display: flex; flex-direction: column; gap: 14px; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.field input, .field select, .input {
    height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong);
    background: var(--card); color: var(--cream); font-size: 15px;
}
.field textarea {
    min-height: 110px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-strong);
    background: var(--card); color: var(--cream); font-size: 15px; font-family: var(--sans); resize: vertical;
}
.field.wide { grid-column: 1 / -1; }
.field input.invalid { border-color: var(--danger); }
.datetime { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 8px; }
.datetime input { width: 100%; min-width: 0; box-sizing: border-box; }
.date-box { position: relative; }
.date-box input:first-child { padding-right: 44px; }
.date-box .calendar {
    position: absolute; top: 0; right: 0; width: 44px; height: 44px; border: none; background: transparent;
    color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.date-box .calendar:hover, .date-box .calendar:focus-visible { color: var(--gold); }
/* Só serve para abrir o calendário; fica embaixo do ícone para o popup abrir ali. */
.date-box .native-picker {
    position: absolute; right: 0; bottom: 0; width: 44px; height: 44px; opacity: 0; pointer-events: none;
    padding: 0; border: none; color-scheme: dark;
}
.datetime .time { text-align: center; padding: 0 8px; }

/* Avisos do estoque (Home) */
.notices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.notice-item a {
    display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 12px;
    border: 1px solid var(--line); border-left: 3px solid var(--gold); background: var(--card); color: var(--cream);
}
.notice-item.released a { border-left-color: var(--ok); }
.notice-item.unread a { border-color: var(--line-strong); }
.notice-item.unread strong::after { content: " •"; color: var(--gold); }
.notice-item span { font-size: 14px; }

/* Estoque dividido (detalhe do evento) */
.stock-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stock-split .cell { padding: 12px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 2px; }
.stock-split .cell .n { font-size: 26px; font-weight: 700; }
.stock-split .cell .k { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.stock-split .cell.paid .n { color: var(--gold); }
.stock-split .cell.free .n { color: var(--ok); }
.slots span.reserved { background: transparent; border: 1px dashed var(--gold); }
.reservations { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.reservations li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sell-offline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sell-offline .btn { min-height: 48px; }
.ok-text { color: var(--ok); font-size: 14px; }
@media (max-width: 520px) {
    .stock-split .cell .n { font-size: 22px; }
    .sell-offline .btn { width: 100%; justify-content: center; }
}
.field-status:empty { display: none; }
.field-status.error { font-size: 13px; color: var(--danger); }
.cover { width: 100%; max-width: 420px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.alert { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--danger); color: var(--danger); background: #2A1715; }
.notice { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-strong); color: var(--cream); background: var(--card); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--cream); font-weight: 600; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--cream); border-color: var(--cream); color: var(--bg); font-weight: 700; }

.feed { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.feed li { display: flex; gap: 16px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.feed .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); flex: none; }
.feed .dot.hollow { background: transparent; border: 1.5px solid var(--muted); }

/* ── Perfil ── */
.profile { max-width: 640px; }
.profile dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 16px 24px; align-items: baseline; }
.profile dt { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.profile dd { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.profile .code { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile .code span { font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
@media (max-width: 520px) { .profile dl { grid-template-columns: 1fr; gap: 4px; } .profile dd { margin-bottom: 12px; } }

/* ── Check-in no celular ── */
.public { max-width: 640px; margin: 0 auto; min-height: 100vh; padding: 32px 16px 48px; display: flex; flex-direction: column; gap: 24px; }
.public header { display: flex; align-items: center; gap: 12px; }
.public header img { width: 36px; height: 36px; }
.public header .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--gold); }
.public .check-terms { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted); }
.public .check-terms input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); }
.mobile { max-width: 430px; margin: 0 auto; min-height: 100vh; padding: 28px 20px; display: flex; flex-direction: column; gap: 22px; }
.mobile header { display: flex; align-items: center; gap: 12px; }
.mobile header img { width: 36px; height: 36px; }
.mobile header .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--gold); }
.mobile header .title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.counter { display: flex; align-items: baseline; justify-content: space-between; }
.counter .n { font-family: var(--serif); font-size: 44px; line-height: 1; }
.counter .n small { font-size: 22px; color: var(--muted); }
.viewfinder { position: relative; width: 100%; aspect-ratio: 1; border-radius: 24px; background: #1A1820; overflow: hidden; }
.viewfinder #reader { width: 100%; height: 100%; }
.viewfinder #reader video { object-fit: cover; }
.center { text-align: center; margin: 0; }
.result { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center; }
.result .circle { width: 132px; height: 132px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; }
.result .circle.bad { background: var(--danger); }
.result h1 { font-size: 48px; }
.result .who { width: 100%; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); display: flex; flex-direction: column; gap: 6px; }
.result .who .name { font-size: 26px; font-weight: 700; }
.result .who .meta { font-size: 16px; color: var(--muted); }
.actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.guest-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.guest-row .meta { font-size: 13px; color: var(--muted); }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 20px; background: #2A1715; color: var(--cream); z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

/* Documentos da conta parceiro */
.doc-input { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.doc-input:first-of-type { border-top: 0; }
.doc-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.doc-input input[type=file] { color: var(--muted); font-size: 14px; max-width: 100%; }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; }
.radio-row label { display: flex; gap: 8px; align-items: center; font-size: 15px; color: var(--cream); letter-spacing: 0; font-weight: 400; }
