:root {
  --bg: #0c0c0d;
  --bg-elev: #131315;
  --surface: #17171a;
  --surface-2: #1f1f23;
  --surface-3: #27272c;
  --border: #2a2a30;
  --border-soft: #222227;
  --text: #f4f4f5;
  --text-2: #b4b4bb;
  --muted: #85858e;
  --gold: #d9b24c;
  --gold-2: #f0d27e;
  --gold-soft: rgba(217, 178, 76, 0.12);
  --gold-line: rgba(217, 178, 76, 0.35);
  --ok: #34c77b;
  --ok-soft: rgba(52, 199, 123, 0.14);
  --warn: #f0a92e;
  --warn-soft: rgba(240, 169, 46, 0.14);
  --danger: #ef5b52;
  --danger-soft: rgba(239, 91, 82, 0.14);
  --silver: #c7ccd4;
  --bronze: #d08a52;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px rgba(0, 0, 0, 0.35);
  --sidebar: 248px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv11" 1;
}
button { font: inherit; color: inherit; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 17px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.centro { text-align: center; }
.pad { padding: 18px 4px; }
.forte { font-weight: 700; }
.riscado { text-decoration: line-through; opacity: 0.6; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ic { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Splash ---------- */
.splash { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--surface-3); border-top-color: var(--gold); border-radius: 50%; animation: gira 0.8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- Formulários ---------- */
input, select {
  width: 100%;
  min-width: 0;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: #5f5f68; }
input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
input[type="date"] { color-scheme: dark; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2385858e' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.opcional { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 4px; }
.form-linha { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-linha-proc { grid-template-columns: 1fr 140px; }
.form-linha-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-inline { display: flex; gap: 8px; width: 100%; flex-wrap: wrap; }
.form-inline input:first-child { flex: 1 1 180px; }
.input-pts { width: 110px !important; flex: 0 0 110px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: transform 0.08s, background 0.15s, border-color 0.15s, filter 0.15s;
}
.btn:hover { border-color: #3a3a42; background: var(--surface-3); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn-primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #17130a; border-color: transparent; }
.btn-primary:hover { filter: brightness(1.06); background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-color: transparent; }
.btn-ok { background: var(--ok); color: #06210f; border-color: transparent; }
.btn-ok:hover { background: var(--ok); filter: brightness(1.08); }
.btn-perigo { background: var(--danger); color: #fff; border-color: transparent; }
.btn-perigo:hover { background: var(--danger); filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-bloco { width: 100%; }
.btn-grande { padding: 15px 18px; font-size: 15px; border-radius: 14px; }
.btn-icone {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; background: transparent; border: 1px solid transparent; color: var(--muted); cursor: pointer;
}
.btn-icone:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-icone-sm { width: 32px; height: 32px; }
.btn-icone-sm .ic { width: 16px; height: 16px; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1200px 500px at 50% -10%, rgba(217, 178, 76, 0.10), transparent 60%), var(--bg); }
.login-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; padding: 32px 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px; text-align: center;
}
.login-card .form { text-align: left; margin-top: 6px; }
.marca {
  width: 60px; height: 60px; margin: 0 auto 4px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(240, 210, 126, 0.18), rgba(217, 178, 76, 0.05)); border: 1px solid var(--gold-line); color: var(--gold-2);
}
.marca .ic { width: 28px; height: 28px; }
.alerta { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13.5px; text-align: left; }
.alerta-erro { background: var(--danger-soft); color: #ff9a93; }

/* ---------- Estrutura ---------- */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--bg-elev);
  border-right: 1px solid var(--border-soft); display: flex; flex-direction: column; padding: 20px 14px; gap: 22px; z-index: 5;
}
.sidebar-marca, .topbar-marca { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.01em; font-size: 16px; }
.sidebar-marca .ic, .topbar-marca .ic { color: var(--gold); width: 22px; height: 22px; }
.sidebar-marca { padding: 0 8px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  background: none; border: none; color: var(--text-2); font-weight: 600; font-size: 14px; cursor: pointer; text-align: left; position: relative;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.ativo { background: var(--gold-soft); color: var(--gold-2); }
.nav-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--border-soft); }
.sidebar-user-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sidebar-user-info strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info span { font-size: 12px; color: var(--muted); }

.topbar, .bottom-nav { display: none; }
.conteudo { margin-left: var(--sidebar); padding: 32px clamp(16px, 4vw, 40px) 48px; max-width: calc(var(--sidebar) + 1040px); display: flex; flex-direction: column; gap: 18px; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-2); font-weight: 700; font-size: 13px; letter-spacing: 0.02em;
}
.avatar-g { width: 52px; height: 52px; font-size: 16px; }

/* ---------- Páginas ---------- */
.pagina-topo { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.select-campanha, .select-filtro { width: auto; max-width: 100%; min-width: 220px; }
.select-filtro { min-width: 200px; padding-top: 8px; padding-bottom: 8px; font-size: 14px; }

.card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-ativa { background: var(--ok-soft); color: var(--ok); }
.chip-agendada { background: var(--warn-soft); color: var(--warn); }
.chip-encerrada { background: var(--surface-3); color: var(--muted); }

.badge { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.badge-pendente { background: var(--warn-soft); color: var(--warn); }
.badge-aprovado { background: var(--ok-soft); color: var(--ok); }
.badge-recusado { background: var(--danger-soft); color: var(--danger); }

/* ---------- Hero do barbeiro ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 22px;
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(240, 210, 126, 0.20), transparent 60%),
    linear-gradient(160deg, #221d10, #151412 60%);
  border: 1px solid var(--gold-line); box-shadow: var(--shadow);
}
.hero-topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-prazo { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.hero-prazo .ic { width: 15px; height: 15px; }
.hero-titulo { font-size: 22px; font-weight: 800; margin-top: 14px; letter-spacing: -0.02em; }
.hero-periodo { color: var(--text-2); font-size: 13.5px; }
.hero-numeros { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 20px; }
.hero-label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); }
.hero-pts { font-size: 54px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; background: linear-gradient(180deg, #fff3cc, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-pos { text-align: right; }
.hero-pos strong { font-size: 34px; font-weight: 800; line-height: 1; }
.hero-pend, .hero-premio { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13.5px; color: var(--text-2); }
.hero-pend { color: var(--warn); }
.hero-premio .ic { color: var(--gold); }
.hero-pend .ic, .hero-premio .ic { width: 16px; height: 16px; }

/* ---------- Top 3 ---------- */
.top3 { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.top3-item, .minha-pos {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid transparent;
}
.top3-pos { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex-shrink: 0; background: var(--surface-3); }
.pos1 .top3-pos { background: linear-gradient(160deg, #ffe08a, #c99a2e); color: #2a1f05; }
.pos2 .top3-pos { background: linear-gradient(160deg, #eef1f5, #9aa1ab); color: #1d2026; }
.pos3 .top3-pos { background: linear-gradient(160deg, #f0b583, #a8643a); color: #2a1406; }
.top3-nome { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top3-pts { font-weight: 800; font-size: 17px; }
.top3-pts small { font-size: 12px; color: var(--muted); font-weight: 600; }
.top3-item.eu, .minha-pos { border-color: var(--gold-line); background: var(--gold-soft); }
.minha-pos .top3-pos { background: var(--gold); color: #17130a; }
.voce { font-style: normal; font-size: 11px; font-weight: 700; color: var(--gold); background: var(--gold-soft); padding: 2px 7px; border-radius: 99px; margin-left: 6px; }
.sep-pontos { display: flex; justify-content: center; gap: 5px; padding: 10px 0; }
.sep-pontos span { width: 4px; height: 4px; border-radius: 50%; background: var(--surface-3); }

/* ---------- Lançar ---------- */
.proc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
/* ---------- Pódio ---------- */
.palco {
  --ouro: #ffd76a; --ouro-2: #c99a2e;
  --prata: #e6e9ee; --prata-2: #9aa1ab;
  --bronze-1: #f0b583; --bronze-2: #a8643a;
  position: relative; display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: clamp(8px, 2.5vw, 20px);
  padding: 34px clamp(4px, 2vw, 24px) 0; margin: -4px -4px 8px; border-radius: 18px; overflow: hidden;
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(255, 215, 106, 0.22), transparent 70%),
    linear-gradient(180deg, #17150f, #111113);
  border: 1px solid rgba(255, 215, 106, 0.16);
}
.palco::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5)); pointer-events: none; }
.palco-vazio { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 16px; text-align: center; }

.degrau { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; gap: 3px; }
.degrau-nome { font-size: 14px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 6px; }
.degrau-pts { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.degrau-pts small { font-size: 12px; font-weight: 600; color: var(--muted); }
.degrau-premio { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; font-size: 11.5px; font-weight: 600; color: var(--text-2); background: rgba(255, 255, 255, 0.05); padding: 3px 8px; border-radius: 99px; }
.degrau-premio span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.degrau-premio .ic { width: 12px; height: 12px; color: var(--gold); }
.degrau .voce { margin: 0; }

.medalha-circ {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px;
  position: relative; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}
.d1 .medalha-circ { width: 74px; height: 74px; font-size: 22px; background: linear-gradient(150deg, var(--ouro), var(--ouro-2)); color: #2a1f05; box-shadow: 0 0 0 4px rgba(255, 215, 106, 0.18), 0 10px 30px rgba(255, 190, 60, 0.35); }
.d2 .medalha-circ { background: linear-gradient(150deg, var(--prata), var(--prata-2)); color: #1d2026; box-shadow: 0 0 0 4px rgba(230, 233, 238, 0.12), 0 8px 22px rgba(0, 0, 0, 0.45); }
.d3 .medalha-circ { background: linear-gradient(150deg, var(--bronze-1), var(--bronze-2)); color: #2a1406; box-shadow: 0 0 0 4px rgba(240, 181, 131, 0.14), 0 8px 22px rgba(0, 0, 0, 0.45); }
.d1 .degrau-pts { font-size: 22px; color: var(--ouro); }
.d2 .degrau-pts { color: var(--prata); }
.d3 .degrau-pts { color: var(--bronze-1); }

.coroa { color: var(--ouro); margin-bottom: -2px; filter: drop-shadow(0 4px 10px rgba(255, 200, 70, 0.55)); animation: flutua 2.6s ease-in-out infinite; }
.coroa .ic { width: 30px; height: 30px; }
@keyframes flutua { 50% { transform: translateY(-4px); } }

.degrau-bloco {
  width: 100%; margin-top: 10px; border-radius: 14px 14px 0 0; display: grid; place-items: start center; padding-top: 12px;
  font-size: 34px; font-weight: 800; transform-origin: bottom; animation: sobe-bloco 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.degrau-bloco span { opacity: 0.9; }
.d1 .degrau-bloco { height: 132px; color: #3a2a06; background: linear-gradient(180deg, var(--ouro), var(--ouro-2)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 -8px 40px rgba(255, 200, 70, 0.25); animation-delay: 0.25s; }
.d2 .degrau-bloco { height: 96px; color: #2b2f36; background: linear-gradient(180deg, var(--prata), var(--prata-2)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55); animation-delay: 0.1s; }
.d3 .degrau-bloco { height: 70px; color: #3a1d0a; background: linear-gradient(180deg, var(--bronze-1), var(--bronze-2)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4); animation-delay: 0.4s; }
@keyframes sobe-bloco { from { transform: scaleY(0); } }

.degrau.eu .medalha-circ { outline: 3px solid var(--gold-2); outline-offset: 3px; }
.degrau.vago { opacity: 0.4; }
.degrau.vago .medalha-circ { background: var(--surface-3) !important; color: var(--muted); box-shadow: none; }
.degrau.vago .degrau-bloco { background: var(--surface-3) !important; color: var(--muted); box-shadow: none; }

@media (max-width: 480px) {
  .palco { padding-top: 26px; }
  .medalha-circ { width: 46px; height: 46px; font-size: 15px; }
  .d1 .medalha-circ { width: 58px; height: 58px; font-size: 18px; }
  .degrau-nome { font-size: 12.5px; }
  .degrau-pts { font-size: 15px; }
  .d1 .degrau-pts { font-size: 18px; }
  .degrau-premio { font-size: 10.5px; padding: 2px 6px; }
  .degrau-bloco { font-size: 26px; }
  .d1 .degrau-bloco { height: 104px; }
  .d2 .degrau-bloco { height: 76px; }
  .d3 .degrau-bloco { height: 56px; }
}
@media (prefers-reduced-motion: reduce) { .degrau-bloco, .coroa { animation: none; } }

/* ---------- Lançamento do dia ---------- */
.campo-dia > span { display: inline-flex; align-items: center; gap: 6px; }
.campo-dia > span .ic { width: 15px; height: 15px; color: var(--gold); }
.campo-dia input { max-width: 260px; font-weight: 600; }
.dia-lista { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.dia-item {
  display: grid; grid-template-columns: 1fr auto 64px; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid transparent; transition: border-color 0.15s, background 0.15s;
}
.dia-item.com-qtd { border-color: var(--gold); background: var(--gold-soft); }
.dia-info { display: flex; flex-direction: column; min-width: 0; }
.dia-info strong { font-size: 14.5px; line-height: 1.3; }
.dia-info .proc-pts { font-size: 12.5px; font-weight: 700; }
.stepper-dia { width: 132px; }
.stepper-dia button { width: 40px; height: 40px; }
.stepper-dia input { padding: 8px 0; }
.dia-sub { text-align: right; font-weight: 800; color: var(--gold-2); font-size: 14px; }
.resumo-fixo { position: sticky; bottom: 12px; z-index: 3; background: rgba(19, 19, 21, 0.95); backdrop-filter: blur(10px); border-style: solid; border-color: var(--gold-line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.resumo .btn:disabled { cursor: not-allowed; }
@media (max-width: 860px) { .resumo-fixo { bottom: calc(76px + var(--safe-bottom)); } }
@media (max-width: 480px) {
  .dia-item { grid-template-columns: 1fr auto; padding: 12px; }
  .dia-sub { display: none; }
  .stepper-dia { width: 120px; }
  .resumo-fixo { flex-wrap: nowrap; }
  .resumo-fixo .btn { width: auto; padding: 11px 14px; }
  .campo-dia input { max-width: none; }
}

/* ---------- Envio (aprovação agrupada) ---------- */
.envio { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.envio-cab { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.envio-itens { list-style: none; display: flex; flex-direction: column; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--border-soft); }
.envio-itens li { display: grid; grid-template-columns: 1fr auto 70px; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.envio-itens li:last-child { border-bottom: none; }
.envio-itens strong { text-align: right; color: var(--gold-2); }
.envio-obs { font-size: 13.5px; color: var(--text-2); font-style: italic; }
.envio .aprov-acoes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.envio .espaco { flex: 1; }
@media (max-width: 480px) {
  .envio-itens li { grid-template-columns: 1fr auto; }
  .envio-itens li .muted { display: none; }
  .envio .espaco { display: none; }
  .envio .aprov-acoes .btn-ok { flex: 1; }
}

/* ---------- Conferência do print com IA ---------- */
.selo { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; vertical-align: middle; white-space: nowrap; }
.selo .ic { width: 11px; height: 11px; }
.selo-ok { background: var(--ok-soft); color: var(--ok); }
.selo-alerta { background: var(--warn-soft); color: var(--warn); }
.selo-neutro { background: var(--surface-3); color: var(--muted); }
.envio-ia { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2); padding: 10px 12px; border-radius: 10px; background: var(--ok-soft); }
.envio-ia .ic { width: 15px; height: 15px; color: var(--ok); margin-top: 2px; }
.envio-ia-alerta { background: var(--warn-soft); }
.envio-ia-alerta .ic { color: var(--warn); }
.spinner-sm { width: 14px; height: 14px; border-width: 2px; display: inline-block; vertical-align: middle; }

/* ---------- Print dos procedimentos ---------- */
.print-upload {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  padding: 22px 16px; border-radius: 14px; border: 1.5px dashed var(--border); background: var(--bg-elev); cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.print-upload:hover { border-color: var(--gold); background: var(--gold-soft); }
.print-upload .ic { width: 26px; height: 26px; color: var(--gold); margin-bottom: 4px; }
.print-upload strong { font-size: 14.5px; color: var(--text); }
.print-preview { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 14px; background: var(--bg-elev); border: 1.5px solid var(--gold-line); }
.print-preview img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.print-preview-info { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.print-preview-info strong { font-size: 13.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sem-print { font-size: 12px; color: var(--muted); padding: 0 6px; align-self: center; }
.btn-print .ic { width: 15px; height: 15px; color: var(--gold); }
.modal-print { max-width: min(92vw, 720px); padding: 14px; }
.modal-print img { width: 100%; max-height: 72vh; object-fit: contain; border-radius: 10px; background: #000; }

/* ---------- Prêmios ---------- */
.premios-cab { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); margin-bottom: 8px; }
.premios-cab .ic { width: 15px; height: 15px; }
.premios { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.premio { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.premio .top3-pos, .premio-input .top3-pos { width: 26px; height: 26px; font-size: 12px; }
.hero-premios { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--gold-line); }
.faixa-premios { padding: 14px 16px; border-radius: var(--radius); background: var(--gold-soft); border: 1px solid var(--gold-line); }
.faixa-premios .premios { flex-direction: row; flex-wrap: wrap; gap: 8px 22px; }
.premios-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.premio-input { display: flex; align-items: center; gap: 8px; }
.podio-premio { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podio-premio .ic, .top3-premio .ic { width: 12px; height: 12px; color: var(--gold); }
.top3-premio { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--text-2); margin-top: 1px; }
@media (max-width: 560px) { .premios-form { grid-template-columns: 1fr; } }

.proc-op {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; text-align: left;
  border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--border); cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.proc-op:hover { border-color: #3a3a42; }
.proc-op.sel { border-color: var(--gold); background: var(--gold-soft); }
.proc-nome { font-weight: 600; font-size: 14px; line-height: 1.3; }
.proc-pts { font-weight: 800; color: var(--gold-2); font-size: 15px; }
.stepper { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-elev); }
.stepper button { width: 46px; background: var(--surface-2); border: none; cursor: pointer; display: grid; place-items: center; color: var(--text-2); }
.stepper button:hover { color: var(--text); background: var(--surface-3); }
.stepper input { border: none; border-radius: 0; text-align: center; font-weight: 700; font-size: 16px; background: transparent; box-shadow: none; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.resumo { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; background: var(--bg-elev); border: 1px dashed var(--border); }
.resumo strong { display: block; font-size: 24px; font-weight: 800; color: var(--gold-2); letter-spacing: -0.02em; }

/* ---------- Listas ---------- */
.lista { list-style: none; display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border-soft); }
.item:last-child { border-bottom: none; }
.item.inativo { opacity: 0.55; }
.item-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.item-ic .ic { width: 16px; height: 16px; }
.item-corpo { flex: 1; min-width: 0; }
.item-titulo { font-size: 14.5px; }
.item-sub { font-size: 12.5px; color: var(--muted); }
.item-motivo { font-size: 12.5px; color: #ff9a93; margin-top: 2px; }
.item-lado { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.item-pts { font-weight: 800; color: var(--gold-2); font-size: 14.5px; }
.mini-stat { text-align: right; }
.mini-stat span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.mini-stat strong { font-size: 20px; font-weight: 800; color: var(--gold-2); }

/* ---------- Aprovações ---------- */
.aprov-lista { display: flex; flex-direction: column; gap: 10px; }
.aprov {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--shadow);
}
.aprov-corpo { display: flex; flex-direction: column; min-width: 0; }
.aprov-corpo span { font-size: 13.5px; color: var(--text-2); }
.aprov-pts { font-size: 20px; font-weight: 800; color: var(--gold-2); }
.aprov-acoes { display: flex; gap: 6px; }

/* ---------- Ranking admin ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 14px 16px; }
.stat span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.stat strong { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.faixa-premio { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius); background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold-2); font-weight: 600; }
.podio { display: flex; justify-content: center; align-items: flex-end; gap: clamp(8px, 3vw, 28px); padding: 6px 0 22px; margin-bottom: 8px; border-bottom: 1px solid var(--border-soft); }
.podio-col { display: flex; flex-direction: column; align-items: center; gap: 4px; width: clamp(92px, 22vw, 150px); text-align: center; }
.podio-nome { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podio-pts { font-size: 13px; color: var(--gold-2); font-weight: 700; }
.podio-bloco { width: 100%; margin-top: 6px; border-radius: 12px 12px 4px 4px; display: grid; place-items: start center; padding-top: 10px; font-weight: 800; font-size: 20px; }
.p1 .podio-bloco { height: 120px; background: linear-gradient(180deg, rgba(255, 224, 138, 0.35), rgba(201, 154, 46, 0.08)); color: #ffe08a; border: 1px solid rgba(255, 224, 138, 0.35); }
.p2 .podio-bloco { height: 88px; background: linear-gradient(180deg, rgba(238, 241, 245, 0.22), rgba(154, 161, 171, 0.05)); color: var(--silver); border: 1px solid rgba(238, 241, 245, 0.2); }
.p3 .podio-bloco { height: 64px; background: linear-gradient(180deg, rgba(240, 181, 131, 0.25), rgba(168, 100, 58, 0.06)); color: var(--bronze); border: 1px solid rgba(240, 181, 131, 0.25); }
.podio-vago { opacity: 0.45; }
.podio-vago .avatar { box-shadow: none !important; }
.p1 .avatar { box-shadow: 0 0 0 2px #ffe08a; }
.p2 .avatar { box-shadow: 0 0 0 2px var(--silver); }
.p3 .avatar { box-shadow: 0 0 0 2px var(--bronze); }

.tabela-wrap { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border-soft); text-align: center; }
.tabela th.esq { text-align: left; }
.tabela td { padding: 12px; border-bottom: 1px solid var(--border-soft); }
.tabela tr:last-child td { border-bottom: none; }
.tabela tr.destaque td { background: rgba(217, 178, 76, 0.04); }
.pos-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); font-weight: 700; font-size: 13px; }
.pos-num.pos1 { background: linear-gradient(160deg, #ffe08a, #c99a2e); color: #2a1f05; }
.pos-num.pos2 { background: linear-gradient(160deg, #eef1f5, #9aa1ab); color: #1d2026; }
.pos-num.pos3 { background: linear-gradient(160deg, #f0b583, #a8643a); color: #2a1406; }

/* ---------- Vazio ---------- */
.vazio { text-align: center; padding: 48px 20px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.vazio p { max-width: 420px; }
.vazio .btn { margin-top: 8px; }
.vazio-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); }
.vazio-ic .ic { width: 24px; height: 24px; }

/* ---------- Modal e toasts ---------- */
.modal-fundo { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: aparece 0.15s ease-out; }
.modal { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); animation: sobe 0.18s ease-out; }
.modal-acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
@keyframes aparece { from { opacity: 0; } }
@keyframes sobe { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

.toasts { position: fixed; top: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: calc(100% - 32px); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); font-weight: 600; font-size: 14px; opacity: 0; transform: translateY(-6px); transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: none; }
.toast .ic { color: var(--ok); }
.toast-erro .ic { color: var(--danger); }

/* ---------- Celular ---------- */
@media (max-width: 860px) {
  .sidebar { display: none; }
  .topbar {
    display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 5;
    padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top, 0px));
    background: rgba(12, 12, 13, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-soft);
  }
  .conteudo { margin-left: 0; padding: 18px 16px calc(96px + var(--safe-bottom)); gap: 16px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    background: rgba(19, 19, 21, 0.92); backdrop-filter: blur(14px); border-top: 1px solid var(--border-soft);
    padding: 6px 6px calc(6px + var(--safe-bottom));
  }
  .bottom-nav .nav-item { flex: 1; flex-direction: column; gap: 3px; padding: 7px 2px; font-size: 11px; justify-content: center; align-items: center; text-align: center; }
  .bottom-nav .nav-item.ativo { background: none; }
  .bottom-nav .nav-item .ic { width: 22px; height: 22px; }
  .bottom-nav .nav-badge { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; font-size: 10.5px; }
  h1 { font-size: 23px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .form-linha-4 { grid-template-columns: 1fr 1fr; }
  .aprov { grid-template-columns: auto 1fr auto; }
  .aprov-acoes { grid-column: 1 / -1; justify-content: flex-end; }
  .select-campanha { min-width: 0; width: 100%; }
  .pagina-topo { align-items: stretch; }
  .pagina-topo > .row { width: 100%; }
  .pagina-topo > .row .select-campanha { flex: 1; width: auto; }
}

@media (max-width: 560px) {
  .tabela .col-proc { display: none; }
  .tabela th, .tabela td { padding: 10px 8px; }
  .tabela th { letter-spacing: 0.03em; }
}

@media (max-width: 480px) {
  .form-linha, .form-linha-proc, .form-linha-4 { grid-template-columns: 1fr; }
  .proc-grid { grid-template-columns: 1fr 1fr; }
  .hero-pts { font-size: 46px; }
  .item { flex-wrap: wrap; }
  .item-lado { width: 100%; justify-content: flex-end; padding-left: 48px; }
  .resumo .btn { width: 100%; }
  .modal-acoes .btn { flex: 1; }
  .card { padding: 16px; }
}

.classificacao { margin-top: 14px; }
.nome-oculto { color: var(--muted); letter-spacing: .5px; }
