@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --navy: #1c2342;
  --navy-2: #2d3560;
  --ink: #1c2342;
  --muted: #6b7088;
  --sand: #f1e6d3;
  --sand-2: #e6d5b8;
  --bg: #fafaf7;
  --card: #ffffff;
  --line: #e4e1da;
  --ok: #2f7a55;
  --warn: #b86a1b;
  --err: #b2394a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 35, 66, .05), 0 8px 24px rgba(28, 35, 66, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px 64px; }
.wrap-wide { max-width: 1240px; }

/* Cabeçalho */
.hero { text-align: center; padding: 28px 0 18px; }
.logo { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; color: var(--navy); }
.logo svg { width: 40px; height: 40px; }
.logo span { font-size: 11px; letter-spacing: .12em; }
.kicker { margin: 18px 0 4px; font-size: 12px; font-weight: 500; letter-spacing: .35em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(28px, 7vw, 40px); font-weight: 400; letter-spacing: -.01em; }
.hero p { margin: 6px 0 0; color: var(--muted); }

.spaced { font-size: 13px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; margin: 0 0 14px; }

/* Cartões e seções */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.step { margin-top: 18px; }
.step-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; letter-spacing: 0; margin-right: 8px; vertical-align: 1px; }
.hint { color: var(--muted); font-size: 14px; margin: -6px 0 14px; }

label.field { display: block; }
.input {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 17px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(28, 35, 66, .12); }
.input-sm { padding: 8px 10px; font-size: 15px; }

/* Opções */
.options { display: grid; gap: 10px; }
.options.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 420px) { .options.cols-2 { grid-template-columns: 1fr; } }

.opt {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s, transform .05s;
}
.opt:hover:not(:disabled) { border-color: var(--navy-2); }
.opt:active:not(:disabled) { transform: scale(.99); }
.opt.is-selected { border-color: var(--navy); background: #f4f5fa; box-shadow: inset 0 0 0 1px var(--navy); }
.opt:disabled { cursor: not-allowed; opacity: .55; background: #f6f5f2; }
.opt .ico { flex: none; width: 38px; height: 38px; color: var(--navy); }
.opt .ico svg { width: 100%; height: 100%; }
.opt-main { flex: 1; min-width: 0; }
.opt-title { display: block; font-weight: 600; letter-spacing: .02em; }
.opt-sub { display: block; font-size: 13px; color: var(--muted); }
.opt-why { display: block; font-size: 13px; color: var(--err); }
.check { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line); display: grid; place-items: center; }
.is-selected .check { background: var(--navy); border-color: var(--navy); }
.is-selected .check::after { content: ''; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.radio { border-radius: 50%; }

.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--sand); font-size: 13px; font-weight: 500; white-space: nowrap; }
.pill-full { background: #f3dcdf; color: var(--err); }
.pill-ok { background: #dcefe4; color: var(--ok); }
.pill-warn { background: #fdf0dc; color: var(--warn); }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px;
  border: 1px solid var(--navy); background: var(--navy); color: #fff; font-weight: 500; letter-spacing: .04em; cursor: pointer;
  text-decoration: none; transition: opacity .15s, background .15s;
}
.btn:hover { background: var(--navy-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: #f0f1f6; }
.btn-danger { background: transparent; color: var(--err); border-color: #e6c3c9; }
.btn-danger:hover { background: #fbeef0; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-end { justify-content: flex-end; }
.spacer { flex: 1; }

.alert { padding: 12px 14px; border-radius: 10px; background: #fbeef0; color: var(--err); font-size: 15px; margin-top: 14px; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-warn { background: #fdf3e6; color: var(--warn); }
.alert-ok { background: #e8f4ed; color: var(--ok); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Agenda pessoal */
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.agenda li:last-child { border-bottom: 0; }
.agenda .when { flex: none; min-width: 104px; }
.agenda .free { color: var(--muted); }

/* Linha do tempo */
.tl { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tl-row { display: grid; grid-template-columns: 110px minmax(520px, 1fr); align-items: center; min-height: 48px; }
.tl-head { min-height: 26px; }
.tl-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; padding-right: 8px; position: sticky; left: 0; background: inherit; z-index: 2; }
.tl-label .ico { width: 22px; height: 22px; color: var(--navy); }
.tl-label .ico svg { width: 100%; height: 100%; }
.tl-track { position: relative; height: 100%; min-height: inherit; border-left: 1px solid var(--line); }
.tl-body { position: relative; }
.tl-body .tl-row + .tl-row { border-top: 1px dashed var(--line); }
.tl-overlay { position: absolute; inset: 0; display: grid; grid-template-columns: 110px minmax(520px, 1fr); pointer-events: none; }
.tl-overlay .tl-label { background: transparent; }
.tl-tick { position: absolute; top: 4px; transform: translateX(-50%); font-size: 11px; color: var(--muted); }
.tl-tick:first-child { transform: none; }
.tl-tick:last-child { transform: translateX(-100%); }
.tl-block {
  position: absolute; top: 5px; bottom: 5px; padding: 4px 8px; border-radius: 8px; overflow: hidden;
  background: #eef0f7; border: 1px solid #d6daea; font-size: 12px; line-height: 1.2;
  display: flex; flex-direction: column; justify-content: center;
}
.tl-block b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-block small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-gincana { background: var(--sand); border-color: var(--sand-2); }
.tl-block.is-ok { background: #e3f1e9; border-color: #bcdcc9; }
.tl-block.is-low { background: #fbf1e2; border-color: #efd7b2; }
.tl-block.is-mine { background: var(--navy); border-color: var(--navy); color: #fff; }
.tl-block.is-mine small { color: #cfd3e6; }
.tl-block.is-dim { opacity: .45; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--err); }
.tl-now span { position: absolute; top: -2px; left: 4px; font-size: 10px; color: var(--err); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; transition: all .25s;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 50; box-shadow: var(--shadow);
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-err { background: var(--err); }

.sticky-foot {
  position: sticky; bottom: 0; margin-top: 18px; padding: 12px 0 16px;
  background: linear-gradient(to top, var(--bg) 70%, rgba(250, 250, 247, 0));
}
.hidden { display: none !important; }

/* Grupo de partidas por jogo */
.game-group + .game-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.game-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.game-head .ico { width: 30px; height: 30px; color: var(--navy); flex: none; }
.game-head .ico svg { width: 100%; height: 100%; }
.game-head b { font-size: 17px; letter-spacing: .02em; }
.game-head small { display: block; color: var(--muted); font-size: 13px; }
.opt .pill { align-self: center; }
@media (max-width: 420px) { .opt { flex-wrap: wrap; row-gap: 6px; } .opt-main { flex-basis: calc(100% - 46px); } .opt .pill { margin-left: 34px; } }
.note { font-size: 13px; color: var(--muted); margin: -4px 0 10px; }

/* Confirmação na página */
dialog.ask { border: 0; border-radius: 16px; padding: 0; width: min(420px, calc(100% - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog.ask::backdrop { background: rgba(28, 35, 66, .4); }
.ask-body { padding: 20px; }
.ask-msg { margin: 0; white-space: pre-line; }
.ask-input { margin-top: 12px; }
.btn-danger-solid { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger-solid:hover { background: #9a2f3f; }


/* Confirmação de presença */
.linkish { border: 0; background: none; padding: 0; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-wide { grid-column: 1 / -1; }
@media (max-width: 480px) { .fields { grid-template-columns: 1fr; } }
.lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
select.input { appearance: auto; }
.opt-tag { font-size: 10px; letter-spacing: .1em; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: 2px; }
.icon-x { flex: none; border: 0; background: transparent; color: var(--err); font-size: 16px; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.icon-x:hover { background: #fbeef0; }
.add-line { border: 1px dashed #d6d3cb; background: transparent; border-radius: 10px; width: 100%; padding: 10px; color: var(--navy); cursor: pointer; font-weight: 500; }
.add-line:hover:not(:disabled) { border-color: var(--navy); }
.add-line:disabled { opacity: .45; cursor: not-allowed; }

/* Seus dados: aviso da portaria e CPF já respondido */
.portaria { margin: -4px 0 14px; padding: 10px 12px; border-radius: 10px; background: #f4f5fa; font-size: 14px; color: var(--navy); }
.cpf-found { padding: 12px 14px; border-radius: 12px; background: #fbf7ef; border: 1px solid var(--sand-2); display: flex; flex-direction: column; gap: 2px; }
.cpf-found span { color: var(--muted); }
.cpf-bad { margin: 0; color: var(--err); font-size: 14px; }
#cpf-msg:empty { display: none; }
