/* Dosis latin-ext */
@font-face {
  font-family: 'Dosis';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/fonts/Dosis-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Dosis latin */
@font-face {
  font-family: 'Dosis';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/fonts/Dosis-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Open Sans latin-ext */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/OpenSans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Open Sans latin */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/OpenSans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Layout: palco de vidro sobre fundo de luz azul e laranja; cabeçalho com marca, abas em pílula (dock no celular), conteúdo em painéis translúcidos. */
:root {
  --blue: #36499b;
  --blue-deep: #222d68;
  --orange: #ff6d2d;
  --sky: #67cfee;
  --bg: #eef2f9;
  --orb-a: rgba(54, 73, 155, 0.22);
  --orb-b: rgba(255, 109, 45, 0.18);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-solid: #ffffff;
  --glass-border: rgba(255, 255, 255, 0.85);
  --ink: #1e2547;
  --ink-2: #4a5379;
  --ink-3: #6f779b;
  --line: rgba(54, 73, 155, 0.16);
  --heading: #36499b;
  --accent-ink: #c4480f;
  --plot: rgba(255, 255, 255, 0.55);
  --plot-edge: #ffffff;
  --shadow: 0 18px 40px -18px rgba(34, 45, 104, 0.45), 0 2px 8px rgba(34, 45, 104, 0.08);
  --chip: rgba(54, 73, 155, 0.09);
  --danger: #c0264a;
  --ok: #1f8a5b;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%2336499B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1230;
    --orb-a: rgba(80, 104, 220, 0.30);
    --orb-b: rgba(255, 109, 45, 0.16);
    --glass: rgba(32, 41, 92, 0.55);
    --glass-solid: #1b2358;
    --glass-border: rgba(160, 176, 255, 0.16);
    --ink: #eef1ff;
    --ink-2: #b9c1e8;
    --ink-3: #8f98c6;
    --line: rgba(160, 176, 255, 0.2);
    --heading: #c3cdff;
    --accent-ink: #ff8f5c;
    --plot: rgba(20, 27, 70, 0.55);
    --plot-edge: #1b2358;
    --shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.3);
    --chip: rgba(160, 176, 255, 0.14);
    --danger: #ff7f9c;
    --ok: #55d6a0;
    --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%23c3cdff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1230;
  --orb-a: rgba(80, 104, 220, 0.30);
  --orb-b: rgba(255, 109, 45, 0.16);
  --glass: rgba(32, 41, 92, 0.55);
  --glass-solid: #1b2358;
  --glass-border: rgba(160, 176, 255, 0.16);
  --ink: #eef1ff;
  --ink-2: #b9c1e8;
  --ink-3: #8f98c6;
  --line: rgba(160, 176, 255, 0.2);
  --heading: #c3cdff;
  --accent-ink: #ff8f5c;
  --plot: rgba(20, 27, 70, 0.55);
  --plot-edge: #1b2358;
  --shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.3);
  --chip: rgba(160, 176, 255, 0.14);
  --danger: #ff7f9c;
  --ok: #55d6a0;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%23c3cdff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100%;
  padding-block: 18px 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  position: relative;
}
/* luzes de fundo */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 40vmax at 8% -5%, var(--orb-a), transparent 60%),
    radial-gradient(50vmax 36vmax at 98% 12%, var(--orb-b), transparent 62%),
    radial-gradient(60vmax 40vmax at 60% 115%, var(--orb-a), transparent 60%);
}
h1, h2, h3, .dos { font-family: "Dosis", "Open Sans", system-ui, sans-serif; font-weight: 700; letter-spacing: 0.01em; margin: 0; }
h2 { color: var(--heading); font-size: 1.35rem; line-height: 1.15; text-transform: uppercase; }
h3 { color: var(--heading); font-size: 1.05rem; text-transform: uppercase; }
.sub { color: var(--ink-2); margin: 4px 0 0; }
.wrap { max-width: 1320px; margin: 0 auto; display: grid; gap: 18px; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.pad { padding: 20px; }
.underline { display: block; width: 44px; height: 3px; background: var(--orange); border-radius: 3px; margin: 8px 0 14px; }

/* Cabeçalho */
.top { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 22px; flex-wrap: wrap; }
.logo { height: 38px; width: auto; display: block; }
.logo.on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo.on-light { display: none; }
  :root:not([data-theme="light"]) .logo.on-dark { display: block; }
}
:root[data-theme="dark"] .logo.on-light { display: none; }
:root[data-theme="dark"] .logo.on-dark { display: block; }
.spacer { flex: 1 1 auto; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--chip); }
.tab {
  font: 600 0.95rem "Dosis", sans-serif; letter-spacing: 0.04em; text-transform: uppercase;
  border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
  padding: 8px 18px; border-radius: 999px; white-space: nowrap;
}
.tab[aria-selected="true"] { background: var(--blue); color: #fff; box-shadow: 0 6px 16px -6px rgba(54, 73, 155, 0.8); }
.tab:not([aria-selected="true"]):hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.who { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--ink-3); }
.who select {
  font: 600 0.9rem "Open Sans", sans-serif; color: var(--ink);
  background: var(--glass-solid); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px;
}
.proto { font-size: 0.78rem; color: var(--ink-3); text-align: center; }
.proto b { color: var(--accent-ink); }

/* Dock móvel */
.dock { display: none; }
.cols2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1040px) { .grid2.cols2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .top .tabs { display: none; }
  .dock {
    display: flex; position: fixed; z-index: 20; left: 50%; transform: translateX(-50%);
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 2px; padding: 5px; border-radius: 999px; max-width: calc(100vw - 24px);
    background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
    border: 1px solid var(--glass-border); box-shadow: var(--shadow);
  }
  .dock { overflow-x: auto; scrollbar-width: none; }
  .dock .tab { padding: 9px 11px; font-size: 0.78rem; letter-spacing: 0.02em; }
  body { padding-bottom: 100px; }
  .who span { display: none; }
  .top { flex-wrap: nowrap; padding: 9px 12px; }
  .top .spacer:last-of-type { display: none; }
  .logo { height: 30px; }
  .who select { max-width: 210px; padding: 6px 38px 6px 12px; font-size: 0.85rem; }
  .who { margin-left: auto; }
}

/* Grades */
.grid2 { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
@media (max-width: 1040px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.stack { display: grid; gap: 18px; min-width: 0; }

/* Painel azul (grafismo da marca: arco laranja no canto) */
.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: 24px; padding: 22px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  box-shadow: var(--shadow);
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(165deg, transparent 55%, rgba(0, 0, 0, 0.14) 55%); pointer-events: none; }
.hero::after {
  content: ""; position: absolute; right: -58px; bottom: -58px; width: 150px; height: 150px; border-radius: 50%;
  border: 26px solid var(--orange); border-top-color: transparent; border-left-color: transparent; pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.1; }
.hero .hl { color: var(--sky); }
.hero p { margin: 8px 0 0; color: rgba(255, 255, 255, 0.86); max-width: 52ch; }
.hero .eyebrow { font: 600 0.8rem "Dosis", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sky); margin-bottom: 6px; }

/* Botões e chips */
.btn {
  font: 700 0.95rem "Dosis", sans-serif; letter-spacing: 0.05em; text-transform: uppercase;
  border: 0; border-radius: 999px; padding: 11px 20px; cursor: pointer;
  background: var(--orange); color: #2a1206; box-shadow: 0 10px 22px -10px rgba(255, 109, 45, 0.9);
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--heading); border: 1.5px solid var(--line); box-shadow: none; }
.btn.sm { padding: 6px 14px; font-size: 0.8rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--chip); color: var(--ink); border-radius: 999px; padding: 3px 10px; font-size: 0.8rem; font-weight: 600; }
.chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--chip); }
.seg button { font: 600 0.82rem "Open Sans", sans-serif; color: var(--ink-2); background: transparent; border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--glass-solid); color: var(--heading); box-shadow: 0 2px 8px rgba(34, 45, 104, 0.18); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
select.pill, input.pill {
  font: 600 0.9rem "Open Sans", sans-serif; color: var(--ink); background: var(--glass-solid);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; min-width: 0;
}
select.pill, .who select {
  -webkit-appearance: none; appearance: none;
  padding-right: 40px;
  background-image: var(--chev); background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px;
  cursor: pointer;
}
.ctl { display: grid; gap: 4px; min-width: 0; }
.ctl .cl { font: 600 0.72rem "Dosis", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding-left: 4px; }
.hero .ctl .cl { color: var(--sky); }
/* Toggle (componente da marca) */
.switch { width: 46px; height: 26px; border-radius: 999px; border: 0; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); transition: transform 0.2s; }
.switch[aria-checked="true"] { background: var(--orange); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
@media (prefers-reduced-motion: reduce) { .switch, .switch::after { transition: none; } }

/* Matriz */
.stage { padding: 14px; }
.stage-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 6px 6px 12px; }
.matrix-host { width: 100%; touch-action: pan-y; }
.matrix-host.live { touch-action: none; cursor: crosshair; }
.matrix-host svg { display: block; max-width: 100%; user-select: none; -webkit-user-select: none; overflow: visible; }
.m-plot { fill: var(--plot); stroke: var(--line); stroke-width: 1; }
.m-ray { stroke: var(--line); stroke-width: 1.2; }
.m-axis { stroke: var(--heading); stroke-width: 1.6; opacity: 0.55; }
.m-ax { fill: var(--heading); font: 700 11px "Dosis", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.9; }
.m-zone { fill: var(--ink-3); font: 600 12px "Dosis", sans-serif; letter-spacing: 0.1em; text-transform: uppercase; text-anchor: middle; paint-order: stroke; stroke: var(--plot-edge); stroke-width: 3px; stroke-linejoin: round; }
.m-zone.flow { fill: var(--accent-ink); font-size: 15px; font-weight: 700; }
.m-ini { fill: #fff; font: 700 8.5px "Open Sans", sans-serif; text-anchor: middle; pointer-events: none; }
.m-tip-bg { fill: var(--blue-deep); }
.m-tip-t { fill: #fff; font: 600 12px "Open Sans", sans-serif; }
.m-tip-z { fill: var(--sky); font: 600 10.5px "Dosis", sans-serif; letter-spacing: 0.08em; text-transform: uppercase; }
.m-ghost { fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-dasharray: 3 3; }
.m-ghost-t { fill: var(--ink-3); font: 600 9px "Open Sans", sans-serif; }
.m-link { stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 2 3; opacity: 0.8; }
.m-cross { stroke: var(--orange); stroke-width: 1.4; stroke-dasharray: 5 5; opacity: 0.85; }
.pulse { transform-box: fill-box; transform-origin: center; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 0.3; } 50% { transform: scale(1.4); opacity: 0.1; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.hint { margin: 10px 6px 2px; color: var(--ink-3); font-size: 0.88rem; }

/* Listas */
.people { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.person { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 14px; }
.person:hover, .person.on { background: var(--chip); }
.av { width: 30px; height: 30px; border-radius: 50%; color: #fff; font: 700 0.72rem "Open Sans", sans-serif; display: grid; place-items: center; }
.av.empty { background: transparent; border: 1.5px dashed var(--ink-3); color: var(--ink-3); }
.pn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz { font-size: 0.78rem; color: var(--ink-3); }
.retake { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--ink-3); }

/* Painel */
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { padding: 16px 18px; border-radius: 22px; position: relative; overflow: hidden; transition: transform 0.25s ease; }
.kpi:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .kpi { transition: none; } .kpi:hover { transform: none; } }
.kpi .lbl { font: 600 0.78rem "Dosis", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.kpi .val { font: 700 2.3rem/1.1 "Dosis", sans-serif; color: var(--heading); font-variant-numeric: tabular-nums; }
.kpi .val small { font-size: 1.1rem; color: var(--ink-3); }
.kpi .dl { font-size: 0.82rem; font-weight: 600; }
.up { color: var(--ok); } .down { color: var(--danger); } .flat { color: var(--ink-3); }
.kpi.flow .val { color: var(--accent-ink); }
.bars { display: grid; gap: 9px; }
.bar { display: grid; grid-template-columns: 104px minmax(0, 1fr) 62px; align-items: center; gap: 10px; font-size: 0.88rem; }
.bar .track { height: 12px; border-radius: 999px; background: var(--chip); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 999px; }
.bar .n { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.zn { font-weight: 600; }
.tbl { display: grid; gap: 2px; }
.tr { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(120px, 2fr) 64px 76px; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 14px; }
.tr.head { font: 600 0.74rem "Dosis", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding-block: 2px; }
.tr:not(.head):hover { background: var(--chip); }
.tr .tn b { display: block; font-weight: 600; }
.tr .tn span { font-size: 0.78rem; color: var(--ink-3); }
.stackbar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--chip); }
.stackbar i { display: block; height: 100%; }
.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.badge { display: inline-block; font-size: 0.74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-align: center; }
.badge.risk { background: rgba(224, 58, 90, 0.16); color: var(--danger); }
.badge.ok { background: rgba(31, 138, 91, 0.15); color: var(--ok); }
.badge.hidden { background: var(--chip); color: var(--ink-3); }
@media (max-width: 640px) {
  .tr { grid-template-columns: minmax(0, 1fr) 56px 70px; }
  .tr .stackbar-wrap { grid-column: 1 / -1; order: 5; }
  .tr.head .stackbar-wrap { display: none; }
}
.alerts { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.alerts li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--chip); font-size: 0.9rem; }
.alerts .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; }
.minis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.mini { padding: 12px; border-radius: 20px; }
.mini h3 { font-size: 0.95rem; }
.mini .meta { font-size: 0.76rem; color: var(--ink-3); margin-bottom: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 0.78rem; color: var(--ink-2); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.chart-line { width: 100%; height: auto; display: block; overflow: visible; }
.cl-grid { stroke: var(--line); stroke-width: 1; }
.cl-t { fill: var(--ink-3); font: 600 11px "Open Sans", sans-serif; }
.cl-v { font: 700 11px "Open Sans", sans-serif; }

/* Pessoas */
.tree { display: grid; gap: 6px; }
.node { padding: 10px 12px; border-radius: 16px; background: var(--chip); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.node b { font-weight: 600; }
.node small { color: var(--ink-3); display: block; font-size: 0.78rem; }
.tree { --ind: 14px; }
.ind { margin-left: calc(var(--d, 0) * var(--ind)); min-width: 0; }
.node .mn, .mrow .mn { min-width: 0; overflow-wrap: anywhere; }
.node.team { background: transparent; border: 1px dashed var(--line); }
@media (max-width: 760px) { .tree { --ind: 9px; } }
.prog { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.prog .track { width: 70px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.prog .fill { height: 100%; background: var(--orange); border-radius: 999px; }
label.f { display: block; font-weight: 600; font-size: 0.85rem; margin: 12px 0 6px; color: var(--ink-2); }
input.pill, select.pill { width: 100%; }
.msg { margin: 8px 0 0; font-size: 0.85rem; min-height: 1.2em; }
.msg.err { color: var(--danger); } .msg.ok { color: var(--ok); }
.hist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: var(--chip); font-size: 0.9rem; }
.toast {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  background: var(--blue-deep); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
  box-shadow: var(--shadow); max-width: calc(100vw - 32px); text-align: center;
}
@media (min-width: 761px) { .toast { bottom: 28px; } }
.foot { text-align: center; font-size: 0.78rem; color: var(--ink-3); margin-top: 6px; }

/* ===== Telas de entrada e novos componentes ===== */
.center-page { min-height: 70vh; display: grid; place-items: center; }
.auth-card { width: min(440px, 100%); padding: 28px; }
.auth-card .logo { height: 44px; margin-bottom: 18px; }
.auth-card p { color: var(--ink-2); margin: 6px 0 0; }
.auth-card form { margin-top: 18px; }
.err-text { color: var(--danger); }
.ok-text { color: var(--ok); }
.loading { color: var(--ink-3); padding: 40px 0; text-align: center; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--ink-2); }
.userbox b { color: var(--ink); font-weight: 600; }
.linkbtn { background: none; border: 0; color: var(--heading); font: 600 0.85rem "Open Sans", sans-serif; cursor: pointer; text-decoration: underline; padding: 4px; }
details.members { margin: 2px 0 6px 0; }
details.members > summary { cursor: pointer; color: var(--ink-2); font-size: 0.82rem; padding: 4px 6px; list-style: none; }
details.members > summary::-webkit-details-marker { display: none; }
details.members > summary::before { content: "\25B8  "; }
details.members[open] > summary::before { content: "\25BE  "; }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 10px; border-radius: 12px; font-size: 0.9rem; }
.mrow:hover { background: var(--chip); }
.mrow .mn { min-width: 0; overflow-wrap: anywhere; }
.mrow small { color: var(--ink-3); }
.mact { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.btn.xs { padding: 4px 11px; font-size: 0.72rem; }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.roundrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: var(--chip); font-size: 0.9rem; flex-wrap: wrap; }
.tag { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255, 109, 45, 0.18); color: var(--accent-ink); }
.empty-state { text-align: center; padding: 26px 10px; color: var(--ink-2); }
@media (max-width: 560px) {
  .retake > span { display: none; }
  .person { grid-template-columns: 30px minmax(0, 1fr) auto; }
}

textarea.pill.area { width: 100%; border-radius: 16px; font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; min-height: 120px; padding: 12px 14px; }
.errlist { margin: 6px 0 0; padding-left: 18px; font-weight: 600; }
.errlist li { margin: 2px 0; }
details > summary:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.hist.plain li { display: block; }

.steps { list-style: none; margin: 12px 0 4px; padding: 0; display: grid; gap: 6px; }
.steps li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, 0.72); font-weight: 600; }
.steps li.now { color: #fff; }
.steps li.done { color: rgba(255, 255, 255, 0.55); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.35); }
.steps .ck { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 0.78rem "Dosis", sans-serif; background: rgba(255, 255, 255, 0.16); flex: none; }
.steps li.now .ck { background: var(--orange); color: #2a1206; }
.steps li.done .ck { background: var(--sky); color: #10224f; }

.fixgrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); padding: 8px 8px 0; }
.fixgrid label { margin: 0; font-size: 0.75rem; font-weight: 600; color: var(--ink-3); }
.fixgrid input.pill { margin-top: 3px; width: 100%; }
details.members[open] { background: var(--chip); border-radius: 14px; padding-bottom: 4px; }

.iconbtn { all: unset; cursor: pointer; display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 6px; border-radius: 8px; color: var(--ink-3); vertical-align: middle; }
.iconbtn:hover { background: var(--chip); color: var(--heading); }
.iconbtn:focus-visible { outline: 3px solid var(--orange); outline-offset: 1px; }
dialog.edlg { border: 1px solid var(--glass-border); border-radius: 24px; padding: 22px; width: min(560px, calc(100vw - 32px)); background: var(--glass-solid); color: var(--ink); box-shadow: var(--shadow); font-family: inherit; }
dialog.edlg::backdrop { background: rgba(8, 12, 40, 0.6); backdrop-filter: blur(4px); }
dialog.edlg .fixgrid { padding: 0; margin-top: 4px; }
dialog.edlg .fixgrid label { display: block; }

.brand-flow { font: 700 3.4rem/1 "Dosis", sans-serif; letter-spacing: 0.04em; text-transform: uppercase; color: var(--orange); margin: 4px 0 0; }
.brand-sub { margin: 4px 0 8px; color: var(--ink-2); font-weight: 600; }

.bigbar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 8px; }
.bigbar > i { display: block; height: 100%; width: 0; background: var(--orange); border-radius: 999px; transition: width 0.3s; }
@media (prefers-reduced-motion: reduce) { .bigbar > i { transition: none; } }

.tag.sent { background: rgba(103, 207, 238, 0.18); color: var(--heading); }
.tag.ok { background: rgba(31, 138, 91, 0.18); color: var(--ok); }

.brand-flow { font-size: 2.2rem; line-height: 1.05; color: var(--heading); }
.brand-flow span { color: var(--orange); }
