/* VTC Log · casca do portal (menu, barra, ⌘K) — tema claro */
:root {
  --av-black: #050505;
  --av-ink: #0f1a22;
  --av-ink-2: #1b2a34;
  --av-petrol: #24475c;
  --av-petrol-mid: #32627e;
  --av-sky: #8fb4c9;
  --av-sky-2: #9fc1d3;
  --av-mist: #dce7ed;
  --av-paper: #f4f6f7;
  --av-white: #ffffff;
  --av-gray: #999b9d;
  --av-muted: #5b6267;
  --av-line: rgba(15, 26, 34, 0.09);
  --av-line-2: rgba(15, 26, 34, 0.14);
  --av-ok: #009b72;
  --av-bad: #d72f45;
  --av-warn: #b7791f;

  --av-glass: rgba(255, 255, 255, 0.72);
  --av-glass-strong: rgba(255, 255, 255, 0.9);
  --av-shadow-sm: 0 1px 2px rgba(15, 26, 34, 0.06), 0 2px 8px rgba(15, 26, 34, 0.04);
  --av-shadow: 0 1px 2px rgba(15, 26, 34, 0.05), 0 12px 32px rgba(15, 26, 34, 0.07);
  --av-shadow-lg: 0 2px 6px rgba(15, 26, 34, 0.06), 0 30px 70px rgba(15, 26, 34, 0.14);
  --av-ring: 0 0 0 4px rgba(50, 98, 126, 0.16);

  --av-radius: 18px;
  --av-radius-sm: 12px;
  --av-rail: 248px;
  --av-rail-min: 76px;
  --av-bar: 64px;
  --av-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --av-font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --av-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.av {
  font-family: var(--av-font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--av-ink);
  background: var(--av-paper);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
body.av::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(143, 180, 201, 0.32), transparent 62%),
    radial-gradient(700px 480px at 12% 104%, rgba(50, 98, 126, 0.12), transparent 60%),
    radial-gradient(rgba(15, 26, 34, 0.07) 1px, transparent 1.2px) 0 0 / 22px 22px,
    linear-gradient(180deg, #f8fafb 0%, #f1f5f7 100%);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.av-num { font-variant-numeric: tabular-nums; }
.av-mono { font-family: var(--av-mono); }
:focus-visible { outline: none; box-shadow: var(--av-ring); border-radius: 10px; }

/* ---------- layout ---------- */
.av-app { display: grid; grid-template-columns: var(--av-rail) minmax(0, 1fr); min-height: 100dvh; transition: grid-template-columns 0.35s var(--av-ease); }
.av-app.is-min { grid-template-columns: var(--av-rail-min) minmax(0, 1fr); }
.av-main { min-width: 0; display: flex; flex-direction: column; }
.av-page { padding: 22px clamp(16px, 2.2vw, 32px) 40px; flex: 1; }

/* ---------- menu lateral ---------- */
.av-rail {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 14px 14px;
  background: linear-gradient(180deg, #fff, #f8fafb);
  border-right: 1px solid var(--av-line);
  overflow: hidden;
  z-index: 30;
  view-transition-name: av-rail;
}
.av-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; min-height: 52px; }
.av-brand img { height: 34px; width: auto; display: block; }
.av-brand .mark { width: 34px; height: 34px; display: none; }
.av-app.is-min .av-brand img.full { display: none; }
.av-app.is-min .av-brand .mark { display: block; }

.av-nav { flex: 1; overflow-y: auto; overflow-x: hidden; margin: 0 -6px; padding: 0 6px; scrollbar-width: none; position: relative; }
.av-nav::-webkit-scrollbar { display: none; }
.av-cat {
  margin: 14px 10px 6px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--av-gray);
  white-space: nowrap;
}
.av-app.is-min .av-cat { opacity: 0; height: 6px; margin: 8px 0 0; }
.av-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 10px;
  border-radius: 11px;
  color: var(--av-ink-2);
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.av-link svg { width: 19px; height: 19px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: 0.82; }
.av-link:hover { background: rgba(36, 71, 92, 0.06); }
.av-link.is-active { color: var(--av-white); }
.av-link.is-active svg { opacity: 1; }
.av-link .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.av-link .badge {
  min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px;
  display: inline-grid; place-items: center;
  font: 600 0.7rem/1 var(--av-mono);
  background: rgba(36, 71, 92, 0.08); color: var(--av-petrol);
}
.av-link .badge.live { background: rgba(0, 155, 114, 0.12); color: var(--av-ok); }
.av-link .badge.bad { background: rgba(215, 47, 69, 0.12); color: var(--av-bad); }
.av-link.is-active .badge { background: rgba(255, 255, 255, 0.18); color: #fff; }
.av-app.is-min .av-link { justify-content: center; padding: 0; }
.av-app.is-min .av-link .lbl, .av-app.is-min .av-link .badge { display: none; }
.av-pill {
  position: absolute; left: 6px; right: 6px; height: 40px; border-radius: 11px; z-index: -1;
  background: linear-gradient(135deg, var(--av-petrol-mid), var(--av-petrol) 55%, var(--av-ink));
  box-shadow: 0 8px 22px rgba(36, 71, 92, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.45s var(--av-ease), opacity 0.2s;
}
.av-nav-inner { position: relative; z-index: 0; }

.av-tip {
  position: fixed; z-index: 90; pointer-events: none; padding: 6px 10px; border-radius: 8px;
  background: var(--av-ink); color: #fff; font-size: 0.8rem; font-weight: 500;
  opacity: 0; transform: translateX(-4px); transition: opacity 0.15s, transform 0.15s;
}
.av-tip.on { opacity: 1; transform: none; }

.av-rail-foot { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--av-line); }
.av-maestro {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 13px;
  background: linear-gradient(135deg, rgba(36, 71, 92, 0.07), rgba(143, 180, 201, 0.16));
  border: 1px solid rgba(36, 71, 92, 0.1);
  cursor: pointer; transition: transform 0.2s var(--av-ease), box-shadow 0.2s;
}
.av-maestro:hover { transform: translateY(-1px); box-shadow: var(--av-shadow-sm); }
.av-orb {
  position: relative; width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff, var(--av-sky-2) 30%, var(--av-petrol-mid) 64%, var(--av-ink) 100%);
  box-shadow: 0 0 0 3px rgba(143, 180, 201, 0.25), 0 6px 16px rgba(36, 71, 92, 0.35);
  animation: av-breathe 3.6s ease-in-out infinite;
}
@keyframes av-breathe { 50% { box-shadow: 0 0 0 6px rgba(143, 180, 201, 0.14), 0 6px 22px rgba(36, 71, 92, 0.45); } }
.av-maestro b { display: block; font-size: 0.86rem; }
.av-maestro span { display: block; font-size: 0.74rem; color: var(--av-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-maestro .txt { min-width: 0; }
.av-app.is-min .av-maestro { justify-content: center; padding: 8px 0; }
.av-app.is-min .av-maestro .txt { display: none; }
.av-collapse {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--av-muted); font-size: 0.8rem; cursor: pointer;
}
.av-collapse:hover { background: rgba(36, 71, 92, 0.06); color: var(--av-ink); }
.av-collapse svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; transition: transform 0.35s var(--av-ease); }
.av-app.is-min .av-collapse { justify-content: center; padding: 0; }
.av-app.is-min .av-collapse span { display: none; }
.av-app.is-min .av-collapse svg { transform: rotate(180deg); }

/* ---------- barra superior ---------- */
.av-bar {
  position: sticky; top: 0; z-index: 25; height: var(--av-bar);
  display: grid; grid-template-columns: minmax(140px, 1fr) minmax(220px, 520px) minmax(max-content, 1fr); align-items: center; gap: 18px;
  padding: 0 clamp(16px, 2.2vw, 32px);
  background: rgba(248, 250, 251, 0.97);
  border-bottom: 1px solid var(--av-line);
  view-transition-name: av-bar;
}
.av-crumb { min-width: 0; }
.av-crumb small { display: block; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--av-gray); }
.av-crumb b { display: block; font-size: 1.02rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-search {
  display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 8px 0 14px; border-radius: 12px; cursor: text;
  background: var(--av-white); border: 1px solid var(--av-line-2); color: var(--av-gray); font-size: 0.9rem;
  box-shadow: var(--av-shadow-sm); transition: border-color 0.2s, box-shadow 0.2s;
}
.av-search:hover { border-color: rgba(50, 98, 126, 0.4); box-shadow: 0 0 0 4px rgba(143, 180, 201, 0.18); }
.av-search svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.av-search span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-kbd { font: 600 0.72rem/1 var(--av-mono); padding: 5px 7px; border-radius: 7px; background: var(--av-paper); border: 1px solid var(--av-line); color: var(--av-muted); }
.av-bar-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.av-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--av-glass-strong); border: 1px solid var(--av-line); font-size: 0.8rem; color: var(--av-ink-2); white-space: nowrap;
}
.av-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--av-ok); box-shadow: 0 0 0 0 rgba(0, 155, 114, 0.5); animation: av-ping 2s infinite; }
.av-dot.run { background: var(--av-petrol-mid); box-shadow: 0 0 0 0 rgba(50, 98, 126, 0.5); }
.av-dot.bad { background: var(--av-bad); }
@keyframes av-ping { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 7px rgba(0, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); } }
.av-dot { color: rgba(0, 155, 114, 0.45); }
.av-dot.run { color: rgba(50, 98, 126, 0.45); }
.av-clock { font: 600 0.82rem var(--av-mono); color: var(--av-ink-2); }
.av-user {
  display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 6px 0 4px; border-radius: 999px; border: 1px solid var(--av-line);
  background: var(--av-white); cursor: pointer; position: relative;
}
.av-avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--av-petrol-mid), var(--av-ink));
}
.av-user .who { font-size: 0.82rem; line-height: 1.1; padding-right: 6px; white-space: nowrap; }
@media (max-width: 1440px) { .av-user .who { display: none; } .av-user { padding-right: 4px; } }
.av-user .who small { display: block; color: var(--av-gray); font-size: 0.7rem; }
.av-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; padding: 6px; border-radius: 14px; display: none;
  background: var(--av-white); border: 1px solid var(--av-line); box-shadow: var(--av-shadow-lg);
}
.av-menu.on { display: block; animation: av-pop 0.18s var(--av-ease); }
.av-menu a, .av-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 9px; background: none; font-size: 0.88rem; cursor: pointer; }
.av-menu a:hover, .av-menu button:hover { background: var(--av-paper); }
@keyframes av-pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }

/* ---------- cartões ---------- */
.av-card {
  position: relative;
  background: var(--av-glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.8);
  outline: 1px solid var(--av-line);
  outline-offset: -1px;
  border-radius: var(--av-radius);
  box-shadow: var(--av-shadow);
}
.av-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--av-petrol-mid); }
.av-kicker::before { content: ""; width: 18px; height: 1.5px; border-radius: 2px; background: currentColor; }
.av-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; cursor: pointer;
  font-weight: 600; font-size: 0.88rem; border: 1px solid var(--av-line-2); background: var(--av-white); color: var(--av-ink);
  box-shadow: var(--av-shadow-sm); transition: transform 0.2s var(--av-ease), box-shadow 0.2s, border-color 0.2s;
}
.av-btn:hover { transform: translateY(-1px); border-color: rgba(50, 98, 126, 0.35); box-shadow: 0 8px 20px rgba(15, 26, 34, 0.08); }
.av-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.av-btn.primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--av-petrol-mid), var(--av-petrol) 50%, var(--av-ink));
  box-shadow: 0 10px 24px rgba(36, 71, 92, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ---------- paleta ⌘K ---------- */
.av-cmd { position: fixed; inset: 0; z-index: 80; display: none; place-items: start center; padding-top: 12vh; background: rgba(15, 26, 34, 0.22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.av-cmd.on { display: grid; animation: av-fade 0.16s ease; }
@keyframes av-fade { from { opacity: 0; } }
.av-cmd-box { width: min(660px, 92vw); border-radius: 18px; overflow: hidden; background: var(--av-white); border: 1px solid var(--av-line); box-shadow: 0 40px 100px rgba(15, 26, 34, 0.28); animation: av-pop 0.2s var(--av-ease); }
.av-cmd-in { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--av-line); }
.av-cmd-in svg { width: 19px; height: 19px; stroke: var(--av-petrol-mid); fill: none; stroke-width: 2; }
.av-cmd-in input { flex: 1; height: 60px; border: 0; outline: 0; font: 500 1.05rem var(--av-font); color: var(--av-ink); background: transparent; }
.av-cmd-list { max-height: 52vh; overflow: auto; padding: 8px; }
.av-cmd-sec { padding: 10px 12px 4px; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--av-gray); }
.av-cmd-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; cursor: pointer; }
.av-cmd-item .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--av-paper); color: var(--av-petrol); flex-shrink: 0; }
.av-cmd-item .ic svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.av-cmd-item .t { flex: 1; min-width: 0; }
.av-cmd-item .t b { display: block; font-weight: 600; font-size: 0.92rem; }
.av-cmd-item .t small { display: block; color: var(--av-muted); font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-cmd-item .go { font: 500 0.72rem var(--av-mono); color: var(--av-gray); }
.av-cmd-item.sel { background: linear-gradient(135deg, rgba(50, 98, 126, 0.1), rgba(143, 180, 201, 0.18)); }
.av-cmd-item.sel .ic { background: var(--av-petrol); color: #fff; }
.av-cmd-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--av-line); font-size: 0.74rem; color: var(--av-gray); }

.av-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 95; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 11px 16px; border-radius: 12px; background: var(--av-ink); color: #fff; font-size: 0.86rem; box-shadow: var(--av-shadow-lg);
  transition: opacity 0.25s, transform 0.25s var(--av-ease);
}
.av-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* transição entre páginas: menu e barra ficam, conteúdo desliza */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: av-vt-out 0.18s ease both; }
::view-transition-new(root) { animation: av-vt-in 0.32s var(--av-ease) both; }
@keyframes av-vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes av-vt-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1180px) {
  .av-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .av-search { display: none; }
  .av-clock { display: none; }
}
@media (max-width: 860px) {
  .av-app, .av-app.is-min { grid-template-columns: 1fr; }
  .av-rail { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform 0.3s var(--av-ease); box-shadow: var(--av-shadow-lg); }
  .av-app.nav-open .av-rail { transform: none; }
  .av-burger { display: inline-grid !important; }
  .av-user .who { display: none; }
  .av-chip.hide-sm { display: none; }
}
.av-burger { display: none; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--av-line); background: var(--av-white); margin-right: 10px; cursor: pointer; }
.av-burger svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.av-crumb-wrap { display: flex; align-items: center; min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
