/* Termos NetSpeed — interface baseada nas Human Interface Guidelines da Apple (mesma base do RHChat).
   Liquid Glass só na camada funcional (barra lateral, barras flutuantes, sheets); conteúdo em materiais padrão;
   cor de destaque reservada à ação principal; claro/escuro/alto contraste; respeita "reduzir transparência/movimento". */

/* ------------------------------------------------------------------ Tokens */
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --accent: #0071E3; --accent-text: #0066CC; --accent-soft: rgba(0, 113, 227, .12); --on-accent: #FFFFFF;
  --bg: #F2F2F7; --bg-el: #FFFFFF; --bg-2: #F2F2F7;
  --label: #000000; --label-2: #6C6C70; --label-3: #8E8E93;
  --fill-2: rgba(120, 120, 128, .16); --fill-3: rgba(118, 118, 128, .12); --fill-4: rgba(116, 116, 128, .08);
  --sep: rgba(60, 60, 67, .29); --sep-soft: rgba(60, 60, 67, .12);
  --red: #FF383C; --orange: #FF8D28; --yellow: #FFCC00; --green: #34C759; --teal: #00C3D0; --blue: #0088FF; --indigo: #6155F5; --purple: #CB30E0; --gray: #8E8E93;
  --red-text: #D70015; --orange-text: #B54D00; --green-text: #007D2E; --blue-text: #1E6EF4; --indigo-text: #4B3FD9; --purple-text: #A21FB5; --teal-text: #00707A;
  --glass: rgba(255, 255, 255, .80); --glass-edge: rgba(255, 255, 255, .80); --glass-shine: rgba(255, 255, 255, .70);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, .08), 0 2px 10px rgba(0, 0, 0, .04);
  --card-shadow: 0 0 0 .5px var(--sep-soft), 0 1px 2px rgba(0, 0, 0, .04);
  --seg-on: #FFFFFF;
  --scrim: rgba(0, 0, 0, .25);
  --r-xl: 28px; --r-lg: 22px; --r-md: 14px; --r-sm: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.4, .64, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent-text: #4DA6FF; --accent-soft: rgba(10, 132, 255, .22);
    --bg: #000000; --bg-el: #1C1C1E; --bg-2: #2C2C2E;
    --label: #FFFFFF; --label-2: #AEAEB2; --label-3: #8E8E93;
    --fill-2: rgba(120, 120, 128, .32); --fill-3: rgba(118, 118, 128, .24); --fill-4: rgba(118, 118, 128, .18);
    --sep: rgba(84, 84, 88, .65); --sep-soft: rgba(84, 84, 88, .40);
    --red: #FF4245; --orange: #FF9230; --yellow: #FFD600; --green: #30D158; --teal: #00D2E0; --blue: #0091FF; --indigo: #6D7CFF; --purple: #DB34F2;
    --red-text: #FF6165; --orange-text: #FFA056; --green-text: #4AD968; --blue-text: #5CB8FF; --indigo-text: #A3ABFF; --purple-text: #EA8DFF; --teal-text: #5FE3EC;
    --glass: rgba(38, 38, 42, .78); --glass-edge: rgba(255, 255, 255, .14); --glass-shine: rgba(255, 255, 255, .18);
    --glass-shadow: 0 12px 40px rgba(0, 0, 0, .45), 0 2px 10px rgba(0, 0, 0, .30);
    --card-shadow: 0 0 0 .5px var(--sep-soft); --seg-on: #636366; --scrim: rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent-text: #4DA6FF; --accent-soft: rgba(10, 132, 255, .22);
  --bg: #000000; --bg-el: #1C1C1E; --bg-2: #2C2C2E;
  --label: #FFFFFF; --label-2: #AEAEB2; --label-3: #8E8E93;
  --fill-2: rgba(120, 120, 128, .32); --fill-3: rgba(118, 118, 128, .24); --fill-4: rgba(118, 118, 128, .18);
  --sep: rgba(84, 84, 88, .65); --sep-soft: rgba(84, 84, 88, .40);
  --red: #FF4245; --orange: #FF9230; --yellow: #FFD600; --green: #30D158; --teal: #00D2E0; --blue: #0091FF; --indigo: #6D7CFF; --purple: #DB34F2;
  --red-text: #FF6165; --orange-text: #FFA056; --green-text: #4AD968; --blue-text: #5CB8FF; --indigo-text: #A3ABFF; --purple-text: #EA8DFF; --teal-text: #5FE3EC;
  --glass: rgba(38, 38, 42, .78); --glass-edge: rgba(255, 255, 255, .14); --glass-shine: rgba(255, 255, 255, .18);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, .45), 0 2px 10px rgba(0, 0, 0, .30);
  --card-shadow: 0 0 0 .5px var(--sep-soft); --seg-on: #636366; --scrim: rgba(0, 0, 0, .55);
}
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-contrast: more) {
  :root { --label-2: #48484A; --sep: rgba(60, 60, 67, .55); --sep-soft: rgba(60, 60, 67, .40); --glass: rgba(255, 255, 255, .95); }
  :root[data-theme="dark"] { --label-2: #D1D1D6; --sep: rgba(160, 160, 168, .7); --sep-soft: rgba(160, 160, 168, .45); --glass: rgba(28, 28, 30, .96); }
}

/* ------------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; font: 15px/1.45 var(--font); letter-spacing: -.005em; color: var(--label); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
a { color: var(--accent-text); }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 20px; height: 20px; margin: 0; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ico, .btn svg, .nav-item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.sm { width: 16px; height: 16px; }
.ico.lg { width: 28px; height: 28px; }

/* tipografia */
.large-title { font: 700 30px/1.15 var(--font-display); letter-spacing: -.022em; }
.title-2 { font: 700 22px/1.2 var(--font-display); letter-spacing: -.018em; }
.title-3 { font: 650 18px/1.25 var(--font-display); letter-spacing: -.015em; }
.headline { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.subhead { font-size: 13px; color: var(--label-2); }
.footnote { font-size: 12px; color: var(--label-2); }
.caption { font-size: 11px; color: var(--label-2); }
.muted { color: var(--label-2); }
.strong { font-weight: 600; }
.mono { font-family: var(--font-mono); letter-spacing: 0; }
.tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; text-decoration: none; background: var(--fill-3); color: var(--label); transition: transform .18s var(--spring), background-color .2s var(--ease), opacity .2s; }
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(.96); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--fill-3); color: var(--label-3); box-shadow: none; pointer-events: none; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 2px rgba(0, 60, 140, .25), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn-plain { background: transparent; color: var(--accent-text); padding: 0 8px; }
.btn-plain:hover { background: var(--fill-4); }
.btn-danger { color: var(--red-text); }
.btn-danger-fill { background: var(--red); color: #fff; }
.btn-lg { min-height: 50px; padding: 0 22px; font-size: 16px; }
.btn-sm { min-height: 30px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.btn .spin { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ App (computador) */
.app { display: flex; align-items: stretch; min-height: 100dvh; }
.side { position: sticky; top: 12px; flex: none; width: 252px; height: calc(100dvh - 24px); margin: 12px 0 12px 12px; border-radius: var(--r-xl); padding: 16px 12px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.glass { background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(190%); backdrop-filter: blur(30px) saturate(190%); border: .5px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-shine), var(--glass-shadow); }
@media (prefers-reduced-transparency: reduce) { .glass { background: var(--bg-el); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; text-decoration: none; color: inherit; }
.brand .name { font: 700 17px/1.1 var(--font-display); letter-spacing: -.02em; }
.brand .sub { font-size: 12px; color: var(--label-2); margin-top: 2px; }
.app-logo { width: 38px; height: 38px; border-radius: 9px; flex: none; box-shadow: 0 4px 12px rgba(13, 38, 189, .28); }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 11px; border-radius: 12px; color: var(--label); text-decoration: none; font-weight: 500; font-size: 14px; transition: background-color .15s var(--ease); }
.nav-item svg { width: 19px; height: 19px; color: var(--accent-text); }
.nav-item:hover { background: var(--fill-4); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.nav-item .badge { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--label-2); font-variant-numeric: tabular-nums; }
.nav-item[aria-current="page"] .badge { color: var(--accent-text); }
.nav-sec { font-size: 11px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .05em; padding: 16px 11px 6px; }
.side .spacer { flex: 1; min-height: 16px; }
.theme-switch { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; }
.theme-switch .label { font-size: 12px; color: var(--label-2); flex: 1; }
.theme-switch .seg button { width: 34px; min-height: 28px; padding: 0; display: grid; place-items: center; }
.theme-switch .seg svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: .5px solid var(--sep-soft); }
.me .who { flex: 1; min-width: 0; }
.me strong { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me form { margin: 0; }
.main { flex: 1; min-width: 0; padding: 0 28px 120px; }
.main:focus { outline: none; }
.wrap { max-width: 1240px; }
.wrap.narrow { max-width: 1040px; }
.toolbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 26px 0 18px; }
.toolbar .titles { flex: 1 1 320px; min-width: 0; }
.toolbar .titles p { margin-top: 4px; }
.toolbar .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 500; color: var(--accent-text); text-decoration: none; margin: 0 0 8px -4px; }
.back svg { width: 16px; height: 16px; }
.tabbar { display: none; }
.only-mobile { display: none !important; }

/* ------------------------------------------------------------------ Blocos */
.card { background: var(--bg-el); border-radius: var(--r-lg); box-shadow: var(--card-shadow); min-width: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; flex-wrap: wrap; }
.card-head .headline { flex: 1; }
.card-body { padding: 0 18px 18px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.stack-xs { display: flex; flex-direction: column; gap: 6px; }
.hstack { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.divider { height: .5px; background: var(--sep-soft); border: 0; margin: 0; }

.c-blue { --c: var(--blue); --ct: var(--blue-text); }
.c-orange { --c: var(--orange); --ct: var(--orange-text); }
.c-green { --c: var(--green); --ct: var(--green-text); }
.c-indigo { --c: var(--indigo); --ct: var(--indigo-text); }
.c-red { --c: var(--red); --ct: var(--red-text); }
.c-purple { --c: var(--purple); --ct: var(--purple-text); }
.c-teal { --c: var(--teal); --ct: var(--teal-text); }
.c-gray { --c: var(--gray); --ct: var(--label-2); }
.c-accent { --c: var(--accent); --ct: var(--accent-text); }
.tint { color: var(--ct); }

.stat { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; text-align: left; transition: transform .18s var(--spring); }
a.stat, button.stat { color: inherit; text-decoration: none; }
a.stat:active, button.stat:active { transform: scale(.98); }
.stat .num { font: 700 30px/1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 13px; color: var(--label-2); }
.icon-tile { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--ct); }
.icon-tile svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-tile.lg { width: 48px; height: 48px; border-radius: 14px; }
.icon-tile.lg svg { width: 26px; height: 26px; }

.tag { display: inline-flex; align-items: center; gap: 6px; min-height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--label); background: color-mix(in srgb, var(--c, var(--gray)) 16%, transparent); white-space: nowrap; }
.tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--gray)); flex: none; }
.tag svg { width: 13px; height: 13px; color: var(--ct); fill: none; stroke: currentColor; stroke-width: 2; }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #fff; background: var(--av, #6C6C70); letter-spacing: 0; object-fit: cover; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.xl { width: 84px; height: 84px; font-size: 29px; }

/* controles */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--fill-3); flex-wrap: wrap; }
.seg button { min-height: 30px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--label); transition: background-color .15s var(--ease); }
.seg button[aria-pressed="true"], .seg button.on { background: var(--seg-on); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px var(--sep-soft); }
.seg.sm button { min-height: 28px; padding: 0 11px; font-size: 12px; }
.seg button.ok[aria-pressed="true"] { color: var(--green-text); }
.seg button.nok[aria-pressed="true"] { color: var(--red-text); }
.seg.scroll { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg.scroll::-webkit-scrollbar { display: none; }
.seg.scroll button { flex: none; }
.search { position: relative; display: flex; align-items: center; min-width: 200px; }
.toolbar .search { min-width: 290px; }
.search svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--label-2); pointer-events: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search input { width: 100%; min-height: 36px; border: 0; border-radius: 999px; padding: 0 14px 0 34px; background: var(--fill-3); outline: none; font-size: 14px; }
.search input::placeholder { color: var(--label-2); }
.search input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 14px 0 11px; border-radius: 999px; background: var(--fill-3); font-size: 14px; font-weight: 500; color: var(--label); transition: transform .18s var(--spring), background-color .15s; }
.chip:active { transform: scale(.95); }
.chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.chip:not([aria-pressed="true"]) svg.check { display: none; }
.switch { width: 51px; height: 31px; border-radius: 999px; background: var(--fill-2); position: relative; flex: none; transition: background-color .2s var(--ease); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: left .25s var(--spring); }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { left: 22px; }
.switch:disabled { opacity: .5; }

/* formulário */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label, .flabel { font-size: 13px; font-weight: 500; color: var(--label-2); }
.field .req { color: var(--red-text); }
.input { width: 100%; min-height: 42px; border-radius: 12px; border: .5px solid var(--sep); background: var(--bg-el); padding: 0 12px; font-size: 15px; outline: none; transition: box-shadow .15s, border-color .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.ro, .input[readonly] { background: var(--fill-4); border-color: transparent; }
.input.invalid { border-color: var(--red); }
textarea.input { padding: 10px 12px; min-height: 96px; resize: vertical; line-height: 1.45; }
.select { position: relative; display: flex; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 34px; }
.select svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--label-2); width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hint { font-size: 12px; color: var(--label-2); }
.sec-title { display: flex; align-items: center; gap: 10px; padding: 18px 18px 12px; flex-wrap: wrap; }
.sec-title .headline { flex: 1; }
.num-badge { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 700; display: grid; place-items: center; flex: none; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--sep-soft); cursor: pointer; transition: box-shadow .15s, background-color .15s; }
.opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--bg-el)); }
.opt.disabled { opacity: .55; cursor: not-allowed; }
.opt input { margin-top: 1px; }
.opt .t { font-weight: 600; font-size: 14px; }
.opt .s { font-size: 13px; color: var(--label-2); margin-top: 2px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.4; cursor: pointer; }
.consent input { margin-top: 1px; }

/* listas */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 18px; border-top: .5px solid var(--sep-soft); text-decoration: none; color: var(--label); }
.list > .row:first-child { border-top: 0; }
a.row:hover, button.row:hover { background: var(--fill-4); }
button.row { width: 100%; text-align: left; }
.row .meta { flex: 1; min-width: 0; }
.row .t { font-size: 14px; font-weight: 500; }
.row .s { font-size: 12px; color: var(--label-2); }
.row .trail { display: flex; align-items: center; gap: 8px; color: var(--label-2); font-size: 13px; flex-wrap: wrap; justify-content: flex-end; }
.row .trail > svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.row.sel { background: var(--accent-soft); }

/* tabela de termos (vira cartões no celular) */
.tlist { display: flex; flex-direction: column; }
.trow { display: grid; grid-template-columns: 76px minmax(170px, 1.3fr) minmax(170px, 1.4fr) minmax(110px, .8fr) 190px 92px; gap: 12px; align-items: center; padding: 11px 18px; border-top: .5px solid var(--sep-soft); text-decoration: none; color: var(--label); }
.trow.np { grid-template-columns: 76px minmax(160px, 1.4fr) minmax(110px, .8fr) 190px 80px; }
.trow.head { font-size: 12px; font-weight: 600; color: var(--label-2); border-top: 0; padding-top: 6px; padding-bottom: 8px; }
a.trow:hover { background: var(--fill-4); }
.trow .num { font-family: var(--font-mono); font-size: 13px; }
.trow .cell-main, .trow .cell-sub { display: block; }
.trow .cell-sub { font-size: 12px; color: var(--label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .cell-main { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person > div, .person > span { min-width: 0; overflow: hidden; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--label-2); padding: 10px 14px; border-bottom: .5px solid var(--sep-soft); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: .5px solid var(--sep-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 18px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 18px; }
.tbl tr.hl td { background: color-mix(in srgb, var(--orange) 9%, transparent); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 18px; font-size: 14px; }
.kv dt { color: var(--label-2); }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.kv.stacked { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.kv.stacked dt { font-size: 12px; }
.kv.stacked dd { margin-bottom: 8px; }
.tbl td.act { min-width: 150px; }
.insp .seg { flex: none; width: 140px; justify-content: space-between; }
.insp .hcol { width: 140px; flex: none; }
.insp .hcol.e { width: 76px; }

/* inspeção */
.insp { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 18px; border-top: .5px solid var(--sep-soft); }
.insp .name { flex: 1 1 220px; font-size: 14px; font-weight: 500; }
.insp .obs { flex: 1 1 220px; }
.insp .obs .input { min-height: 36px; font-size: 14px; }
.insp.div { background: color-mix(in srgb, var(--orange) 8%, transparent); }

/* fotos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.photo { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; background: var(--fill-3); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--label-2); font-size: 12px; font-weight: 500; text-align: center; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 11px; font-weight: 600; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo .del { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; }
.photo .del svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.photo .pin { position: absolute; top: 6px; left: 6px; }
.photo.add { background: transparent; border: 1.5px dashed var(--sep); color: var(--accent-text); cursor: pointer; }
.photo.add svg, .photo > svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; }
button.photo { width: 100%; }

/* etapas */
.steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 500; color: var(--label-2); }
.step { display: inline-flex; align-items: center; gap: 8px; }
.step .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--fill-3); color: var(--label-2); }
.step .n svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.8; }
.step.on { color: var(--label); }
.step.on .n { background: var(--accent); color: #fff; }
.step.done .n { background: var(--accent-soft); color: var(--accent-text); }
.steps .line { width: 28px; height: 1.5px; background: var(--sep); }

/* linha do tempo */
.tl { padding: 4px 18px 10px; }
.tl li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; position: relative; padding-bottom: 16px; }
.tl li::before { content: ""; position: absolute; left: 13.25px; top: 30px; bottom: 2px; width: 1.5px; background: var(--sep-soft); }
.tl li:last-child::before { display: none; }
.tl .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--ct); }
.tl .dot svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tl .t { font-size: 14px; font-weight: 500; }
.tl .s { font-size: 12px; color: var(--label-2); overflow-wrap: anywhere; }
.tl .when { font-size: 12px; color: var(--label-2); font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 2px; }

/* avisos */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r-md); background: color-mix(in srgb, var(--c) 11%, var(--bg-el)); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--c) 40%, transparent); font-size: 14px; }
.banner > svg { color: var(--ct); margin-top: 1px; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.banner ul { list-style: disc; padding-left: 18px; margin-top: 4px; }
.empty { text-align: center; padding: 40px 18px; color: var(--label-2); }
.empty svg { width: 36px; height: 36px; margin: 0 auto 10px; color: var(--label-3); fill: none; stroke: currentColor; stroke-width: 1.5; }
.empty strong { display: block; color: var(--label); font-size: 15px; margin-bottom: 4px; }
.loading { display: grid; place-items: center; padding: 60px; color: var(--label-2); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.saved { font-size: 12px; color: var(--label-2); display: inline-flex; align-items: center; gap: 6px; }

/* cláusulas */
.clause { border-top: .5px solid var(--sep-soft); }
.clause summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 18px; cursor: pointer; font-size: 14px; font-weight: 500; }
.clause summary::-webkit-details-marker { display: none; }
.clause summary svg { width: 16px; height: 16px; color: var(--label-2); margin-left: auto; transition: transform .2s var(--ease); fill: none; stroke: currentColor; stroke-width: 1.8; }
.clause[open] summary svg { transform: rotate(90deg); }
.clause .body { padding: 0 18px 14px; font-size: 14px; color: var(--label); }
.rich p + p, .rich p + ul, .rich ul + p, .rich p + ol, .rich ol + p { margin-top: 6px; }
.rich ul { list-style: disc; padding-left: 20px; }
.rich ol { list-style: decimal; padding-left: 22px; }
.rich li + li { margin-top: 2px; }

/* ------------------------------------------------------------------ Sheets, toasts e menus */
.sheet-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: var(--scrim); animation: fade .2s var(--ease); }
.sheet.glass { background: color-mix(in srgb, var(--bg-el) 94%, transparent); }
.sheet { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: var(--r-xl); padding: 22px; animation: rise .32s var(--spring); }
.sheet.wide { width: min(760px, 100%); }
.sheet h2 { font: 700 20px/1.25 var(--font-display); letter-spacing: -.015em; margin-bottom: 6px; }
.sheet .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(560px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; font-size: 14px; font-weight: 500; animation: rise .3s var(--spring); max-width: 100%; }
.toast svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.toast.ok svg { color: var(--green-text); }
.toast.err svg { color: var(--red-text); }
.toast.info svg { color: var(--accent-text); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .25s var(--ease); }
.viewer { position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, .88); display: grid; place-items: center; padding: 20px; }
.viewer img { max-width: 100%; max-height: calc(100dvh - 90px); border-radius: 12px; }
.viewer .cap { color: #fff; margin-top: 10px; text-align: center; font-size: 14px; }
.viewer .close { position: absolute; top: 16px; right: 16px; }

/* ------------------------------------------------------------------ Login / páginas simples */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth .panel { width: min(420px, 100%); border-radius: var(--r-xl); padding: 34px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.auth .panel .app-logo { width: 64px; height: 64px; border-radius: 15px; }
.auth h1 { font: 700 26px/1.2 var(--font-display); letter-spacing: -.02em; }
.auth p { color: var(--label-2); }
.auth .foot { font-size: 12px; color: var(--label-2); margin-top: 8px; }
.note { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: 14px; font-size: 14px; background: var(--fill-4); width: 100%; }
.note.err { background: color-mix(in srgb, var(--red) 12%, transparent); }
.note.warn { background: color-mix(in srgb, var(--orange) 14%, transparent); }
.note code { font-family: var(--font-mono); background: var(--fill-3); padding: 1px 6px; border-radius: 6px; }

/* ------------------------------------------------------------------ Página de assinatura (celular primeiro) */
.sign { max-width: 600px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.sign-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; padding-top: max(12px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
.sign-bar .ttl { flex: 1; text-align: center; font-weight: 600; font-size: 16px; min-width: 0; }
.sign-bar .ttl .caption { font-weight: 500; }
.sign-bar .side-btn { min-width: 76px; display: flex; }
.sign-bar .side-btn.r { justify-content: flex-end; }
.progress { display: flex; gap: 6px; padding: 0 16px 10px; position: sticky; top: 58px; z-index: 19; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
.sign ~ .toasts { top: max(70px, env(safe-area-inset-top)); bottom: auto !important; }
.progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--fill-2); transition: background-color .3s; }
.progress span.on { background: var(--accent); }
.sign-body { flex: 1; padding: 6px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.sign-foot { position: sticky; bottom: 0; z-index: 20; padding: 12px 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; border-top: .5px solid var(--sep-soft); }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 16px 8px; }
.seal { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--ct); }
.seal svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.otp { display: flex; gap: 8px; justify-content: center; }
.otp input { width: 46px; height: 58px; border-radius: 12px; text-align: center; font-size: 26px; font-weight: 600; border: .5px solid var(--sep); background: var(--bg-el); outline: none; padding: 0; }
.otp input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sigpad { position: relative; height: 230px; border-radius: var(--r-lg); background: #FFFFFF; box-shadow: var(--card-shadow); touch-action: none; overflow: hidden; }
.sigpad canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.sigpad .base { position: absolute; left: 24px; right: 24px; bottom: 58px; border-top: 1.5px dashed rgba(60, 60, 67, .35); pointer-events: none; }
.sigpad .x { position: absolute; left: 24px; bottom: 64px; font-size: 20px; color: #8E8E93; pointer-events: none; }
.sigpad .lbl { position: absolute; left: 24px; bottom: 22px; font-size: 12px; color: #6C6C70; pointer-events: none; }
.sigpad .clear { position: absolute; right: 12px; top: 12px; background: rgba(118, 118, 128, .12); color: #000; }
.sigpad .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #8E8E93; font-size: 15px; pointer-events: none; }
.doc-sec { padding: 0; }
.doc-sec .card-head { padding-bottom: 8px; }
.end-mark { height: 1px; }

/* verificação */
.verify { max-width: 520px; margin: 0 auto; padding: 24px 16px 60px; display: flex; flex-direction: column; gap: 16px; }

/* ------------------------------------------------------------------ Celular */
@media (max-width: 1100px) {
  .trow { grid-template-columns: 70px minmax(150px, 1.2fr) minmax(150px, 1.2fr) 180px 80px; }
  .trow .c-resp { display: none; }
}
@media (max-width: 860px) {
  .side { display: none; }
  .main { padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
  .only-mobile { display: inline-flex !important; }
  .toolbar { padding-top: max(18px, env(safe-area-inset-top)); }
  .large-title { font-size: 28px; }
  .tabbar { display: flex; position: fixed; z-index: 50; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); border-radius: 26px; padding: 6px; justify-content: space-around; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 18px; font-size: 10.5px; font-weight: 600; color: var(--label-2); text-decoration: none; }
  .tabbar a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }
  .trow.np { grid-template-columns: 76px minmax(160px, 1.4fr) minmax(110px, .8fr) 190px 80px; }
.trow.head { display: none; }
  .trow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "p s" "i i" "n u"; gap: 6px 10px; padding: 12px 16px; }
  .trow .c-num { grid-area: n; }
  .trow .c-person { grid-area: p; }
  .trow .c-item { grid-area: i; padding-left: 38px; }
  .trow .c-status { grid-area: s; }
  .trow .c-upd { grid-area: u; text-align: right; }
  .trow .c-num, .trow .c-upd { font-size: 12px; color: var(--label-2); }
  .trow .c-num { padding-left: 38px; }
  .toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .sheet-backdrop { place-items: end center; padding: 0; }
  .sheet { width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: max(22px, env(safe-area-inset-bottom)); max-height: 92dvh; }
  .sheet.wide { width: 100%; }
}
@media (max-width: 640px) {
  .tbl.stackable thead { display: none; }
  .tbl.stackable tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 16px; border-bottom: .5px solid var(--sep-soft); }
  .tbl.stackable td { padding: 0 !important; border: 0; }
  .tbl.stackable td.wide { grid-column: 1 / -1; }
  .tbl.stackable td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 500; color: var(--label-2); margin-bottom: 4px; }
  .tbl.stackable input, .tbl.stackable .select { width: 100% !important; min-width: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
