/* Dello · Gestão de Eventos */
:root {
  --brand: #EC6608;
  --brand-700: #C45404;
  --brand-50: #FFF4EB;
  --brand-100: #FFE4CF;
  --ink: #1A2030;
  --ink-2: #4A5366;
  --mute: #8A92A3;
  --line: #E4E7EE;
  --line-2: #F1F3F7;
  --bg: #F4F5F8;
  --card: #FFFFFF;
  --navy: #15203A;
  --red: #D23B3B;    --red-bg: #FDEDED;
  --amber: #C98A06;  --amber-bg: #FFF5DC;
  --green: #17925A;  --green-bg: #E5F5EC;
  --blue: #2F6FDB;   --blue-bg: #EAF1FD;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 28, 45, .04), 0 6px 20px rgba(20, 28, 45, .05);
  --shadow-lg: 0 24px 64px rgba(15, 20, 35, .22);
  --surface-2: #FBFBFD;
  --row-hover: #FFF9F4;
  --placeholder: #A9AFBC;
  --border-hover: #CDD2DC;
  --warm: #FFFBF8;
  --warm-border: #F2C39F;
  --red-border: #F3C4C4;
  --topbar-bg: rgba(244, 245, 248, .88);
  --switch-off: #D5D9E1;
  --info-ink: #24478A;
  --warn-ink: #7A5406;
  --err-ink: #9B2323;
  --ok-ink: #0F6B40;
  --priv-bg: #EEF0F4;
  --priv-ink: #3D4659;
  --toast-bg: #1A2030;
  --tip-bg: #1A2030;
  --chip-on: #1A2030;
  --chip-on-ink: #FFFFFF;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14.5px/1.5 'Open Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-700); }
h1, h2, h3 { letter-spacing: -.01em; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--mute); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- boot ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 24px; }
.boot img { width: 140px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--brand-100); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 24px 16px 16px; z-index: 40;
}
.side .brand { display: flex; flex-direction: column; gap: 10px; padding: 0 10px 22px; border-bottom: 1px solid var(--line); margin-bottom: 16px; text-decoration: none; }
.side .brand img { width: 118px; }
.side .brand span { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .grp { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink-2); font-weight: 600; text-decoration: none; position: relative; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--line-2); color: var(--ink); }
.nav a.on { background: var(--brand-50); color: var(--brand-700); }
.nav a.on::before { content: ''; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.nav a.on svg { color: var(--brand); }
.nav .badge { margin-left: auto; background: var(--brand); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 1px 8px; }
.side .me { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 6px 0; display: flex; align-items: center; gap: 10px; }
.side .me .who { min-width: 0; flex: 1; }
.side .me .who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #F59A4F); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 22px 36px 18px; position: sticky; top: 0; z-index: 20;
  background: var(--topbar-bg); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.topbar .titles { min-width: 0; flex: 1; }
.topbar h1 { font-size: 23px; font-weight: 800; margin: 0; line-height: 1.2; }
.topbar .sub { color: var(--mute); font-size: 13px; margin-top: 2px; }
.topbar .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.topbar .menu-btn { display: none; }
.content { padding: 6px 36px 56px; width: 100%; max-width: 1320px; }

.demo-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 36px 0; padding: 10px 14px; border-radius: 12px;
  background: var(--navy); color: #dfe5f2; font-size: 13px;
}
.demo-bar b { color: #fff; }
.demo-bar select { height: 32px; background: #243152; color: #fff; border-color: #34436a; width: auto; }
.demo-bar .sp { flex: 1; }

/* ---------- elementos ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 18px; }
.card-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-h h2, .card-h h3 { margin: 0; font-size: 16px; font-weight: 700; }
.card-h .sp { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(236, 102, 8, .28); }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red-border); }
.btn-danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger-solid:hover { background: #B62E2E; border-color: #B62E2E; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--line-2); border-color: transparent; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 9px; }
.icon-btn svg.i { width: 17px; height: 17px; }

.field { display: flex; flex-direction: column; min-width: 0; }
.field > label, .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field .req { color: var(--brand); }
.field .hint { font-size: 12px; color: var(--mute); margin-top: 4px; }
input, select, textarea {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:hover, select:hover, textarea:hover { border-color: var(--border-hover); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(236, 102, 8, .16); }
input.money { text-align: right; font-variant-numeric: tabular-nums; }
.input-icon { position: relative; }
.input-icon svg.i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mute); }
.input-icon input { padding-left: 38px; }
.prefix { position: relative; }
.prefix > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mute); font-size: 13px; pointer-events: none; }
.prefix > input { padding-left: 36px; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.red { color: var(--red); background: var(--red-bg); }
.pill.amber { color: var(--amber); background: var(--amber-bg); }
.pill.green { color: var(--green); background: var(--green-bg); }
.pill.blue { color: var(--blue); background: var(--blue-bg); }
.pill.gray { color: var(--ink-2); background: var(--line-2); }
.pill.nodot::before { display: none; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 6px; background: var(--line-2); color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.brand { background: var(--brand-50); color: var(--brand-700); }

/* ---------- tabelas ---------- */
.tbl-wrap { overflow-x: auto; margin: 0 -22px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 13px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl th:first-child, .tbl td:first-child { padding-left: 22px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 22px; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; transition: background .1s; }
.tbl tr.click:hover { background: var(--row-hover); }
.tbl .ev-name { font-weight: 700; color: var(--ink); min-width: 190px; }
.tbl .ev-sub { font-size: 12.5px; color: var(--mute); display: flex; align-items: center; gap: 4px; }
.tbl .ev-sub svg.i { width: 13px; height: 13px; }
.tbl .acts { display: flex; gap: 4px; justify-content: flex-end; }
.tbl tfoot td { font-weight: 800; border-top: 1px solid var(--line); background: var(--surface-2); }
.seq { font-weight: 700; color: var(--mute); font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 48px 20px; color: var(--mute); }
.empty .ico { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin: 0 auto 14px; }
.empty .ico svg.i { width: 26px; height: 26px; }
.empty h3 { color: var(--ink); margin: 0 0 6px; font-size: 16px; }
.empty p { margin: 0 0 18px; }

/* ---------- painel ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; }
.kpi .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi .ic.brand { background: var(--brand-50); color: var(--brand); }
.kpi .ic.green { background: var(--green-bg); color: var(--green); }
.kpi .ic.amber { background: var(--amber-bg); color: var(--amber); }
.kpi .ic.blue { background: var(--blue-bg); color: var(--blue); }
.kpi .lb { font-size: 12.5px; color: var(--mute); font-weight: 600; }
.kpi .vl { font-size: 22px; font-weight: 800; line-height: 1.25; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .ft { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.dash { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.dash .card + .card { margin-top: 0; }
.dash-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; align-items: end; height: 210px; padding-top: 16px; }
.col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.col .bar { width: 100%; max-width: 34px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #F59A4F, var(--brand)); min-height: 3px; position: relative; transition: height .5s cubic-bezier(.2, .8, .2, 1); }
.col .bar.zero { background: var(--line-2); }
.col .bar:hover::after { content: attr(data-v); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--tip-bg); color: #fff; font-size: 11.5px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; font-weight: 600; z-index: 2; }
.col .m { font-size: 11.5px; color: var(--mute); font-weight: 600; }
.col.now .m { color: var(--brand-700); }

.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar .top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.hbar .top b { font-weight: 700; }
.hbar .top span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.track { height: 9px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.track .fill { height: 100%; background: var(--brand); border-radius: 99px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }

.stack { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--line-2); margin: 6px 0 16px; }
.stack div { height: 100%; }
.legend { display: flex; flex-direction: column; gap: 10px; }
.legend .row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.legend .row .dot { width: 10px; height: 10px; border-radius: 3px; }
.legend .row .sp { flex: 1; }
.legend .row b { font-variant-numeric: tabular-nums; }

.list-ev { display: flex; flex-direction: column; }
.list-ev a { display: flex; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); text-decoration: none; color: inherit; }
.list-ev a:last-child { border-bottom: 0; }
.list-ev a:hover .t { color: var(--brand-700); }
.datebox { width: 46px; flex: none; text-align: center; border-radius: 10px; background: var(--brand-50); color: var(--brand-700); padding: 5px 0; line-height: 1.1; }
.datebox b { display: block; font-size: 17px; font-weight: 800; }
.datebox span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; }
.list-ev .t { font-weight: 700; transition: color .15s; }
.list-ev .s { font-size: 12.5px; color: var(--mute); }
.list-ev .grow { min-width: 0; flex: 1; }
.list-ev .grow > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- filtros ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters .search { flex: 1 1 240px; }
.filters select { width: auto; min-width: 150px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--border-hover); }
.chip.on { background: var(--chip-on); color: var(--chip-on-ink); border-color: var(--chip-on); }
.chip .d { width: 8px; height: 8px; border-radius: 50%; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .sw { width: 36px; height: 21px; border-radius: 99px; background: var(--switch-off); position: relative; transition: background .2s; flex: none; }
.toggle .sw::after { content: ''; position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFE; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.toggle input:checked + .sw { background: var(--brand); }
.toggle input:checked + .sw::after { transform: translateX(15px); }
.toggle input:focus-visible + .sw { box-shadow: 0 0 0 3px rgba(236, 102, 8, .25); }

/* ---------- formulário ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.form-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.form-main .card + .card { margin-top: 0; }
.sec-h { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.sec-n { width: 30px; height: 30px; border-radius: 9px; background: var(--brand-50); color: var(--brand-700); font-weight: 800; display: grid; place-items: center; font-size: 13px; flex: none; }
.sec-h h2 { font-size: 16.5px; margin: 0; font-weight: 700; }
.sec-h p { margin: 1px 0 0; color: var(--mute); font-size: 12.5px; }
.sec-h .sp { flex: 1; }
.sec-h .sub-total { font-weight: 700; color: var(--ink-2); font-size: 13.5px; white-space: nowrap; padding-top: 5px; font-variant-numeric: tabular-nums; }
.sub-h { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 22px 0 12px; display: flex; align-items: center; gap: 10px; }
.sub-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.seg label { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: all .15s; background: var(--card); }
.seg label:hover { border-color: var(--border-hover); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg .d { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px var(--card), 0 0 0 4.5px currentColor; margin: 0 4px; }
.seg label b { display: block; font-size: 14px; }
.seg label small { display: block; font-size: 12px; color: var(--mute); }
.seg .red { color: var(--red); } .seg .amber { color: var(--amber); } .seg .green { color: var(--green); }
.seg label > span:last-child { color: var(--ink); }
.seg label.red.on { border-color: var(--red); background: var(--red-bg); }
.seg label.amber.on { border-color: var(--amber); background: var(--amber-bg); }
.seg label.green.on { border-color: var(--green); background: var(--green-bg); }
.seg label .d { background: transparent; }
.seg label.on .d { background: currentColor; }
.seg label:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(236, 102, 8, .2); }

.items { width: 100%; border-collapse: separate; border-spacing: 0; }
.items th { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); text-align: left; padding: 0 8px 8px 0; }
.items td { padding: 4px 8px 4px 0; vertical-align: middle; }
.items td.it { font-weight: 600; white-space: nowrap; padding-right: 16px; width: 1%; }
.items td.q { width: 96px; }
.items td.v { width: 160px; }
.items td.x { width: 38px; padding-right: 0; }
.items input { height: 38px; }
.items tr.has td.it { color: var(--brand-700); }

.reps { display: flex; flex-direction: column; gap: 12px; }
.rep { border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 16px; background: var(--surface-2); position: relative; transition: border-color .15s; }
.rep:focus-within { border-color: var(--warm-border); background: var(--card); }
.rep-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rep-h .n { font-size: 12px; font-weight: 800; color: var(--brand-700); background: var(--brand-50); border-radius: 6px; padding: 2px 8px; }
.rep-h .sp { flex: 1; }
.rep-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rep-grid .field > label { font-size: 12px; margin-bottom: 4px; }
.rep-grid input, .rep-grid select { height: 38px; }
.rep.compact { padding: 8px 8px 8px 14px; display: flex; align-items: center; gap: 10px; }
.rep.compact .rep-grid { flex: 1; grid-template-columns: 1fr; }
.rep.compact .n { font-size: 12px; font-weight: 800; color: var(--brand-700); background: var(--brand-50); border-radius: 6px; padding: 2px 8px; }
.add-row { margin-top: 12px; border-style: dashed; color: var(--brand-700); border-color: var(--warm-border); background: var(--warm); }
.add-row:hover { background: var(--brand-50); border-color: var(--brand); }
.kbd-hint { font-size: 12px; color: var(--mute); margin-top: 10px; display: flex; align-items: center; gap: 6px; }
kbd { font: 600 11px/1 'Open Sans', sans-serif; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; background: var(--card); color: var(--ink-2); }

.resumo { position: sticky; top: 96px; }
.resumo .card { padding: 20px; }
.resumo .num-ev { font-size: 12px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.resumo .ev-t { font-size: 17px; font-weight: 800; margin: 2px 0 12px; word-break: break-word; }
.resumo .lines { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.resumo .lines div { display: flex; justify-content: space-between; font-size: 13.5px; gap: 8px; }
.resumo .lines span { color: var(--ink-2); }
.resumo .lines b { font-weight: 600; font-variant-numeric: tabular-nums; }
.resumo .lines .z b { color: var(--mute); font-weight: 400; }
.resumo .tot { padding: 14px 0 16px; }
.resumo .tot span { font-size: 12px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.resumo .tot b { display: block; font-size: 28px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1.2; }
.resumo .btns { display: flex; flex-direction: column; gap: 8px; }
.resumo .meta { font-size: 12px; color: var(--mute); margin-top: 14px; line-height: 1.6; }
.savebar { display: none; }

/* ---------- detalhe ---------- */
.det-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.det-head .grow { flex: 1; min-width: 240px; }
.det-head h2 { font-size: 22px; font-weight: 800; margin: 6px 0 4px; }
.det-head .total-box { text-align: right; }
.det-head .total-box span { font-size: 12px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.det-head .total-box b { display: block; font-size: 30px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1.15; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 20px; }
.facts div { background: var(--card); padding: 12px 16px; min-width: 0; }
.facts span { display: block; font-size: 11.5px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.facts b { font-weight: 600; word-break: break-word; }
.det-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.det-grid .card + .card { margin-top: 0; }
.det-grid .full { grid-column: 1 / -1; }
.mini { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mini th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); padding: 0 8px 8px 0; border-bottom: 1px solid var(--line); }
.mini td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.mini tr:last-child td { border-bottom: 0; }
.mini .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini tfoot td { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 700; padding-top: 10px; }
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.person { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 99px; font-weight: 600; font-size: 13px; }

.timeline { display: flex; flex-direction: column; }
.tl { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.tl:last-child { border-bottom: 0; }
.tl .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tl .ic svg.i { width: 16px; height: 16px; }
.tl .ic.criou { background: var(--green-bg); color: var(--green); }
.tl .ic.alterou { background: var(--blue-bg); color: var(--blue); }
.tl .ic.excluiu { background: var(--red-bg); color: var(--red); }
.tl .body { min-width: 0; flex: 1; font-size: 13.5px; }
.tl .when { font-size: 12px; color: var(--mute); }
.tl ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 12.5px; }

/* ---------- relatórios ---------- */
.rep-filters { display: grid; grid-template-columns: 200px minmax(0, 1fr) 190px 230px auto; gap: 14px; align-items: end; }
.report { margin-top: 18px; }
.report-head { display: flex; align-items: center; gap: 18px; padding-bottom: 18px; border-bottom: 2px solid var(--brand); margin-bottom: 18px; }
.report-head img { width: 96px; }
.report-head h2 { margin: 0; font-size: 19px; font-weight: 800; }
.report-head .sp { flex: 1; }
.report-head .meta { text-align: right; font-size: 12px; color: var(--mute); }
.report-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.report-sum div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.report-sum span { display: block; font-size: 11.5px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.report-sum b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.report-sum .hl b { color: var(--brand); }
.rep-ev { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-top: 14px; break-inside: avoid; }
.rep-ev .h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.rep-ev .h b { font-size: 15px; }
.rep-ev .h .sp { flex: 1; }
.rep-ev .h .v { font-weight: 800; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.rep-ev .i { font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.grp-h { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 26px 0 4px; display: flex; gap: 10px; align-items: center; }
.grp-h .sp { flex: 1; height: 1px; background: var(--line); }
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.print-only { display: none; }

/* ---------- usuários ---------- */
.role-sel { width: 150px; height: 36px; }
.info { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--blue-bg); color: var(--info-ink); font-size: 13.5px; margin-bottom: 18px; }
.info svg.i { margin-top: 2px; }
.info.warn { background: var(--amber-bg); color: var(--warn-ink); }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--card); }
.auth-brand {
  position: relative; overflow: hidden; color: #fff; padding: 56px 64px; display: flex; flex-direction: column;
  background: radial-gradient(120% 90% at 0% 0%, #F7934A 0%, var(--brand) 45%, #B84D03 100%);
}
.auth-brand::before, .auth-brand::after { content: ''; position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); }
.auth-brand::before { width: 620px; height: 620px; right: -260px; bottom: -220px; background: rgba(255, 255, 255, .05); }
.auth-brand::after { width: 380px; height: 380px; right: -120px; bottom: -80px; background: rgba(255, 255, 255, .06); }
.auth-brand img { width: 170px; filter: brightness(0) invert(1); }
.auth-brand .mid { margin-top: auto; margin-bottom: auto; position: relative; z-index: 1; max-width: 460px; }
.auth-brand h1 { font-size: 38px; line-height: 1.15; font-weight: 800; margin: 0 0 14px; }
.auth-brand p { font-size: 16px; opacity: .92; margin: 0 0 26px; }
.auth-brand ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-brand li { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.auth-brand li .ck { width: 28px; height: 28px; border-radius: 8px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; }
.auth-brand .foot { position: relative; z-index: 1; font-size: 12.5px; opacity: .8; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .logo-m { display: none; width: 120px; margin-bottom: 26px; }
.auth-card h2 { font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.auth-card > p { color: var(--mute); margin: 0 0 26px; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; }
.auth-card .btn-primary { height: 46px; font-size: 15px; margin-top: 4px; }
.auth-card .alt { text-align: center; font-size: 13.5px; color: var(--ink-2); margin-top: 20px; }
.auth-card .alt a, .linkish { color: var(--brand-700); font-weight: 700; cursor: pointer; text-decoration: none; background: none; border: 0; font: inherit; padding: 0; }
.auth-card .alt a:hover, .linkish:hover { text-decoration: underline; }
.auth-card .row-end { display: flex; justify-content: flex-end; margin-top: -8px; font-size: 13px; }
.msg { padding: 12px 14px; border-radius: 10px; font-size: 13.5px; }
.msg.err { background: var(--red-bg); color: var(--err-ink); }
.msg.ok { background: var(--green-bg); color: var(--ok-ink); }
.pending { max-width: 460px; margin: 0 auto; text-align: center; padding: 40px 24px; }
.pending img { width: 130px; margin-bottom: 28px; }
.pending .ico { width: 64px; height: 64px; border-radius: 18px; background: var(--amber-bg); color: var(--amber); display: grid; place-items: center; margin: 0 auto 18px; }
.pending .ico svg.i { width: 30px; height: 30px; }
.pending h2 { margin: 0 0 8px; }
.pending p { color: var(--ink-2); margin: 0 0 22px; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 20, 32, .5); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .15s ease-out; }
.modal { background: var(--card); border-radius: 18px; max-width: 440px; width: 100%; padding: 26px; box-shadow: var(--shadow-lg); animation: pop .18s cubic-bezier(.2, .9, .3, 1.2); }
.modal .m-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; background: var(--brand-50); color: var(--brand); }
.modal .m-ic.danger { background: var(--red-bg); color: var(--red); }
.modal h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.modal p { margin: 0; color: var(--ink-2); }
.modal form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.modal .m-acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--toast-bg); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 13.5px; animation: pop .2s ease-out; max-width: 380px; }
.toast.ok svg.i { color: #5BD69A; }
.toast.err { background: #8E1F1F; }

/* ---------- responsivo ---------- */
@media (max-width: 1320px) {
  .form-layout { grid-template-columns: minmax(0, 1fr); }
  .resumo { position: static; order: -1; }
  .resumo .btns, .resumo .lines, .resumo .meta { display: none; }
  .resumo .card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 16px 20px; }
  .resumo .card > div:first-child { flex-basis: 100%; }
  .resumo .ev-t { margin: 0; flex: 1; }
  .resumo #rs-sit { margin: 0 !important; }
  .resumo .tot { padding: 0; text-align: right; }
  .savebar {
    display: flex; align-items: center; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--card); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(20, 28, 45, .08);
  }
  .savebar .t { flex: 1; min-width: 0; }
  .savebar .t span { display: block; font-size: 11px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
  .savebar .t b { font-size: 19px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
  .has-savebar .content { padding-bottom: 110px; }
}
@media (max-width: 1200px) {
  .hide-md { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rep-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1080px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .rep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-lg); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 20, 32, .4); z-index: 35; }
  .topbar .menu-btn { display: inline-flex; }
  .topbar { padding: 14px 16px 12px; }
  .topbar h1 { font-size: 19px; }
  .topbar .acts .btn .lbl-long { display: none; }
  .content { padding: 4px 16px 48px; }
  .demo-bar { margin: 12px 16px 0; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
  .auth-card .logo-m { display: block; }
  .det-grid { grid-template-columns: minmax(0, 1fr); }
  .report-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .kpi { padding: 14px; flex-direction: column; gap: 10px; }
  .kpi .vl { font-size: 18px; }
  .card { padding: 18px 16px; }
  .tbl-wrap { margin: 0 -16px; }
  .tbl th:first-child, .tbl td:first-child { padding-left: 16px; }
  .tbl th:last-child, .tbl td:last-child { padding-right: 16px; }
  .g2, .g3, .g4, .rep-grid, .seg, .rep-filters { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .tbl.cards thead { display: none; }
  .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; }
  .tbl.cards tr { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .tbl.cards td { padding: 0 !important; border: 0; }
  .tbl.cards td[data-hide] { display: none; }
  .tbl.cards td.c-main { grid-column: 1; }
  .tbl.cards td.c-val { grid-column: 2; grid-row: 1; text-align: right; font-weight: 700; }
  .tbl.cards td.c-sit { grid-column: 2; grid-row: 2; text-align: right; }
  .tbl.cards td.c-meta { grid-column: 1; font-size: 12.5px; color: var(--mute); }
  .items td.it { white-space: normal; }
  .items td.v { width: 120px; }
  .items td.q { width: 70px; }
  .items th.o, .items td.o { display: none; }
  .cols { gap: 4px; height: 170px; }
  .col .m { font-size: 10px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .det-head .total-box { text-align: left; }
  .report-head img { width: 72px; }
  .toasts { left: 16px; right: 16px; bottom: 16px; }
}

/* ---------- impressão ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: var(--card); font-size: 12px; }
  .side, .topbar, .demo-bar, .no-print, .savebar, .toasts, .scrim { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .print-only { display: block; }
  .rep-ev, .card { break-inside: avoid; }
  .pill { border: 1px solid currentColor; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- ajustes ---------- */
.m-only { display: none; }
input.invalid, select.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(210, 59, 59, .14); }
.items td.it input { min-width: 150px; }
@media (max-width: 1080px) { .rep-grid .span2 { grid-column: span 2; } }
@media (max-width: 640px) { .rep-grid .span2 { grid-column: auto; } }
@media (min-width: 881px) { .savebar { left: 260px; padding-left: 36px; padding-right: 36px; } }
@media (max-width: 640px) {
  .demo-bar > span:first-of-type, .demo-bar label { display: none; }
  .demo-bar select { flex: 1; min-width: 0; }
  .topbar .sub { display: none; }
}

/* ---------- fotos e arquivos ---------- */
.anx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.anx { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); transition: box-shadow .15s, border-color .15s; }
.anx:hover { border-color: var(--border-hover); box-shadow: var(--shadow); }
.anx-th { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--line-2); cursor: zoom-in; }
.anx-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.anx-doc { display: grid; place-items: center; align-content: center; gap: 6px; height: 100%; color: var(--red); font-size: 12px; }
.anx-doc svg.i { width: 36px; height: 36px; }
.anx-inf { padding: 8px 10px 10px; min-width: 0; }
.anx-inf span { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anx-inf small { font-size: 11.5px; color: var(--mute); }
.anx-del { position: absolute; top: 6px; right: 6px; background: rgba(255, 255, 255, .94) !important; color: var(--red); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.anx-empty { display: flex; gap: 12px; align-items: center; padding: 22px; border: 1.5px dashed var(--line); border-radius: 12px; color: var(--mute); font-size: 13.5px; }
.anx-empty svg.i { width: 28px; height: 28px; color: var(--brand); flex: none; }
#anxCard.drag { outline: 2px dashed var(--brand); outline-offset: -8px; background: var(--brand-50); }
.lightbox { position: fixed; inset: 0; z-index: 150; background: rgba(10, 12, 18, .92); display: grid; place-items: center; padding: 56px 16px 24px; animation: fade .15s ease-out; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img { max-width: min(1400px, 100%); max-height: calc(100vh - 130px); object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); background: var(--card); }
.lightbox figcaption { color: #CFD5E1; font-size: 13px; text-align: center; }
.lightbox figcaption a { color: #FFB27A; }
.lb-x, .lb-nav { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-x:hover, .lb-nav:hover { background: rgba(255, 255, 255, .24); }
.lb-x { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-x svg.i, .lb-nav svg.i { width: 22px; height: 22px; }

/* ---------- instalar aplicativo ---------- */
.nav-inst { display: flex; align-items: center; gap: 12px; width: 100%; margin: auto 0 12px; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--warm-border); background: var(--warm); color: var(--brand-700); font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; text-align: left; }
.nav-inst:hover { background: var(--brand-50); border-color: var(--brand); }
.nav-inst small { display: block; font-weight: 500; color: var(--mute); font-size: 11.5px; }
.nav-inst:not(.hidden) + .me { margin-top: 0; }
.inst-passos p { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 640px) { .anx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
@media print { .lightbox, .nav-inst { display: none !important; } .anx-grid { grid-template-columns: repeat(4, 1fr); } }
.anx.pend .anx-th { cursor: default; }
.anx.pend { border-style: dashed; border-color: var(--warm-border); }
.span3 { grid-column: span 3; }
@media (max-width: 880px) { .g4 .span3 { grid-column: span 2; } }
@media (max-width: 640px) { .g4 .span3 { grid-column: auto; } }

/* ---------- ficha de impressão (1 página) ---------- */
.ficha { font-size: 9.5pt; line-height: 1.35; color: #111; }
.ficha .f-top { display: flex; gap: 14px; align-items: flex-start; border-bottom: 2px solid var(--brand); padding-bottom: 8px; margin-bottom: 8px; }
.ficha .f-top img { width: 70px; margin-top: 2px; }
.ficha .f-tit { flex: 1; min-width: 0; }
.ficha .f-tit small { font-size: 8pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #666; }
.ficha .f-tit h2 { font-size: 14pt; margin: 1px 0 2px; line-height: 1.2; }
.ficha .f-tit div { font-size: 9pt; color: #333; }
.ficha .f-tot { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ficha .f-tot small { font-size: 7.5pt; text-transform: uppercase; letter-spacing: .06em; color: #666; font-weight: 700; margin-top: 3px; }
.ficha .f-tot b { font-size: 15pt; color: var(--brand-700); }
.ficha .pill { font-size: 8pt; padding: 1px 8px; }
.ficha .f-cols { column-count: 2; column-gap: 16px; }
.ficha .f-bl { break-inside: avoid; margin: 0 0 8px; border: 1px solid #ddd; border-radius: 6px; padding: 5px 8px 6px; }
.ficha .f-bl h4 { margin: 0 0 3px; font-size: 8pt; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-700); display: flex; justify-content: space-between; gap: 8px; }
.ficha .f-bl h4 b { color: #111; letter-spacing: 0; }
.ficha table { width: 100%; border-collapse: collapse; }
.ficha td { padding: 1.5px 0; vertical-align: top; border-bottom: 1px dotted #ddd; }
.ficha tr:last-child td { border-bottom: 0; }
.ficha td.r { text-align: right; white-space: nowrap; padding-left: 8px; font-variant-numeric: tabular-nums; }
.ficha td i { color: #555; font-style: normal; }
.ficha .f-kv { margin: 1px 0; }
.ficha .f-kv span { font-weight: 700; color: #555; margin-right: 4px; }
.ficha p { margin: 0; }
.ficha .f-obs { white-space: pre-wrap; }
.ficha .f-sum td { font-weight: 800; border-top: 1px solid #999; padding-top: 3px; }
.ficha .f-rod { display: flex; justify-content: space-between; gap: 10px; font-size: 7.5pt; color: #777; border-top: 1px solid #ddd; padding-top: 4px; margin-top: 4px; }
@media print {
  @page { size: A4; margin: 10mm; }
  .ficha { display: block; }
  .ficha * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.local-hora { display: grid; grid-template-columns: minmax(0, 1fr) 170px 170px; gap: 16px; }
@media (max-width: 640px) { .local-hora { grid-template-columns: 1fr 1fr; } .local-hora > .field:first-child { grid-column: 1 / -1; } }
.seg.seg2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg .vis { color: var(--brand-700); }
.seg label.vis > svg.i { margin: 0 4px; }
.seg label.vis.on { border-color: var(--brand); background: var(--brand-50); }
.tag.priv { display: inline-flex; align-items: center; gap: 4px; background: var(--priv-bg); color: var(--priv-ink); vertical-align: middle; font-size: 11.5px; }
.tag.priv svg.i { width: 12px; height: 12px; }
@media (max-width: 640px) { .seg.seg2 { grid-template-columns: minmax(0, 1fr); } }
label.ocupado { opacity: .55; pointer-events: none; }

/* ---------- valor unitário, compras e relatórios ---------- */
.items th.t, .items td.t { width: 130px; text-align: right; white-space: nowrap; padding-right: 12px; }
.items td.t { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.items tr.has td.t { color: var(--ink); }
.pct-info { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink-2); background: var(--brand-50); border-radius: 10px; padding: 8px 12px; }
.pct-info:empty { display: none; }
.pct-info svg.i { color: var(--brand); width: 16px; height: 16px; margin-top: 2px; }
.pct-info b { color: var(--brand-700); }
.resumo .rs-pct { color: var(--brand-700); font-weight: 600; margin: -6px 0 12px; }
.resumo .rs-pct:empty { display: none; }
.rep-sits { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.rep-sits .lbl { margin: 0; }
.chk-sit { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; user-select: none; }
.chk-sit input { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; }
.chk-sit .d { width: 9px; height: 9px; border-radius: 50%; }
@media (max-width: 640px) { .items th.t, .items td.t { width: 96px; } }
@media print { .rep-sits { display: none; } }

/* ---------- menu lateral organizado ---------- */
.side { overflow-y: auto; padding: 22px 14px 14px; background: linear-gradient(180deg, var(--card) 0%, var(--warm) 100%); }
.side .brand { padding: 0 10px 18px; margin-bottom: 14px; }
.nav-novo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 0 4px; }
.nav-novo .grp { grid-column: 1 / -1; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); padding: 0 12px 2px; }
.nav-novo a { display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border-radius: 10px; border: 1px solid var(--warm-border); background: var(--brand-50); color: var(--brand-700); font-weight: 700; font-size: 13px; text-decoration: none; transition: background .15s, color .15s, border-color .15s, box-shadow .15s; }
.nav-novo a svg.i { width: 15px; height: 15px; stroke-width: 2.4; }
.nav-novo a:hover, .nav-novo a.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(236, 102, 8, .25); }
.nav .grp { padding: 18px 12px 6px; }
.nav a { padding: 9px 12px; }
.nav a.on::before { left: -14px; }

/* ---------- relatório como imagem/PDF ---------- */
.captura { position: fixed; left: -12000px; top: 0; width: 980px; background: var(--card); padding: 28px 32px; z-index: -1; }
.captura .card { border: 0; box-shadow: none; padding: 0; }
.captura [style*="overflow-x"], .captura .tbl-wrap { overflow: visible !important; }
.spinner.mini { width: 14px; height: 14px; border-width: 2px; display: inline-block; vertical-align: -2px; }
@media print { .report [style*="overflow-x"], .tbl-wrap { overflow: visible !important; } }

/* ---------- telas largas: usar toda a largura ---------- */
.content { max-width: none; }
.form-layout { max-width: 1640px; }
@media (min-width: 1700px) {
  .topbar { padding-left: 44px; padding-right: 44px; }
  .content { padding-left: 44px; padding-right: 44px; }
  .demo-bar { margin-left: 44px; margin-right: 44px; }
  .kpis, .dash { gap: 22px; }
  .dash { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
  .cols { height: 260px; }
  .det-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .det-grid .full { grid-column: 1 / -1; }
}


/* =================================================================
   Modo noturno
   ================================================================= */
:root[data-theme="dark"] {
  --brand: #F07A2A;
  --brand-700: #FF9D5C;
  --brand-50: #2B1E15;
  --brand-100: #4A2D17;
  --ink: #E8EBF3;
  --ink-2: #B3BACB;
  --mute: #7F889C;
  --line: #2A3246;
  --line-2: #1F2638;
  --bg: #0E1220;
  --card: #161B2B;
  --navy: #0A0E19;
  --red: #F26B6B;    --red-bg: #3A1C22;
  --amber: #E9B44A;  --amber-bg: #372C14;
  --green: #3FCB88;  --green-bg: #11302A;
  --blue: #78A4F5;   --blue-bg: #17244A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .55);
  --surface-2: #1B2133;
  --row-hover: #251E1A;
  --placeholder: #5E677C;
  --border-hover: #3C4560;
  --warm: #1D1916;
  --warm-border: #5A3A22;
  --red-border: #6A2A31;
  --topbar-bg: rgba(14, 18, 32, .86);
  --switch-off: #3A4258;
  --info-ink: #A9C3F7;
  --warn-ink: #EBC770;
  --err-ink: #F4A3A3;
  --ok-ink: #8FE0B5;
  --priv-bg: #262D40;
  --priv-ink: #C7CDDA;
  --toast-bg: #2A3248;
  --tip-bg: #2A3248;
  --chip-on: #E8EBF3;
  --chip-on-ink: #0E1220;
  color-scheme: dark;
}
:root[data-theme="dark"] .anx-del { background: rgba(22, 27, 43, .92) !important; }
:root[data-theme="dark"] .auth-brand img { filter: brightness(0) invert(1); }
/* impressão, PDF e imagens sempre no tema claro */
:root[data-theme="dark"] .captura {
  --brand: #EC6608;
  --brand-700: #C45404;
  --brand-50: #FFF4EB;
  --brand-100: #FFE4CF;
  --ink: #1A2030;
  --ink-2: #4A5366;
  --mute: #8A92A3;
  --line: #E4E7EE;
  --line-2: #F1F3F7;
  --bg: #F4F5F8;
  --card: #FFFFFF;
  --navy: #15203A;
  --red: #D23B3B;    --red-bg: #FDEDED;
  --amber: #C98A06;  --amber-bg: #FFF5DC;
  --green: #17925A;  --green-bg: #E5F5EC;
  --blue: #2F6FDB;   --blue-bg: #EAF1FD;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 28, 45, .04), 0 6px 20px rgba(20, 28, 45, .05);
  --shadow-lg: 0 24px 64px rgba(15, 20, 35, .22);
  --surface-2: #FBFBFD;
  --row-hover: #FFF9F4;
  --placeholder: #A9AFBC;
  --border-hover: #CDD2DC;
  --warm: #FFFBF8;
  --warm-border: #F2C39F;
  --red-border: #F3C4C4;
  --topbar-bg: rgba(244, 245, 248, .88);
  --switch-off: #D5D9E1;
  --info-ink: #24478A;
  --warn-ink: #7A5406;
  --err-ink: #9B2323;
  --ok-ink: #0F6B40;
  --priv-bg: #EEF0F4;
  --priv-ink: #3D4659;
  --toast-bg: #1A2030;
  --tip-bg: #1A2030;
  --chip-on: #1A2030;
  --chip-on-ink: #FFFFFF;
  color-scheme: light; color: var(--ink); }
@media print { :root[data-theme="dark"] {
  --brand: #EC6608;
  --brand-700: #C45404;
  --brand-50: #FFF4EB;
  --brand-100: #FFE4CF;
  --ink: #1A2030;
  --ink-2: #4A5366;
  --mute: #8A92A3;
  --line: #E4E7EE;
  --line-2: #F1F3F7;
  --bg: #F4F5F8;
  --card: #FFFFFF;
  --navy: #15203A;
  --red: #D23B3B;    --red-bg: #FDEDED;
  --amber: #C98A06;  --amber-bg: #FFF5DC;
  --green: #17925A;  --green-bg: #E5F5EC;
  --blue: #2F6FDB;   --blue-bg: #EAF1FD;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 28, 45, .04), 0 6px 20px rgba(20, 28, 45, .05);
  --shadow-lg: 0 24px 64px rgba(15, 20, 35, .22);
  --surface-2: #FBFBFD;
  --row-hover: #FFF9F4;
  --placeholder: #A9AFBC;
  --border-hover: #CDD2DC;
  --warm: #FFFBF8;
  --warm-border: #F2C39F;
  --red-border: #F3C4C4;
  --topbar-bg: rgba(244, 245, 248, .88);
  --switch-off: #D5D9E1;
  --info-ink: #24478A;
  --warn-ink: #7A5406;
  --err-ink: #9B2323;
  --ok-ink: #0F6B40;
  --priv-bg: #EEF0F4;
  --priv-ink: #3D4659;
  --toast-bg: #1A2030;
  --tip-bg: #1A2030;
  --chip-on: #1A2030;
  --chip-on-ink: #FFFFFF;
  color-scheme: light; } }

/* transição suave ao trocar de tema */
html.tema-anim, html.tema-anim *, html.tema-anim *::before, html.tema-anim *::after {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, fill .35s ease, box-shadow .35s ease !important;
}

/* ---------- botão sol / lua ---------- */
.tema-toggle {
  position: relative; flex: none; width: 64px; height: 34px; padding: 0; border: 0; border-radius: 99px; cursor: pointer;
  background: linear-gradient(135deg, #FFE3C8 0%, #FFB77F 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .14), 0 1px 0 rgba(255, 255, 255, .6);
  transition: background .45s ease, box-shadow .45s ease;
  overflow: hidden;
}
.tema-toggle:focus-visible { outline: 3px solid rgba(236, 102, 8, .35); outline-offset: 2px; }
.tema-toggle .tt-ceu { position: absolute; inset: 0; pointer-events: none; }
.tema-toggle .tt-ceu::before, .tema-toggle .tt-ceu::after {
  content: ''; position: absolute; border-radius: 50%; transition: opacity .45s ease, transform .6s ease;
}
/* nuvenzinhas no dia */
.tema-toggle .tt-ceu::before {
  width: 16px; height: 7px; right: 8px; top: 16px; background: rgba(255, 255, 255, .85);
  box-shadow: 6px -4px 0 1px rgba(255, 255, 255, .85);
  border-radius: 99px;
}
/* estrelas à noite */
.tema-toggle .tt-ceu::after {
  width: 2px; height: 2px; left: 12px; top: 9px; background: #fff; opacity: 0; transform: translateY(6px);
  box-shadow: 8px 10px 0 0 #fff, 16px 2px 0 .5px #fff, 4px 16px 0 0 rgba(255, 255, 255, .7), 20px 14px 0 0 rgba(255, 255, 255, .8);
}
.tema-toggle .tt-bola {
  position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 2px 6px rgba(120, 60, 10, .35);
  display: grid; place-items: center;
  transition: transform .5s cubic-bezier(.45, 1.45, .5, 1), background .45s ease, box-shadow .45s ease;
}
.tema-toggle .tt-bola svg { position: absolute; width: 17px; height: 17px; transition: opacity .35s ease, transform .5s cubic-bezier(.45, 1.45, .5, 1); }
.tema-toggle .tt-sol { color: #F07A12; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tema-toggle .tt-sol circle { fill: currentColor; }
.tema-toggle .tt-lua { color: #6C7BB8; fill: currentColor; opacity: 0; transform: rotate(-120deg) scale(.4); }
.tema-toggle:hover .tt-bola { box-shadow: 0 3px 10px rgba(120, 60, 10, .45); }
.tema-toggle:hover .tt-sol { transform: rotate(45deg); }
.tema-toggle:active .tt-bola { width: 30px; }

:root[data-theme="dark"] .tema-toggle {
  background: linear-gradient(135deg, #141B36 0%, #2C3867 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);
}
:root[data-theme="dark"] .tema-toggle .tt-ceu::before { opacity: 0; transform: translateY(8px); }
:root[data-theme="dark"] .tema-toggle .tt-ceu::after { opacity: 1; transform: none; }
:root[data-theme="dark"] .tema-toggle .tt-bola { transform: translateX(30px); background: #EEF1FA; box-shadow: 0 0 12px rgba(200, 210, 255, .45); }
:root[data-theme="dark"] .tema-toggle:active .tt-bola { transform: translateX(26px); }
:root[data-theme="dark"] .tema-toggle .tt-sol { opacity: 0; transform: rotate(120deg) scale(.4); }
:root[data-theme="dark"] .tema-toggle .tt-lua { opacity: 1; transform: none; }
:root[data-theme="dark"] .tema-toggle:hover .tt-lua { transform: rotate(-15deg); }

.topbar .tema-toggle { margin-left: 4px; }
.auth-form { position: relative; }
.auth-form .tema-toggle { position: absolute; top: 20px; right: 20px; }
@media print { .tema-toggle { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .tema-toggle *, html.tema-anim * { transition: none !important; } }

/* ---------- forma de envio da entrega ---------- */
.seg.seg4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.seg.seg4 label { padding: 10px 12px; }
.seg.seg4 label > svg.i { margin: 0 2px; flex: none; }
@media (max-width: 900px) { .seg.seg4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.envio-campos { margin-bottom: 18px; padding: 14px; border-radius: 12px; background: var(--brand-50); border: 1px dashed var(--warm-border); }
.envio-det { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--brand-50); }
.envio-det > svg.i { color: var(--brand-700); width: 22px; height: 22px; flex: none; }

/* ---------- bolinha "realizado" ---------- */
.tbl th.c-done-h { text-align: center; width: 1%; padding-left: 6px; padding-right: 14px; color: var(--green); }
.tbl th.c-done-h svg.i { width: 18px; height: 18px; vertical-align: middle; }
.tbl td.c-done { text-align: center; width: 1%; padding-left: 6px; padding-right: 14px; }
.tbl td.c-per { min-width: 112px; }
.done-dot {
  display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--switch-off); background: var(--card); color: transparent;
  transition: background .2s, border-color .2s, color .2s, transform .15s, box-shadow .2s;
}
.done-dot svg.i { width: 16px; height: 16px; stroke-width: 3; }
.done-dot:hover { border-color: var(--green); color: var(--green); box-shadow: 0 0 0 4px var(--green-bg); }
.done-dot:active { transform: scale(.88); }
.done-dot.on { background: var(--green); border-color: var(--green); color: #fff; }
.done-dot.on:hover { box-shadow: 0 0 0 4px var(--green-bg); color: #fff; }
.done-dot.on svg.i { animation: done-pop .35s cubic-bezier(.45, 1.45, .5, 1); }
.done-dot.ro { cursor: default; }
.done-dot.ro:not(.on):hover { border-color: var(--switch-off); color: transparent; box-shadow: none; }
.done-dot.busy { opacity: .6; pointer-events: none; }
.done-dot:focus-visible { outline: 3px solid rgba(26, 160, 90, .35); outline-offset: 2px; }
@keyframes done-pop { from { transform: scale(0); } to { transform: scale(1); } }
.tag.feito { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; background: var(--green-bg); color: var(--ok-ink); }
.tag.feito svg.i { width: 13px; height: 13px; }
@media (max-width: 640px) {
  .tbl.cards td.c-done { grid-column: 2; grid-row: 3; justify-self: end; width: auto; }
}
@media (max-width: 1400px) { .hide-md { display: none; } }

/* relatório: opções mais visíveis */
.rep-sits .chk-sit { padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--card); transition: border-color .15s, background .15s; }
.rep-sits .chk-sit:hover { border-color: var(--border-hover); }
.rep-sits .chk-sit:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--ink); }
.rep-sits .chk-sit input[type=radio] { width: 15px; height: 15px; accent-color: var(--brand); margin: 0; }
.rep-sits .lbl { min-width: 76px; }
.rep-sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.rep-cols { margin-top: 10px; padding-top: 10px; }
table.mini td.c, table.mini th.c { text-align: center; }
@media (max-width: 640px) { .rep-sep { display: none; } .rep-sits .lbl { width: 100%; } }

/* ---------- situação como bolinha colorida no Nº ---------- */
.sit-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 8px; vertical-align: middle; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px rgba(0, 0, 0, .1); flex: none; }
.tbl td.c-num { white-space: nowrap; }
.c-meta .sit-dot { width: 9px; height: 9px; margin-right: 5px; }
.rep-ico { display: inline-flex; vertical-align: middle; color: var(--brand-700); }
.rep-ico svg.i { width: 14px; height: 14px; }
.tag.rep { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; background: var(--brand-50); color: var(--brand-700); }
.tag.rep svg.i { width: 13px; height: 13px; }
.rep-anual { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin: -4px 0 18px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.rep-anual .toggle { gap: 8px; }
.rep-anual .toggle svg.i { width: 16px; height: 16px; color: var(--brand-700); }
.rep-anual .hint { margin: 0; }

/* ---------- execução das atividades ---------- */
.tbl td.c-resp { min-width: 140px; }
.exec-tag { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap;
  background: var(--amber-bg); color: var(--warn-ink); }
.exec-tag.ok { background: var(--green-bg); color: var(--ok-ink); }
.exec-tag svg.i { width: 13px; height: 13px; }
.exec-card h3 { display: inline-flex; align-items: center; gap: 8px; }
.exec-card h3 svg.i { color: var(--mute); }
.exec-card.feita h3 svg.i { color: var(--green); }
.exec-card .exec-tag { margin-top: 0; }
tr.minha td.c-main .ev-name::after { content: 'você executa'; margin-left: 8px; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--blue-bg); color: var(--info-ink); vertical-align: middle; }
.exec-painel { margin-bottom: 18px; }
.exec-painel h3 { display: inline-flex; align-items: center; gap: 8px; }
.exec-painel h3 svg.i { color: var(--brand-700); }

/* executor: sem botões de cadastrar, duplicar ou editar */
body.papel-executor a[href$="/novo"], body.papel-executor a[href$="/nova"], body.papel-executor a[href*="/duplicar"] { display: none !important; }
@media (max-width: 640px) {
  .tbl.cards td.c-done { grid-row: 2; }
  .tbl.cards td.c-main .exec-tag { margin-top: 6px; }
}

/* relatório: escolha eventos x atividades */
.rel-tipo { margin-bottom: 16px; }
.rel-tipo label > svg.i { margin: 0 4px; }
.rep-filters.rep-atv { grid-template-columns: 230px minmax(0, 1fr) 210px 230px auto; }
.rep-filters.rep-atv .grid.g2 { gap: 10px; }
@media (max-width: 1200px) { .rep-filters.rep-atv { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .rep-filters.rep-atv { grid-template-columns: minmax(0, 1fr); } }
@media print { .rel-tipo { display: none !important; } }

/* ---------- calendário ---------- */
.cal-card { padding-bottom: 18px; }
.cal-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h2 { margin: 0 6px; font-size: 20px; min-width: 210px; text-align: center; }
.cal-filtros, .cal-sits { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-sits { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.cal-filtros .chk-sit, .cal-sits .chk-sit { padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--card); }
.cal-filtros .chk-sit:has(input:checked), .cal-sits .chk-sit:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--ink); }
.cal-filtros .chk-sit svg.i { width: 15px; height: 15px; color: var(--brand-700); }
.cal-leg { display: inline-flex; gap: 8px; align-items: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cal-dow { padding: 8px 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal-dia { min-height: 118px; padding: 6px 6px 8px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: var(--card); min-width: 0; }
.cal-dia:nth-child(7n) { border-right: 0; }
.cal-dia.fora { background: var(--surface-2); }
.cal-dia.fora .cal-n { color: var(--placeholder); }
.cal-dia.sel { box-shadow: inset 0 0 0 2px var(--brand); }
.cal-n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; margin-bottom: 4px; border: 0; border-radius: 99px; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.cal-n:hover { background: var(--line-2); }
.cal-dia.hoje .cal-n { background: var(--brand); color: #fff; }
.cal-itens { display: flex; flex-direction: column; gap: 3px; }
.cal-chip { display: flex; align-items: center; gap: 4px; min-width: 0; padding: 3px 7px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.25; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--c) 16%, var(--card)); border-left: 3px solid var(--c); }
.cal-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip:hover { background: color-mix(in srgb, var(--c) 28%, var(--card)); }
.cal-chip.atividade { border-left-style: dashed; background: var(--card); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
.cal-chip.meio, .cal-chip.fim { border-left-color: transparent; }
.cal-chip.meio span, .cal-chip.fim span { opacity: .75; }
.cal-chip.feito { opacity: .6; }
.cal-chip.feito span { text-decoration: line-through; }
.cal-chip svg.i { width: 12px; height: 12px; flex: none; }
.cal-chip.leg { --c: var(--mute); display: inline-flex; font-size: 11.5px; }
.cal-mais { border: 0; background: none; padding: 2px 4px; text-align: left; font: inherit; font-size: 12px; font-weight: 700; color: var(--brand-700); cursor: pointer; }
.cal-pts { display: none; }
.tag.atv { background: var(--blue-bg); color: var(--info-ink); }
@media (max-width: 1100px) { .cal-dia { min-height: 96px; } .cal-chip { font-size: 11px; padding: 2px 5px; } }
@media (max-width: 640px) {
  .cal-nav h2 { min-width: 0; font-size: 17px; }
  .cal-dia { min-height: 54px; padding: 4px 2px; text-align: center; cursor: pointer; }
  .cal-dow { padding: 6px 2px; text-align: center; font-size: 10.5px; }
  .cal-itens, .cal-leg { display: none; }
  .cal-pts { display: flex; justify-content: center; gap: 3px; flex-wrap: wrap; }
  .cal-pts i { width: 6px; height: 6px; border-radius: 50%; }
  .cal-n { margin-bottom: 2px; }
}
@media print { .cal-top .btn, .cal-filtros, .cal-sits { display: none !important; } }

/* ---------- papéis e permissões ---------- */
.papeis { padding: 0; overflow: hidden; margin-bottom: 18px; }
.papeis-h { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 20px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.papeis-h:hover { background: var(--surface-2); }
.papeis-h b { display: block; font-size: 15.5px; }
.papeis-h small { display: block; font-size: 12.5px; color: var(--mute); }
.papeis-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand-50); color: var(--brand-700); flex: none; }
.papeis-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--brand-700); }
.papeis-btn svg.i { width: 16px; height: 16px; transform: rotate(90deg); transition: transform .2s; }
.papeis.fechado .papeis-btn svg.i { transform: rotate(0deg); }
.papeis.fechado .papeis-corpo { display: none; }
.papeis-corpo { padding: 4px 20px 18px; border-top: 1px solid var(--line-2); }
.papeis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.papel-card { --pc: var(--brand); --pbg: var(--brand-50); border: 1px solid var(--line); border-top: 4px solid var(--pc); border-radius: 12px; padding: 16px; background: var(--card); }
.papel-card.blue { --pc: var(--blue); --pbg: var(--blue-bg); }
.papel-card.green { --pc: var(--green); --pbg: var(--green-bg); }
.papel-top { display: flex; align-items: center; gap: 12px; }
.papel-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--pbg); color: var(--pc); flex: none; }
.papel-ic svg.i { width: 20px; height: 20px; }
.papel-top h4 { margin: 0; font-size: 16px; }
.papel-n { font-size: 12px; font-weight: 600; color: var(--mute); }
.papel-res { margin: 10px 0 12px; font-size: 13px; color: var(--ink-2); min-height: 2.6em; }
.perm { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.perm li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.35; }
.perm li small { display: block; font-size: 11.5px; color: var(--mute); }
.perm li.nao { color: var(--mute); }
.perm-ic { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; flex: none; margin-top: 1px; }
.perm-ic svg.i { width: 12px; height: 12px; stroke-width: 3; }
.sim > .perm-ic { background: var(--green-bg); color: var(--green); }
.parte > .perm-ic { background: var(--amber-bg); color: var(--amber); }
.nao > .perm-ic { background: var(--line-2); color: var(--placeholder); }
.papeis-leg { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.papeis-leg > span:not(.sp) { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 1100px) { .papeis-grid { grid-template-columns: minmax(0, 1fr); } .papel-res { min-height: 0; } }

/* relatórios: situação só com a bolinha + legenda */
.sit-leg { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; margin: -4px 0 14px; font-size: 12.5px; color: var(--ink-2); }
.sit-leg span { display: inline-flex; align-items: center; }
.sit-leg .sit-dot { margin-right: 6px; }
table.mini td.c .sit-dot { margin-right: 0; width: 13px; height: 13px; }

/* ---------- conferência do administrador ---------- */
.btn-ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn-ok:hover { filter: brightness(1.06); background: var(--green); color: #fff; }
.tag.conf { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; background: var(--amber-bg); color: var(--warn-ink); }
.tag.conf svg.i { width: 12px; height: 12px; }
.sit-fixa { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); }
.conf-faixa { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 14px 16px; border-radius: 12px; background: var(--amber-bg); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); color: var(--ink); }
.conf-faixa > svg.i { color: var(--amber); flex: none; }
.conf-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.conf-aviso { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 18px; border-radius: 14px; text-decoration: none; color: var(--ink);
  background: var(--amber-bg); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); }
.conf-aviso:hover { border-color: var(--amber); }
.conf-aviso > svg.i:first-child { color: var(--amber); width: 24px; height: 24px; flex: none; }
.conf-aviso b { display: block; font-size: 15px; }
.conf-aviso span { display: block; font-size: 13px; color: var(--ink-2); }
.conf-lista { display: flex; flex-direction: column; }
.conf-item { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line-2); }
.conf-item:last-child { border-bottom: 0; }
.conf-item .t { font-weight: 700; color: var(--ink); text-decoration: none; }
.conf-item .t:hover { color: var(--brand-700); }
.conf-item .s { font-size: 12.5px; color: var(--mute); margin-top: 2px; }
.conf-item .s .sit-dot { width: 9px; height: 9px; margin-right: 5px; }
.conf-tipo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; flex: none; background: var(--brand-50); color: var(--brand-700); }
.conf-tipo.atividade { background: var(--blue-bg); color: var(--info-ink); }
@media (max-width: 760px) { .conf-item { flex-wrap: wrap; } .conf-item .conf-acts { width: 100%; padding-left: 52px; } }

/* ---------- solicitações (no sistema) ---------- */
.conf-aviso.sol { background: var(--brand-50); border-color: var(--warm-border); }
.conf-aviso.sol > svg.i:first-child { color: var(--brand-700); }
.sol-link h3 { display: inline-flex; align-items: center; gap: 8px; }
.sol-link h3 svg.i { color: var(--brand-700); }
.sol-link-box { display: flex; gap: 8px; flex-wrap: wrap; }
.sol-link-box input { flex: 1 1 320px; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.sol-item { border-bottom: 1px solid var(--line-2); }
.sol-item:last-child { border-bottom: 0; }
.sol-item summary { display: flex; align-items: center; gap: 14px; padding: 14px 4px; cursor: pointer; list-style: none; }
.sol-item summary::-webkit-details-marker { display: none; }
.sol-item summary .t { font-weight: 700; }
.sol-item summary .s { font-size: 12.5px; color: var(--mute); margin-top: 2px; }
.sol-item .conf-tipo { background: var(--brand-50); color: var(--brand-700); }
.sol-abrir svg.i { transition: transform .2s; color: var(--mute); }
.sol-item[open] .sol-abrir svg.i { transform: rotate(90deg); }
.sol-det { padding: 4px 4px 18px 56px; }
@media (max-width: 760px) { .sol-det { padding-left: 4px; } }

/* ---------- formulário público dos representantes ---------- */
.sol-body { background: var(--bg); }
.sol-wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 40px; }
.sol-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 3px solid var(--brand); }
.sol-head img { width: 110px; flex: none; }
.sol-head h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.sol-head p { margin: 4px 0 0; color: var(--mute); font-weight: 600; }
.sol-wrap .card + .card, .sol-wrap .info + .card { margin-top: 16px; }
.sol-h { margin: 0 0 14px; font-size: 17px; }
.sol-seg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sol-seg[data-grupo="retorna"] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; }
.sol-seg label.on { border-color: var(--brand); background: var(--brand-50); }
.sol-seg.invalid { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 12px; }
.sol-itens { overflow-x: auto; }
.sol-itens .items td.q { width: 90px; }
.sol-itens .items td.c { width: 140px; }
.sol-itens .items td.o { width: 26%; }
.sol-itens .items td.x { width: 38px; }
.sol-itens .items input { min-width: 70px; }
.sol-enviar { margin-top: 18px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.sol-enviar .btn { justify-content: center; font-size: 16px; padding: 14px 20px; }
.sol-erro { padding: 12px 14px; border-radius: 10px; background: var(--red-bg); color: var(--err-ink); border: 1px solid var(--red-border); font-size: 14px; }
.sol-aviso, .sol-ok { text-align: center; padding: 36px 22px; }
.sol-aviso h2, .sol-ok h2 { margin: 0 0 8px; }
.sol-ok-ic { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--green-bg); color: var(--green); font-size: 32px; font-weight: 800; }
.sol-ok p { max-width: 560px; margin: 8px auto; }
.sol-ok .btn { margin-top: 14px; }
.sol-rodape { text-align: center; color: var(--mute); font-size: 12px; margin-top: 24px; }
@media (max-width: 640px) {
  .sol-head img { width: 80px; }
  .sol-head h1 { font-size: 19px; }
  .sol-seg, .sol-seg[data-grupo="retorna"] { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- remessas extras (atividades) ---------- */
.rem-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rem-n { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; background: var(--brand-50); color: var(--brand-700); font-size: 12.5px; font-weight: 800; letter-spacing: .02em; }
.remessa { margin-top: 18px; padding: 16px; border: 1.5px dashed var(--warm-border); border-radius: 14px; background: var(--surface-2); }
.remessa .envio-campos { margin-top: 12px; }
#addRem { margin-top: 16px; }

/* formulário público: endereço opcional quando for "Nosso carro" */
.sol-end-nota { margin: -6px 0 14px; }
.end-opc .req-end { display: none; }

/* ---------- envio de material (atividades) ---------- */
form.envio-mat .merc-campo { display: none !important; }
.mat-busca { margin-bottom: 14px; padding: 14px; border-radius: 12px; background: var(--brand-50); border: 1px dashed var(--warm-border); }
.mat-busca .field { margin: 0; }
.mat-busca-l { display: flex; gap: 8px; max-width: 420px; }
.mat-busca-l input { flex: 1; min-width: 0; }
.mat-itens td.q { width: 90px; }
.mat-itens td.c { width: 130px; }
.mat-itens td.o { width: 20%; }
.mat-itens td.v { width: 150px; }
.mat-itens td.t, .mat-itens th.t { width: 110px; text-align: right; }
.mat-itens tfoot td { padding-top: 10px; }
.mat-itens td.r { text-align: right; }
.mat-itens input { min-width: 70px; }
.mat-itens { min-width: 640px; table-layout: fixed; }
.mat-itens th:nth-child(1), .mat-itens td.q { width: 62px; }
.mat-itens th:nth-child(2), .mat-itens td.c { width: 88px; }
.mat-itens th:nth-child(4), .mat-itens td.o { width: 15%; }
.mat-itens th:nth-child(5), .mat-itens td.v { width: 118px; }
.mat-itens th:nth-child(6), .mat-itens td.t { width: 92px; }
.mat-itens th:nth-child(7), .mat-itens td.x { width: 36px; }
.mat-itens input { min-width: 0 !important; width: 100%; }
.mat-itens .prefix span { padding: 0 6px; }
.mat-itens th { font-size: 11px; }

/* atividades relacionadas ao evento */
.rel-lista { display: flex; flex-direction: column; gap: 8px; }
.rel-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink); text-decoration: none; }
a.rel-item:hover { border-color: var(--brand); }
.rel-item .seq { min-width: 40px; }

/* ordenar clicando no cabeçalho */
.tbl th.ord, .tbl th.ord:first-child, .tbl th.ord:last-child { padding: 0; }
.tbl th.ord button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 5px; width: 100%; padding: 10px 12px; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; white-space: nowrap; }
.tbl th.ord:first-child button { padding-left: 22px; }
.tbl th.ord.right button { justify-content: flex-end; }
.tbl th.ord button:hover { color: var(--ink); }
.tbl th.ord button:focus-visible { box-shadow: inset 0 0 0 2px var(--brand); border-radius: 6px; }
.tbl th.ord.on { color: var(--brand-700); }
.ord-i { font-size: 8px; letter-spacing: -1px; opacity: .35; }
.tbl th.ord.on .ord-i { opacity: 1; font-size: 9px; }
@media (max-width: 760px) { .tbl th.ord:first-child button { padding-left: 16px; } }

/* representantes */
.rep-abas { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rep-abas button { all: unset; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: -1px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--mute); border-bottom: 2.5px solid transparent; }
.rep-abas button span { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); }
.rep-abas button:hover { color: var(--ink); }
.rep-abas button.on { color: var(--brand-700); border-bottom-color: var(--brand); }
.rep-abas button.on span { background: var(--brand-50); color: var(--brand-700); }
.rep-abas button:focus-visible { box-shadow: 0 0 0 3px rgba(236, 102, 8, .25); border-radius: 8px; }
.tag.nao-env { background: var(--red-bg); color: var(--red); vertical-align: middle; font-size: 11.5px; }
.tag.aenviar { background: var(--amber-bg); color: var(--warn-ink); }
.tag.aniv { background: var(--blue-bg); color: var(--info-ink); vertical-align: middle; font-size: 11.5px; }
.rep-contato { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.rep-contato .btn svg.i { width: 15px; height: 15px; }
.rep-flags { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.form-fim { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.form-fim .sp { flex: 1; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .95em; }
.env-itens th:nth-child(4), .env-itens td.o { width: 30%; }
.env-itens th:nth-child(5), .env-itens td.x { width: 36px; }
.sol-item summary .grow { flex: 1; min-width: 0; }
.env-itens th:nth-child(1), .env-itens td.q { width: 80px; }
