/* Identidade CheckIngresso: laranja quente sobre fundo claro, responsivo. */
:root {
  --laranja: #f4731c;
  --laranja-2: #ff6900;
  --laranja-claro: #fff4ec;
  --amarelo: #fcb900;
  --bg: #f6f7f9;
  --card: #ffffff;
  --border: #e6e8ec;
  --fg: #1f2430;
  --muted: #7a828f;
  --ok: #1a9c5b;
  --warn: #d98a00;
  --danger: #e0492f;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(20,22,30,.06), 0 8px 24px rgba(20,22,30,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--laranja); text-decoration: none; }

/* Topbar */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; background: var(--card); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.brand b { color: var(--laranja); }
.brand small { font-weight: 600; color: var(--muted); font-size: 12px; }
.logo-ci { height: 26px; width: auto; display: block; }
.login-card .logo-ci { height: 34px; }
.brand-sep { width: 1px; height: 26px; background: var(--border); margin: 0 12px; }
.brand-logo { height: 30px; max-width: 150px; object-fit: contain; display: block; }
.evento-banner {
  background: linear-gradient(90deg, var(--laranja-claro), #fff);
  border: 1px solid #f3d9c4; border-left: 3px solid var(--laranja);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px; font-size: 14px;
}
.evento-banner b { color: var(--laranja); }
.evento-banner.fechado { background: #fdecea; border-color: #f5c6bd; border-left-color: var(--danger); }

/* Cabeçalho do evento (hero) — criativo + info pro parceiro */
.evento-hero {
  display: flex; align-items: stretch; gap: 0; margin-bottom: 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.evento-hero .capa {
  width: 150px; min-width: 150px; background: #fff center/contain no-repeat;
  border-right: 1px solid var(--border); padding: 10px;
  background-origin: content-box;
}
.evento-hero .corpo { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.evento-hero .topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.evento-hero h2 {
  margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; color: var(--fg);
  text-transform: none;
}
.evento-hero .infos { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 13.5px; }
.evento-hero .infos span { display: inline-flex; align-items: center; gap: 6px; }
.evento-hero .aviso { font-size: 13px; color: var(--muted); }
.evento-hero .aviso.fechado { color: var(--danger); }
.evento-hero .acoes { display: flex; align-items: center; gap: 10px; margin-left: auto; }
@media (max-width: 560px) {
  .evento-hero { flex-direction: column; }
  .evento-hero .capa { width: 100%; height: 120px; border-right: none; border-bottom: 1px solid var(--border); }
}
.logo-preview { height: 48px; max-width: 200px; object-fit: contain; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,22,30,.45); display: grid; place-items: start center; z-index: 60; padding: 40px 16px; overflow: auto; }
.modal { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 540px; padding: 22px 24px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.modal-head h2 { margin: 0; font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--fg); }
.modal-close { cursor: pointer; border: none; background: none; font-size: 24px; color: var(--muted); line-height: 1; padding: 0 4px; }
.modal-close:hover { color: var(--fg); }

/* Cards de evento (seletor) */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.event-card { text-align: left; cursor: pointer; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); transition: all .15s; }
.event-card:hover { border-color: var(--laranja); box-shadow: var(--shadow); }
.event-card .nome { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.event-card .meta { display: flex; align-items: center; justify-content: space-between; }
.spacer { flex: 1; }
.who { font-size: 13px; color: var(--muted); }
.who b { color: var(--fg); }

/* Layout */
.container { max-width: 980px; margin: 0 auto; padding: 22px 20px 60px; }
.page-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.page-sub { color: var(--muted); margin: 0 0 20px; font-size: 14px; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card h2 { font-size: 14px; font-weight: 700; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; }
.req::after { content: " *"; color: var(--danger); }
input, select {
  width: 100%; padding: 11px 13px; background: #fbfbfc; color: var(--fg);
  border: 1px solid var(--border); border-radius: 10px; font-size: 15px; transition: border-color .15s;
}
input:focus, select:focus { outline: none; border-color: var(--laranja); background: #fff; }
input::placeholder { color: #b8bdc6; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 16px; background: #fff; color: var(--fg); border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.btn:hover { border-color: var(--laranja); color: var(--laranja); }
.btn-accent { background: var(--laranja); border-color: var(--laranja); color: #fff; }
.btn-accent:hover { background: var(--laranja-2); border-color: var(--laranja-2); color: #fff; }
.btn-accent:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn-sm { padding: 7px 11px; font-size: 13px; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Tabela responsiva */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--laranja-claro); color: var(--laranja); }
.pill.ok { background: #e7f7ee; color: var(--ok); }
.pill.warn { background: #fff6e3; color: var(--warn); }
.pill.full { background: #fdecea; color: var(--danger); }
.pill.muted { background: #f0f1f4; color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 36px 16px; font-size: 14px; }
.steps { font-size: 12px; color: var(--muted); }

/* Relatório: KPIs + gráficos */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .num { font-size: 26px; font-weight: 800; color: var(--laranja); letter-spacing: -0.02em; line-height: 1.1; }
.kpi .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .charts { grid-template-columns: 1fr; } }
.barchart { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 116px 1fr 34px; align-items: center; gap: 10px; font-size: 13px; }
.bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fg); }
.bar-track { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; height: 18px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px 0 0 6px; min-width: 3px; transition: width .3s; }
.bar-val { text-align: right; font-weight: 700; color: var(--muted); }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1200px 500px at 50% -10%, var(--laranja-claro), var(--bg)); }
.login-card { width: 100%; max-width: 380px; }
.login-card .brand { font-size: 26px; margin-bottom: 4px; }

/* Toast */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--fg); color: #fff; padding: 12px 18px; border-radius: 10px;
  z-index: 50; max-width: 88vw; box-shadow: var(--shadow); font-size: 14px;
}
.toast.err { background: var(--danger); }

@media (max-width: 560px) {
  .grid2 { grid-template-columns: 1fr; }
  .container { padding: 16px 14px 50px; }
  th, td { padding: 10px 8px; }
  .hide-sm { display: none; }
}
