/* ==========================================================================
   Radar · Liquid Glass
   Sistema visual inspirado no iOS 26 / macOS: vidro translúcido com borda de luz,
   cantos contínuos, tipografia SF, cápsulas e movimento com mola.
   Uma fonte só para a central (login, conta, admin) e para o app do corretor.
   ========================================================================== */
:root {
  color-scheme: dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Inter", "Segoe UI", Roboto, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  --accent: #0a84ff;
  --accent-hi: #4aa8ff;
  --accent-ink: #fff;
  --mint: #64d2ff;
  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff453a;
  --pink: #ff5fa2;
  --blue: #0a84ff;

  --bg: #03060d;
  --ink: rgba(255, 255, 255, .95);
  --ink-2: rgba(235, 235, 245, .64);
  --ink-3: rgba(235, 235, 245, .36);
  --hair: rgba(255, 255, 255, .09);
  --fill: rgba(120, 120, 135, .20);
  --fill-2: rgba(120, 120, 135, .13);
  --glass: rgba(34, 44, 68, .34);
  --glass-hi: rgba(52, 64, 92, .5);
  --glass-solid: rgba(22, 23, 32, .82);
  --rim-a: rgba(255, 255, 255, .55);
  --rim-b: rgba(255, 255, 255, .06);
  --shadow: 0 1px 1px rgba(0, 0, 0, .25), 0 12px 32px -8px rgba(0, 0, 0, .55), 0 40px 80px -30px rgba(0, 0, 0, .6);

  --r-s: 12px;
  --r-m: 18px;
  --r-l: 26px;
  --r-xl: 34px;
  --spring: cubic-bezier(.32, 1.4, .56, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --blur: blur(30px) saturate(190%);
}
@media (prefers-color-scheme: light) {
  :root:not(.dark) {
    color-scheme: light;
    --accent: #007aff;
    --accent-hi: #1a8cff;
    --bg: #e9ebf3;
    --ink: rgba(0, 0, 0, .9);
    --ink-2: rgba(60, 60, 67, .66);
    --ink-3: rgba(60, 60, 67, .38);
    --hair: rgba(0, 0, 0, .08);
    --fill: rgba(120, 120, 128, .14);
    --fill-2: rgba(120, 120, 128, .08);
    --glass: rgba(255, 255, 255, .52);
    --glass-hi: rgba(255, 255, 255, .7);
    --glass-solid: rgba(250, 250, 253, .86);
    --rim-a: rgba(255, 255, 255, .95);
    --rim-b: rgba(255, 255, 255, .25);
    --shadow: 0 1px 1px rgba(20, 20, 40, .06), 0 12px 30px -10px rgba(30, 30, 60, .18), 0 40px 80px -30px rgba(30, 30, 70, .22);
    --green: #28b84c;
    --orange: #e58a00;
    --red: #e5352b;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; color: var(--ink); background: transparent;
  font: 15px/1.47 var(--font); letter-spacing: -.008em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }
a { color: var(--accent-hi); text-decoration: none; }
a:hover { text-decoration: none; opacity: .85; }
b, strong { font-weight: 650; }
code { font: 12.5px var(--mono); }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 10px; }

/* ---------- papel de parede vivo (atrás do vidro) ---------- */
.wall { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.wall i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .8; will-change: transform; animation: drift 26s var(--ease) infinite alternate; }
.wall i:nth-child(1) { width: 62vmax; height: 62vmax; left: -18vmax; top: -24vmax; background: radial-gradient(circle at 40% 40%, #0a6cff, transparent 62%); }
.wall i:nth-child(2) { width: 50vmax; height: 50vmax; right: -16vmax; top: 6vmax; background: radial-gradient(circle at 50% 50%, #18c6ff, transparent 60%); animation-duration: 31s; animation-delay: -7s; opacity: .5; }
.wall i:nth-child(3) { width: 54vmax; height: 34vmax; left: calc(50% - 27vmax); top: calc(50% - 10vmax); background: radial-gradient(ellipse at 50% 50%, #1f5bff, transparent 62%); animation-duration: 36s; animation-delay: -14s; opacity: .55; }
.wall::after { /* grão fino: tira o aspecto de "gradiente de template" */
  content: ""; position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: light) {
  :root:not(.dark) .wall i { opacity: .32; }
  :root:not(.dark) .wall i:nth-child(2) { opacity: .26; }
  :root:not(.dark) .wall i:nth-child(3) { opacity: .2; }
}
@keyframes drift { to { transform: translate3d(6vmax, 5vmax, 0) scale(1.12); } }

/* ---------- material de vidro ---------- */
.glass, .card, .group, .tile, .bar, .sheet, .toast, .side, .tabbar {
  position: relative; background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  border-radius: var(--r-l);
}
.glass::before, .card::before, .group::before, .tile::before, .bar::before, .sheet::before, .toast::before, .side::before, .tabbar::before {
  /* borda de luz: brilho no canto de cima, some no meio, volta de leve embaixo */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, var(--rim-a), var(--rim-b) 28%, transparent 55%, var(--rim-b) 85%, color-mix(in srgb, var(--rim-a) 45%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.glass::after, .card::after, .tile::after { /* reflexo especular no topo */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(140% 70% at 50% -18%, rgba(255, 255, 255, .10), transparent 58%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .card, .group, .tile, .bar, .sheet, .toast, .side, .tabbar { background: var(--glass-solid); }
}

/* ---------- tipografia ---------- */
.large { font: 700 34px/1.1 var(--font); letter-spacing: -.028em; margin: 0; }
h1 { font-size: 28px; line-height: 1.12; font-weight: 700; letter-spacing: -.026em; margin: 0 0 6px; }
h2 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; margin: 0 0 4px; }
h3 { font-size: 16px; font-weight: 650; letter-spacing: -.012em; margin: 0; }
.sub { color: var(--ink-2); margin: 0 0 18px; }
.cap { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); text-transform: uppercase; }
.hint { font-size: 13px; color: var(--ink-2); margin: 8px 2px 0; line-height: 1.45; }
.num { font-family: var(--font-round); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted { color: var(--ink-2); }
.section-title { font-size: 13px; color: var(--ink-2); font-weight: 500; margin: 26px 18px 8px; text-transform: none; letter-spacing: 0; }

/* ---------- botões em cápsula ---------- */
button, .btn {
  -webkit-appearance: none; appearance: none; border: 0; cursor: pointer; position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; white-space: nowrap;
  font: 600 15px/1 var(--font); letter-spacing: -.01em; color: var(--accent-ink);
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 8px 22px -8px color-mix(in srgb, var(--accent) 80%, transparent);
  transition: transform .45s var(--spring), filter .2s, opacity .2s, background .2s;
}
button:hover, .btn:hover { filter: brightness(1.07); opacity: 1; }
button:active, .btn:active { transform: scale(.955); transition-duration: .12s; }
button[disabled] { opacity: .55; cursor: default; }
button.busy { color: transparent; }
button.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ghost, button.ghost, .btn.ghost {
  color: var(--ink); background: var(--fill);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 .5px var(--hair);
}
.tint, button.tint { color: var(--accent-hi); background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--accent) 35%, transparent); }
.danger, button.danger { color: var(--red); background: color-mix(in srgb, var(--red) 13%, transparent); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--red) 30%, transparent); }
.ok-btn, button.ok-btn { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--green) 30%, transparent); }
.sm, button.sm, .btn.sm { min-height: 32px; padding: 0 14px; font-size: 13px; }
.block { width: 100%; }
.link { background: none; box-shadow: none; color: var(--accent-hi); padding: 0 6px; min-height: 32px; font-weight: 500; }
.iconbtn { width: 38px; min-height: 38px; padding: 0; }

/* ---------- formulários: listas agrupadas (Ajustes do iOS) ---------- */
form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.group { border-radius: var(--r-m); padding: 0; overflow: hidden; }
.group > label, .group > .item { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 52px; position: relative; }
.group > label + label::before, .group > .item + .item::before, .group > label + .item::before, .group > .item + label::before {
  content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--hair);
}
.group > label > span { flex: 0 0 auto; min-width: 92px; color: var(--ink); font-size: 15px; }
.group input, .group select, .group textarea { flex: 1; min-width: 0; background: transparent; border: 0; box-shadow: none; padding: 14px 0; min-height: 50px; text-align: right; }
.group.stack > label { flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 16px 6px; }
.group.stack > label > span { font-size: 12px; color: var(--ink-2); font-weight: 500; min-width: 0; }
.group.stack input, .group.stack select { text-align: left; padding: 4px 0 8px; min-height: 30px; }
input, select, textarea {
  font: 16px var(--font); color: var(--ink); caret-color: var(--accent-hi); outline: none; letter-spacing: -.01em;
  background: var(--fill-2); border: 0; border-radius: var(--r-s); padding: 12px 14px; min-height: 46px;
  box-shadow: inset 0 0 0 .5px var(--hair); transition: box-shadow .2s, background .2s;
}
input::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 .5px var(--hair), 0 0 0 3px color-mix(in srgb, var(--accent) 32%, transparent); }
.group input:focus, .group select:focus { box-shadow: none; }
.group > label:focus-within { background: color-mix(in srgb, var(--accent) 7%, transparent); }
select { -webkit-appearance: none; appearance: none; padding-right: 26px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14'%3E%3Cpath d='M1.5 5 5 1.5 8.5 5M1.5 9 5 12.5 8.5 9' fill='none' stroke='%23999' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center; }
.group select { background-position: right 0 center; }
option { background: #1c1c24; color: #fff; }
input[type=checkbox] { -webkit-appearance: none; appearance: none; width: 51px; height: 31px; min-height: 31px; padding: 0; border-radius: 99px; background: var(--fill); position: relative; cursor: pointer; flex: 0 0 auto; transition: background .3s var(--ease); box-shadow: inset 0 0 0 .5px var(--hair); }
input[type=checkbox]::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, .25), 0 1px 1px rgba(0, 0, 0, .1); transition: transform .45s var(--spring); }
input[type=checkbox]:checked { background: var(--green); }
input[type=checkbox]:checked::after { transform: translateX(20px); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; }

/* ---------- listas ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; align-items: center; gap: 14px; padding: 13px 16px; position: relative; min-height: 56px; }
.rows > li + li::before { content: ""; position: absolute; top: 0; left: 62px; right: 0; height: .5px; background: var(--hair); }
.rows.flat > li + li::before { left: 16px; }
.rows .grow { flex: 1; min-width: 0; }
.rows .t { display: block; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .d { display: block; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows a.li { display: contents; color: inherit; }
.chev { width: 8px; height: 13px; opacity: .35; flex: 0 0 auto; }
.empty { color: var(--ink-2); padding: 26px 16px; text-align: center; }

/* ícone em "squircle" (como os ícones dos Ajustes) */
.ico { width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto; display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c, var(--accent)) 82%, #fff), var(--c, var(--accent)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 6px -2px color-mix(in srgb, var(--c, var(--accent)) 70%, transparent); }
.ico svg { width: 18px; height: 18px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 650 14px var(--font-round); color: #fff; flex: 0 0 auto;
  background: linear-gradient(160deg, hsl(var(--h, 250) 80% 66%), hsl(calc(var(--h, 250) + 40) 70% 48%)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }

/* ---------- selos, pontos, progresso ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 99px; padding: 3px 10px; color: var(--ink-2); background: var(--fill); white-space: nowrap; letter-spacing: 0; }
.pill.ativo, .pill.ok { color: var(--green); background: color-mix(in srgb, var(--green) 15%, transparent); }
.pill.teste, .pill.warn { color: var(--orange); background: color-mix(in srgb, var(--orange) 15%, transparent); }
.pill.suspenso, .pill.cancelado, .pill.no { color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }
.pill.acc { color: var(--accent-hi); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: 0 0 auto; display: inline-block; }
.dot.ok { background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 20%, transparent), 0 0 12px var(--green); }
.dot.warn { background: var(--orange); box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 20%, transparent); }
.dot.no { background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 20%, transparent); }
.track { display: block; height: 6px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.track > u { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--mint)); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent); transition: width .9s var(--spring); }
.ring { --p: 0; --sz: 44px; width: var(--sz); height: var(--sz); border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  background: conic-gradient(var(--mint) calc(var(--p) * 1%), var(--fill) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--glass-solid); }
.ring > b { position: relative; font: 650 12px var(--font-round); font-variant-numeric: tabular-nums; }

/* ---------- toast (banner que desce do topo) ---------- */
.toast, #toast { position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top)); z-index: 50; transform: translate(-50%, -140%) scale(.92);
  min-width: 220px; max-width: min(92vw, 460px); padding: 13px 18px; border-radius: 22px; font-weight: 550; font-size: 14px; display: flex; gap: 10px; align-items: center;
  opacity: 0; transition: transform .55s var(--spring), opacity .3s; background: var(--glass-hi); }
#toast.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
#toast.err { color: #ffb4ae; }
@media (prefers-color-scheme: light) { :root:not(.dark) #toast.err { color: var(--red); } }

/* ---------- segmentado ---------- */
.seg { display: inline-flex; position: relative; padding: 3px; border-radius: 99px; background: var(--fill); box-shadow: inset 0 0 0 .5px var(--hair); }
.seg button { background: none; box-shadow: none; color: var(--ink-2); min-height: 34px; padding: 0 16px; font-size: 14px; position: relative; z-index: 1; }
.seg button.on { color: var(--ink); }
.seg .lens { position: absolute; top: 3px; bottom: 3px; border-radius: 99px; background: var(--glass-hi); box-shadow: 0 3px 10px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 0 0 .5px var(--hair); transition: transform .55s var(--spring), width .55s var(--spring); }

/* ---------- entrada suave ---------- */
.rise { animation: rise .7s var(--spring) both; }
.rise:nth-child(2) { animation-delay: .04s; } .rise:nth-child(3) { animation-delay: .08s; } .rise:nth-child(4) { animation-delay: .12s; }
.rise:nth-child(5) { animation-delay: .16s; } .rise:nth-child(6) { animation-delay: .2s; } .rise:nth-child(n+7) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}
