/* ==========================================================================
   Echo · Componentes
   Prefixo e-  ·  todos os valores vêm de tokens.css
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--dur-3) var(--ease-out), color var(--dur-3) var(--ease-out);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; }
.e-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Atmosfera: aura de degradê + grão ---------- */
.e-aura {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden;
  background: var(--bg);
}
.e-aura::before, .e-aura::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px);
  opacity: var(--aura); transition: background var(--dur-3) var(--ease-out), opacity var(--dur-3);
}
.e-aura::before {
  width: 62vmax; height: 62vmax; top: -24vmax; right: -14vmax;
  background: radial-gradient(circle at 40% 40%, color-mix(in oklab, var(--p2) 55%, transparent), transparent 62%);
}
.e-aura::after {
  width: 58vmax; height: 58vmax; bottom: -26vmax; left: -18vmax;
  background: radial-gradient(circle at 60% 50%, color-mix(in oklab, var(--mix) 50%, transparent), transparent 64%);
}
.e-aura i {
  position: absolute; width: 40vmax; height: 40vmax; top: 34%; left: 38%; border-radius: 50%;
  filter: blur(100px); opacity: calc(var(--aura) * .55);
  background: radial-gradient(circle, color-mix(in oklab, var(--p3) 70%, transparent), transparent 65%);
}
.e-grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Material: vidro líquido ---------- */
.e-glass, .e-lite {
  position: relative;
  background: linear-gradient(165deg, var(--glass-hi) 0%, var(--glass) 42%, var(--glass-lo) 100%);
  box-shadow: var(--glass-inset), var(--sh-2);
  border-radius: var(--r-xl);
}
/* Desfoque real só em camadas flutuantes (barra fixa, menus, modais, rótulos sobre imagem).
   Muitos backdrop-filter numa mesma página esgotam a composição do navegador. */
.e-blur { -webkit-backdrop-filter: blur(var(--blur)) saturate(175%); backdrop-filter: blur(var(--blur)) saturate(175%); }
.e-lite { background: linear-gradient(170deg, var(--glass-hi), var(--glass-tint)); box-shadow: var(--glass-inset), var(--sh-1); }
.e-glass::before, .e-lite::before, .e-rim::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, var(--glass-edge) 0%, transparent 32%, transparent 62%, var(--glass-edge-2) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.e-rim { position: relative; }

/* ---------- Ícones ---------- */
.e-ic { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.25em; }
.e-ic.fill { fill: currentColor; stroke: none; }
.e-ic.sm { width: 16px; height: 16px; } .e-ic.md { width: 20px; height: 20px; } .e-ic.lg { width: 24px; height: 24px; }

/* ---------- Tipografia utilitária ---------- */
.e-display { font-family: var(--font-display); font-weight: 300; font-size: var(--fs-display); line-height: 1; letter-spacing: var(--tracking-display); }
.e-h1 { font-size: var(--fs-h1); font-weight: 600; line-height: var(--lh-tight); letter-spacing: -.025em; text-wrap: balance; }
.e-h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.e-h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.2; letter-spacing: -.012em; }
.e-h4 { font-size: var(--fs-h4); font-weight: 600; line-height: var(--lh-snug); letter-spacing: -.005em; }
.e-body { font-size: var(--fs-body); line-height: var(--lh-body); }
.e-small { font-size: var(--fs-sm); color: var(--ink-2); }
.e-caption { font-size: var(--fs-xs); color: var(--ink-3); }
.e-label { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.e-kpi { font-size: var(--fs-kpi); font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.e-serif { font-family: var(--font-display); font-style: normal; font-weight: 300; letter-spacing: -.02em; }
.e-grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tnum { font-variant-numeric: tabular-nums; }
.e-mono { font-family: var(--font-mono); }

/* ==========================================================================
   BOTÕES
   ========================================================================== */
.e-btn {
  --h: 42px; --px: 20px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 var(--px); border: 0; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; letter-spacing: .005em; white-space: nowrap; text-decoration: none;
  isolation: isolate; user-select: none;
  transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), background var(--dur-2), color var(--dur-2), opacity var(--dur-2);
}
.e-btn.sm { --h: 34px; --px: 14px; font-size: 13px; gap: 6px; }
.e-btn.lg { --h: 50px; --px: 26px; font-size: 15px; }
.e-btn.block { width: 100%; }
.e-btn.wrap { white-space: normal; height: auto; min-height: var(--h); padding-block: 10px; line-height: 1.3; text-align: left; }

/* primário: gel colorido com brilho especular */
.e-btn.primary {
  color: var(--on-accent); background: var(--grad);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -10px 18px -10px rgba(0, 0, 0, .28),
    inset 0 0 0 1px rgba(255, 255, 255, .16),
    0 10px 24px -10px color-mix(in oklab, var(--p1) 75%, transparent),
    0 2px 6px -2px color-mix(in oklab, var(--p1) 45%, transparent);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
}
.e-btn.primary::after {
  content: ""; position: absolute; left: 12%; right: 12%; top: 2px; height: 46%; border-radius: var(--r-pill); z-index: -1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0)); pointer-events: none;
}
.e-btn.primary:hover, .e-btn.primary.is-hover { transform: translateY(-1px); box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -10px 18px -10px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(255, 255, 255, .2),
    0 16px 30px -12px color-mix(in oklab, var(--p1) 85%, transparent), 0 2px 6px -2px color-mix(in oklab, var(--p1) 45%, transparent); }

/* secundário: vidro */
.e-btn.secondary {
  color: var(--ink); background: linear-gradient(170deg, var(--glass-hi), var(--glass-tint));
  box-shadow: var(--glass-inset), inset 0 0 0 1px var(--line), var(--sh-1);
}
.e-btn.secondary:hover, .e-btn.secondary.is-hover { transform: translateY(-1px); box-shadow: var(--glass-inset), inset 0 0 0 1px var(--line-2), var(--sh-2); }

/* discreto */
.e-btn.ghost { color: var(--ink-2); background: transparent; }
.e-btn.ghost:hover, .e-btn.ghost.is-hover { background: var(--hover); color: var(--ink); }

/* destrutivo */
.e-btn.danger {
  color: #fff; background: linear-gradient(140deg, #E23D57, #F26A5E);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -10px 18px -10px rgba(0, 0, 0, .25), 0 10px 22px -10px rgba(226, 61, 87, .7);
}
.e-btn.danger:hover, .e-btn.danger.is-hover { transform: translateY(-1px); }
.e-btn.danger-soft { color: var(--danger); background: var(--danger-soft); }
.e-btn.danger-soft:hover { background: color-mix(in oklab, var(--danger) 18%, transparent); }

/* acento suave */
.e-btn.tonal { color: var(--accent-ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 16%, transparent); }
.e-btn.tonal:hover { background: color-mix(in oklab, var(--accent) 19%, transparent); }

/* ícone */
.e-btn.icon { width: var(--h); padding: 0; }
.e-btn.icon .e-ic { width: 19px; height: 19px; }
.e-btn.sm.icon .e-ic { width: 16px; height: 16px; }

.e-btn:active, .e-btn.is-active { transform: scale(.97) !important; }
.e-btn:focus-visible, .e-btn.is-focus { box-shadow: var(--ring), var(--sh-1) !important; }
.e-btn.primary:focus-visible, .e-btn.primary.is-focus { box-shadow: inset 0 1px 0 rgba(255,255,255,.55), var(--ring), 0 10px 24px -10px color-mix(in oklab, var(--p1) 75%, transparent) !important; }
.e-btn:disabled, .e-btn.is-disabled { opacity: .42; pointer-events: none; box-shadow: none; filter: saturate(.6); }
.e-btn.is-loading { pointer-events: none; color: transparent !important; text-shadow: none; }
.e-btn.is-loading::before {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-color: rgba(255, 255, 255, .9) rgba(255, 255, 255, .9) rgba(255, 255, 255, .25) rgba(255, 255, 255, .25);
  animation: e-spin .8s linear infinite;
}
.e-btn.secondary.is-loading::before, .e-btn.ghost.is-loading::before, .e-btn.tonal.is-loading::before {
  border-color: var(--ink-2) var(--ink-2) var(--line-2) var(--line-2);
}
@keyframes e-spin { to { transform: rotate(360deg); } }
.e-kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; color: var(--ink-3); background: var(--hover); box-shadow: inset 0 0 0 1px var(--line), inset 0 -1px 0 var(--line-2); }

/* grupo segmentado */
.e-seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--r-pill); position: relative; }
.e-seg button {
  position: relative; z-index: 1; border: 0; background: transparent; height: 34px; padding: 0 16px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; transition: color var(--dur-2);
}
.e-seg button:hover { color: var(--ink); }
.e-seg button[aria-pressed="true"], .e-seg button[aria-selected="true"] { color: var(--ink); }
.e-seg .e-seg-pill {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; border-radius: var(--r-pill);
  background: linear-gradient(170deg, var(--glass-strong), var(--glass-hi));
  box-shadow: var(--glass-inset), 0 0 0 1px var(--line), var(--sh-1);
  transition: left var(--dur-3) var(--ease-spring), width var(--dur-3) var(--ease-spring);
}
.e-seg button:focus-visible { box-shadow: var(--ring); }

/* ==========================================================================
   CAMPOS
   ========================================================================== */
.e-field { display: grid; gap: 7px; min-width: 0; }
.e-field > label, .e-field .e-field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.e-field .e-field-label span { font-weight: 500; color: var(--ink-4); }
.e-input {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px;
  border-radius: var(--r-md); background: var(--field); box-shadow: var(--field-sunk);
  color: var(--ink-3); transition: box-shadow var(--dur-2), background var(--dur-2);
}
.e-input.pill { border-radius: var(--r-pill); }
.e-input input, .e-input textarea, .e-input select {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14.5px; padding: 12px 0;
}
.e-input textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.e-input input::placeholder, .e-input textarea::placeholder { color: var(--ink-4); }
.e-input:hover, .e-input.is-hover { box-shadow: inset 0 1px 2px rgba(20,24,45,.06), inset 0 0 0 1px var(--line-strong); }
.e-input:focus-within, .e-input.is-focus { background: var(--glass-strong); box-shadow: inset 0 0 0 1.5px var(--accent), var(--ring); color: var(--accent-ink); }
.e-input.is-error { box-shadow: inset 0 0 0 1.5px var(--danger), 0 0 0 3px var(--danger-soft); color: var(--danger); }
.e-input.is-disabled { opacity: .5; pointer-events: none; }
.e-input.is-success { box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--ok) 70%, transparent); }
.e-input .e-inline-btn { border: 0; background: transparent; color: var(--ink-3); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; margin-right: -8px; }
.e-input .e-inline-btn:hover { background: var(--hover); color: var(--ink); }
.e-help { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.e-help.error { color: var(--danger); }
.e-help.ok { color: var(--ok); }
.e-count { font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); }

/* select customizado */
.e-select { position: relative; }
.e-select-btn { width: 100%; justify-content: space-between; cursor: pointer; border: 0; text-align: left; }
.e-select-btn .val { color: var(--ink); font-size: 14.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-select-btn .val.ph { color: var(--ink-4); }
.e-select-btn .chev { transition: transform var(--dur-2) var(--ease-out); }
.e-select.open .chev { transform: rotate(180deg); }

/* ---------- Popover / menu ---------- */
.e-pop {
  position: absolute; z-index: 60; top: calc(100% + 8px); left: 0; min-width: 220px; padding: 6px;
  border-radius: var(--r-lg); background: linear-gradient(170deg, var(--glass-hi), var(--glass-strong));
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: var(--glass-inset), 0 0 0 1px var(--line), var(--sh-3);
  transform-origin: top left;
}
.e-pop.right { left: auto; right: 0; transform-origin: top right; }
.e-pop[hidden] { display: none !important; }
.e-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 12px; background: transparent;
  font-size: 14px; color: var(--ink); text-align: left;
}
.e-menu-item .e-ic { color: var(--ink-3); }
.e-menu-item:hover, .e-menu-item.is-active, .e-menu-item:focus-visible { background: var(--hover); }
.e-menu-item[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.e-menu-item[aria-selected="true"] .e-ic { color: var(--accent-ink); }
.e-menu-item .meta { margin-left: auto; font-size: 12px; color: var(--ink-4); }
.e-menu-item.danger, .e-menu-item.danger .e-ic { color: var(--danger); }
.e-menu-item:disabled { opacity: .4; pointer-events: none; }
.e-menu-sep { height: 1px; background: var(--line); margin: 5px 8px; }
.e-menu-title { padding: 8px 12px 4px; }

/* ---------- Checkbox / Radio ---------- */
.e-check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; color: var(--ink); line-height: 1.4; }
.e-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.e-check .box {
  position: relative; flex: none; width: 21px; height: 21px; border-radius: 7px; margin-top: -1px;
  background: var(--field); box-shadow: var(--field-sunk); display: grid; place-items: center; color: #fff;
  transition: background var(--dur-2), box-shadow var(--dur-2), transform var(--dur-1);
}
.e-check.radio .box { border-radius: 50%; }
.e-check .box svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset var(--dur-2) var(--ease-out); }
.e-check.radio .box::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: 0; transform: scale(.4); transition: opacity var(--dur-1) ease, transform var(--dur-2) var(--ease-spring); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.e-check:hover .box { box-shadow: inset 0 0 0 1px var(--line-strong); }
.e-check input:checked + .box, .e-check input:indeterminate + .box { background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 4px 10px -4px color-mix(in oklab, var(--p1) 70%, transparent); }
.e-check input:checked + .box svg { stroke-dashoffset: 0; }
.e-check input:indeterminate + .box::before { content: ""; width: 10px; height: 2.4px; border-radius: 2px; background: #fff; }
.e-check.radio input:checked + .box::after { transform: scale(1); opacity: 1; }
.e-check input:focus-visible + .box { box-shadow: var(--ring); }
.e-check input:disabled + .box, .e-check input:disabled ~ span { opacity: .4; }
.e-check.is-error .box { box-shadow: inset 0 0 0 1.5px var(--danger); }
.e-check small { display: block; color: var(--ink-3); font-size: 12.5px; }

/* ---------- Switch (vidro líquido) ---------- */
.e-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; }
.e-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.e-switch .track {
  position: relative; width: 52px; height: 30px; border-radius: var(--r-pill); flex: none;
  background: var(--field); box-shadow: var(--field-sunk); transition: background var(--dur-3) var(--ease-out);
}
.e-switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #F3F3F7 55%, #E1E2EA);
  box-shadow: 0 3px 8px -1px rgba(20, 24, 45, .28), inset 0 -1px 1px rgba(0,0,0,.06), inset 0 1px 0 #fff;
  transition: transform var(--dur-3) var(--ease-spring), width var(--dur-2) var(--ease-out);
}
.e-switch:active .track::after { width: 30px; }
.e-switch input:checked + .track { background: var(--grad); box-shadow: inset 0 1px 2px rgba(0,0,0,.14), inset 0 0 0 1px rgba(255,255,255,.2); }
.e-switch input:checked + .track::after { transform: translateX(22px); }
.e-switch:active input:checked + .track::after { transform: translateX(16px); }
.e-switch input:focus-visible + .track { box-shadow: var(--ring); }
.e-switch input:disabled + .track { opacity: .4; }
.e-switch input:disabled ~ span { opacity: .45; }
.e-switch.lg .track { width: 64px; height: 36px; }
.e-switch.lg .track::after { width: 30px; height: 30px; }
.e-switch.lg input:checked + .track::after { transform: translateX(28px); }

/* ---------- Slider ---------- */
.e-range { --v: 50%; position: relative; display: grid; gap: 10px; }
.e-range-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.e-range-top output { font-family: var(--font-mono); font-weight: 500; color: var(--accent-ink); }
.e-range input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer; }
.e-range input[type="range"]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 8px; box-shadow: var(--field-sunk);
  background: linear-gradient(90deg, var(--p1), var(--p2) calc(var(--v) * .8), var(--mix) var(--v), var(--field) var(--v));
}
.e-range input[type="range"]::-moz-range-track { height: 8px; border-radius: 8px; background: var(--field); box-shadow: var(--field-sunk); }
.e-range input[type="range"]::-moz-range-progress { height: 8px; border-radius: 8px; background: var(--grad); }
.e-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #F1F1F6 60%, #DCDDE6);
  box-shadow: 0 4px 12px -2px rgba(20, 24, 45, .35), inset 0 1px 0 #fff, 0 0 0 1px rgba(0,0,0,.04);
  transition: transform var(--dur-2) var(--ease-spring);
}
.e-range input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 4px 12px -2px rgba(20, 24, 45, .35); }
.e-range input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.e-range input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: var(--ring), 0 4px 12px -2px rgba(20, 24, 45, .35); }
.e-range input:disabled { opacity: .4; pointer-events: none; }
.e-range .ticks { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-4); }

/* ==========================================================================
   AVATAR · BADGE · CHIP
   ========================================================================== */
.e-av {
  --sz: 36px; position: relative; flex: none; width: var(--sz); height: var(--sz); border-radius: 50%;
  display: grid; place-items: center; font-size: calc(var(--sz) * .36); font-weight: 600; color: #fff; letter-spacing: .02em;
  background: var(--av, var(--grad));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -4px 10px -4px rgba(0,0,0,.25), 0 0 0 2px var(--bg);
  text-shadow: 0 1px 1px rgba(0,0,0,.18);
}
.e-av.xs { --sz: 22px; } .e-av.sm { --sz: 28px; } .e-av.lg { --sz: 48px; } .e-av.xl { --sz: 64px; }
.e-av.client { border-radius: 30%; }
.e-av .dot { position: absolute; right: -1px; bottom: -1px; width: 30%; height: 30%; min-width: 9px; min-height: 9px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg); }
.e-av .dot.on { background: #2BC48A; } .e-av .dot.busy { background: #F0A531; } .e-av .dot.off { background: var(--ink-4); } .e-av .dot.away { background: #E85B6D; }
.e-avs { display: inline-flex; align-items: center; }
.e-avs .e-av + .e-av { margin-left: calc(var(--sz) * -.3); }
.e-avs .more { background: var(--glass-strong); color: var(--ink-2); text-shadow: none; box-shadow: inset 0 0 0 1px var(--line-2), 0 0 0 2px var(--bg); font-size: calc(var(--sz) * .32); }

.e-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1; letter-spacing: .005em;
  color: var(--c, var(--ink-2)); background: var(--cb, var(--neutral-soft));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c, var(--ink-2)) 14%, transparent);
}
.e-badge .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in oklab, currentColor 18%, transparent); }
.e-badge.lg { height: 28px; padding: 0 12px; font-size: 12.5px; }
.e-badge.sq { border-radius: 8px; }
.e-badge.glass { background: linear-gradient(170deg, var(--glass-hi), var(--glass-tint)); color: var(--ink); box-shadow: var(--glass-inset), inset 0 0 0 1px var(--line); }
.e-badge.grad { color: #fff; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.e-badge .e-ic { width: 13px; height: 13px; }
.st-draft    { --c: var(--neutral); --cb: var(--neutral-soft); }
.st-todo     { --c: var(--neutral); --cb: var(--neutral-soft); }
.st-doing    { --c: var(--info);    --cb: var(--info-soft); }
.st-review   { --c: var(--review);  --cb: var(--review-soft); }
.st-adjust   { --c: var(--warn);    --cb: var(--warn-soft); }
.st-blocked  { --c: var(--danger);  --cb: var(--danger-soft); }
.st-done     { --c: var(--ok);      --cb: var(--ok-soft); }
.st-approved { --c: var(--ok);      --cb: var(--ok-soft); }
.st-late     { --c: var(--danger);  --cb: var(--danger-soft); }
.pr-urgent { --c: var(--danger); --cb: var(--danger-soft); }
.pr-high   { --c: var(--warn);   --cb: var(--warn-soft); }
.pr-mid    { --c: var(--info);   --cb: var(--info-soft); }
.pr-low    { --c: var(--neutral); --cb: var(--neutral-soft); }
.env-brand { --c: var(--env-brand); } .env-workspace { --c: var(--env-workspace); } .env-like { --c: var(--env-like); } .env-360 { --c: var(--env-360); }
[class*="env-"].e-badge { --cb: color-mix(in oklab, var(--c) 13%, transparent); }

.e-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
  background: linear-gradient(170deg, var(--glass-hi), var(--glass-tint));
  box-shadow: var(--glass-inset), inset 0 0 0 1px var(--line);
  transition: background var(--dur-2), color var(--dur-2), box-shadow var(--dur-2), transform var(--dur-1);
}
.e-chip:hover { color: var(--ink); box-shadow: var(--glass-inset), inset 0 0 0 1px var(--line-2), var(--sh-1); }
.e-chip:active { transform: scale(.97); }
.e-chip:focus-visible { box-shadow: var(--ring); }
.e-chip[aria-pressed="true"] {
  color: var(--accent-ink); background: linear-gradient(170deg, color-mix(in oklab, var(--accent) 16%, var(--glass-hi)), color-mix(in oklab, var(--accent) 8%, transparent));
  box-shadow: var(--glass-inset), inset 0 0 0 1px var(--accent-line);
}
.e-chip .n { font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); }
.e-chip[aria-pressed="true"] .n { color: var(--accent-ink); }
.e-chip .sw { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--ink-4)); }
.e-chip .x { width: 14px; height: 14px; opacity: .6; margin-right: -4px; }
.e-chip:disabled { opacity: .4; pointer-events: none; }

/* ==========================================================================
   TOOLTIP · ACCORDION
   ========================================================================== */
.e-tip { position: relative; display: inline-flex; }
.e-tip > .bubble {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translate(-50%, 4px); z-index: 40;
  padding: 7px 11px; border-radius: 11px; font-size: 12.5px; font-weight: 500; white-space: nowrap; pointer-events: none;
  color: #fff; background: rgba(20, 21, 30, .9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), var(--sh-2);
  opacity: 0; transition: opacity var(--dur-2), transform var(--dur-2) var(--ease-out);
}
.e-tip > .bubble kbd { font-family: var(--font-mono); font-size: 10.5px; opacity: .6; margin-left: 6px; }
.e-tip:hover > .bubble, .e-tip:focus-within > .bubble, .e-tip.is-open > .bubble { opacity: 1; transform: translate(-50%, 0); }
.e-tip.bottom > .bubble { bottom: auto; top: calc(100% + 10px); transform: translate(-50%, -4px); }
.e-tip.bottom:hover > .bubble, .e-tip.bottom.is-open > .bubble { transform: translate(-50%, 0); }

.e-acc { border-radius: var(--r-lg); overflow: hidden; }
.e-acc-item + .e-acc-item { border-top: 1px solid var(--line); }
.e-acc-head {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 0; background: transparent; text-align: left;
  font-size: 15px; font-weight: 600; color: var(--ink);
}
.e-acc-head:hover { background: var(--hover); }
.e-acc-head:focus-visible { box-shadow: inset var(--ring); }
.e-acc-head .chev { margin-left: auto; color: var(--ink-3); transition: transform var(--dur-3) var(--ease-out); }
.e-acc-head[aria-expanded="true"] .chev { transform: rotate(180deg); }
.e-acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-3) var(--ease-out); }
.e-acc-body > div { overflow: hidden; }
.e-acc-body > div > div { padding: 0 18px 18px 18px; color: var(--ink-2); font-size: 14px; }
.e-acc-head[aria-expanded="true"] + .e-acc-body { grid-template-rows: 1fr; }

/* ==========================================================================
   ALERTA · TOAST · MODAL · DRAWER
   ========================================================================== */
.e-alert {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 14px 16px; border-radius: var(--r-lg);
  background: linear-gradient(170deg, color-mix(in oklab, var(--c) 12%, var(--glass-hi)), color-mix(in oklab, var(--c) 6%, transparent));
  box-shadow: var(--glass-inset), inset 0 0 0 1px color-mix(in oklab, var(--c) 22%, transparent);
  font-size: 14px; color: var(--ink);
}
.e-alert .ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in oklab, var(--c) 14%, transparent); }
.e-alert b { display: block; font-weight: 600; margin-bottom: 2px; }
.e-alert p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.e-alert .actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.e-alert.info { --c: var(--info); } .e-alert.ok { --c: var(--ok); } .e-alert.warn { --c: var(--warn); } .e-alert.danger { --c: var(--danger); }
.e-alert.accent { --c: var(--accent); }

.e-toasts { position: fixed; z-index: 200; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.e-toast {
  pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 12px 12px 12px 14px; border-radius: 20px;
  background: linear-gradient(170deg, var(--glass-hi), var(--glass-strong));
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: var(--glass-inset), 0 0 0 1px var(--line), var(--sh-3);
  font-size: 14px;
}
.e-toast .ico { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--c, var(--grad)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.e-toast.ok { --c: linear-gradient(140deg, #1FA774, #4FD49B); } .e-toast.danger { --c: linear-gradient(140deg, #E23D57, #F26A5E); } .e-toast.warn { --c: linear-gradient(140deg, #D98A14, #F2B64C); }
.e-toast .txt { flex: 1; min-width: 0; } .e-toast .txt b { display: block; font-weight: 600; } .e-toast .txt span { color: var(--ink-3); font-size: 13px; }

.e-layer { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; }
.e-layer[hidden] { display: none !important; }
.e-scrim { position: absolute; inset: 0; background: var(--scrim); -webkit-backdrop-filter: blur(6px) saturate(120%); backdrop-filter: blur(6px) saturate(120%); }
.e-modal {
  position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 28px; border-radius: var(--r-2xl);
  background: linear-gradient(170deg, var(--glass-hi), var(--glass-strong));
  -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  box-shadow: var(--glass-inset), 0 0 0 1px var(--line), var(--sh-4);
}
.e-modal-head { display: flex; align-items: start; gap: 14px; margin-bottom: 14px; }
.e-modal-head .x { margin-left: auto; margin-top: -6px; margin-right: -8px; }
.e-modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.e-drawer-layer { place-items: stretch end; padding: 12px; }
.e-drawer {
  position: relative; width: min(460px, 100%); height: 100%; display: flex; flex-direction: column; border-radius: var(--r-2xl); overflow: hidden;
  background: linear-gradient(170deg, var(--glass-hi), var(--glass-strong));
  -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  box-shadow: var(--glass-inset), 0 0 0 1px var(--line), var(--sh-4);
}
.e-drawer-head { padding: 22px 24px 16px; display: flex; gap: 12px; align-items: start; border-bottom: 1px solid var(--line); }
.e-drawer-body { padding: 20px 24px; overflow: auto; flex: 1; display: grid; gap: 18px; align-content: start; }
.e-drawer-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.e-ico-tile { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -6px 12px -6px rgba(0,0,0,.25), 0 8px 18px -8px color-mix(in oklab, var(--p1) 70%, transparent); }
.e-ico-tile.danger { background: linear-gradient(140deg, #E23D57, #F26A5E); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 18px -8px rgba(226,61,87,.6); }
.e-ico-tile.soft { color: var(--accent-ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 18%, transparent); }

/* ==========================================================================
   NAVEGAÇÃO: TABS · BREADCRUMB · PAGINAÇÃO
   ========================================================================== */
.e-tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--line); position: relative; overflow-x: auto; scrollbar-width: none; }
.e-tabs-line button {
  position: relative; border: 0; background: transparent; padding: 12px 14px; font-size: 14px; font-weight: 600; color: var(--ink-3); white-space: nowrap;
  display: inline-flex; gap: 8px; align-items: center; border-radius: 10px 10px 0 0;
}
.e-tabs-line button:hover { color: var(--ink); }
.e-tabs-line button[aria-selected="true"] { color: var(--ink); }
.e-tabs-line button[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2.5px; border-radius: 3px; background: var(--grad); }
.e-tabs-line button:focus-visible { box-shadow: inset var(--ring); }
.e-tabs-line .n { font-family: var(--font-mono); font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--hover); color: var(--ink-3); }
.e-tabs-line button:disabled { opacity: .4; pointer-events: none; }
.e-tab-panel { padding-top: 16px; font-size: 14px; color: var(--ink-2); }

.e-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13.5px; color: var(--ink-3); }
.e-crumbs a, .e-crumbs button { color: var(--ink-3); text-decoration: none; border: 0; background: transparent; padding: 4px 8px; border-radius: 8px; display: inline-flex; gap: 6px; align-items: center; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-crumbs a:hover, .e-crumbs button:hover { background: var(--hover); color: var(--ink); }
.e-crumbs .sep { color: var(--ink-4); width: 14px; height: 14px; }
.e-crumbs [aria-current] { color: var(--ink); font-weight: 600; padding: 4px 8px; }

.e-pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.e-pages button {
  min-width: 36px; height: 36px; padding: 0 10px; border: 0; border-radius: 12px; background: transparent; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  font-variant-numeric: tabular-nums; display: inline-grid; place-items: center;
}
.e-pages button:hover { background: var(--hover); color: var(--ink); }
.e-pages button[aria-current="page"] { color: #fff; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 14px -6px color-mix(in oklab, var(--p1) 70%, transparent); }
.e-pages button:disabled { opacity: .35; pointer-events: none; }
.e-pages .gap { color: var(--ink-4); padding: 0 4px; }
.e-pages .info { margin-left: auto; font-size: 13px; color: var(--ink-3); }

/* ==========================================================================
   PROGRESSO
   ========================================================================== */
.e-bar { position: relative; height: 8px; border-radius: 8px; background: var(--field); box-shadow: var(--field-sunk); overflow: hidden; }
.e-bar > i { position: absolute; inset: 0 auto 0 0; width: var(--v, 0%); border-radius: inherit; background: var(--grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); transition: width var(--dur-3) var(--ease-out); }
.e-bar.sm { height: 5px; }
.e-bar.ok > i { background: linear-gradient(90deg, #1FA774, #5ADBA6); }
.e-bar.warn > i { background: linear-gradient(90deg, #D98A14, #F2B64C); }
.e-bar.danger > i { background: linear-gradient(90deg, #E23D57, #F26A5E); }
.e-ring { --v: 60; --sz: 64px; position: relative; width: var(--sz); height: var(--sz); flex: none; }
.e-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.e-ring .bg { stroke: var(--line-2); }
.e-ring .fg { stroke: url(#e-grad-stroke); transition: stroke-dashoffset var(--dur-3) var(--ease-out); }
.e-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--sz) * .24); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* Skeleton */
.e-skel { position: relative; overflow: hidden; border-radius: 10px; background: var(--hover); }
.e-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--glass-edge) 60%, transparent), transparent); animation: e-shimmer 1.6s var(--ease-out) infinite; }
@keyframes e-shimmer { to { transform: translateX(100%); } }

/* ==========================================================================
   PADRÕES COMPARTILHADOS DE CARD
   ========================================================================== */
.e-card { border-radius: var(--r-xl); padding: 20px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.e-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.e-row.wrap { flex-wrap: wrap; }
.e-row.between { justify-content: space-between; }
.e-stack { display: grid; gap: 10px; min-width: 0; }
.e-grow { flex: 1; min-width: 0; }
.e-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.e-divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.e-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-3); }
.e-meta span { display: inline-flex; gap: 5px; align-items: center; }
.e-meta .e-ic { width: 14px; height: 14px; }
.e-logo {
  --sz: 40px; width: var(--sz); height: var(--sz); flex: none; border-radius: 30%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 500; font-size: calc(var(--sz) * .46); color: #fff; background: var(--lg, var(--grad));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -6px 12px -6px rgba(0,0,0,.3), var(--sh-1);
}
.e-logo.sm { --sz: 28px; } .e-logo.lg { --sz: 56px; }
.e-perm-note { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--ink-3); }

/* Visibilidade por papel: data-perm="team" some quando o catálogo está no papel Cliente */
:root[data-role="client"] [data-perm="team"] { display: none !important; }
:root[data-role="team"] [data-perm="client"] { display: none !important; }

/* Movimento reduzido: ver css/motion.css */
