/* ==========================================================================
   Cadence — console de telemetria de transmissão
   Serifa editorial contra dados monoespaçados, âmbar de "no ar" sobre tinta.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --ink:        #08090B;
  --ink-lift:   #0E1013;
  --panel:      #131619;
  --panel-hi:   #191D22;
  --hairline:   #22272E;
  --hairline-hi:#333A44;

  --text:       #ECE8E1;
  --text-dim:   #98A0AB;
  --text-faint: #626B77;

  --amber:      #F0B429;
  --amber-deep: #7A5A11;
  --green:      #4ADE93;
  --red:        #F2664A;
  --blue:       #6AA9F0;

  --rail: 232px;
  --gutter: clamp(20px, 3.2vw, 52px);
  --radius: 3px;

  --serif: 'Instrument Serif', Georgia, serif;
  --sans:  'IBM Plex Sans', system-ui, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body { height: 100%; }

/* Faz o Chrome desenhar barras de rolagem e widgets nativos no tema escuro. */
:root { color-scheme: dark; }

/* Anel de foco visível em tudo que recebe teclado, sem poluir o clique de mouse. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* Evita o atraso de 300ms do duplo-toque no celular. */
button, .entry, .slot, .nav__item { touch-action: manipulation; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--amber);
  color: #140E01;
  font-weight: 600;
  border-radius: var(--radius);
  transition: top 0.2s var(--ease);
}

.skip:focus { top: 12px; text-decoration: none; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Atmosfera: brilho âmbar frio no topo e grão fino sobre tudo. */
body::before {
  content: '';
  position: fixed;
  inset: -30% -10% auto -10%;
  height: 70vh;
  background:
    radial-gradient(50% 60% at 22% 0%, rgba(240, 180, 41, 0.10), transparent 70%),
    radial-gradient(40% 50% at 82% 8%, rgba(106, 169, 240, 0.07), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--amber); color: #100C02; }

/* ------------------------------------------------------------ tipografia */

h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.count { color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ base */

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: none; }

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================== estrutura */

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  min-height: 100vh;
}

/* ------------------------------------------------------------------ rail */

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--ink-lift), var(--ink));
  padding: 26px 0 18px;
}

.brand {
  padding: 0 22px 26px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 18px;
}

.brand__mark {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand__mark em { color: var(--amber); font-style: italic; }

.brand__sub {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 8px;
}

.nav { display: flex; flex-direction: column; gap: 1px; padding: 0 12px; }

.nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 13.5px;
  text-align: left;
  position: relative;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav__item:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }

.nav__item[aria-current='true'] { color: var(--text); background: rgba(240, 180, 41, 0.07); }

.nav__item[aria-current='true']::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 18px;
  background: var(--amber);
}

.nav__item svg { width: 16px; height: 16px; flex: none; opacity: 0.85; }

.nav__badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--amber);
  color: #120D01;
  font-weight: 600;
}

.rail__foot { margin-top: auto; padding: 16px 22px 0; border-top: 1px solid var(--hairline); }

/* --------------------------------------------------------------- on air */

.onair {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.onair__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  flex: none;
}

.onair--live .onair__dot {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(74, 222, 147, 0.55);
  animation: pulse 2.4s infinite;
}

.onair--live { color: var(--green); }

@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(74, 222, 147, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 147, 0); }
}

/* ------------------------------------------------------------------ main */

.main { min-width: 0; padding: 0 var(--gutter) 80px; }

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0 24px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 34px;
  flex-wrap: wrap;
}

.topbar h1 { font-family: var(--serif); font-size: clamp(30px, 3.6vw, 46px); line-height: 1; }

.topbar__meta {
  display: flex;
  gap: 26px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
}

.topbar__meta b { display: block; color: var(--text); font-size: 15px; font-weight: 500; margin-top: 3px; }

.view { display: none; }
.view.is-active { display: block; animation: rise 0.5s var(--ease) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* Revelação escalonada dos blocos ao entrar numa aba. */
.stagger > * { animation: rise 0.6s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: 0.03s; }
.stagger > *:nth-child(2) { animation-delay: 0.09s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.21s; }
.stagger > *:nth-child(5) { animation-delay: 0.27s; }

/* ============================================================== painéis */

.panel {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  position: relative;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--hairline);
  flex-wrap: wrap;
}

.panel__body { padding: 20px; }

/* ----------------------------------------------------------- hero views */

.hero {
  display: grid;
  grid-template-columns: minmax(230px, 0.85fr) 2fr;
  gap: 0;
  margin-bottom: 22px;
  overflow: hidden;
}

.hero__left {
  padding: 26px 24px 22px;
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.hero__value {
  font-family: var(--serif);
  font-size: clamp(58px, 8.5vw, 108px);
  line-height: 0.86;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.hero__delta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 14px;
}

.hero__delta.up   { color: var(--green); }
.hero__delta.down { color: var(--red); }
.hero__delta.flat { color: var(--text-faint); }

.hero__foot { font-size: 12px; color: var(--text-faint); line-height: 1.45; }

/* Views que a Data API já viu mas o Analytics ainda não fechou. */
.lag {
  margin-top: 16px;
  padding: 11px 13px;
  border-left: 2px solid var(--green);
  background: rgba(74, 222, 147, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.5;
}

.lag__value {
  display: block;
  color: var(--green);
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 3px;
}

.hero__right { padding: 16px 4px 6px 0; min-width: 0; }

.metrics { display: flex; gap: 3px; padding: 0 0 10px 18px; }

.metric {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--text-faint);
  border: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
              background 0.18s var(--ease);
}

.metric:hover { color: var(--text); }

.metric[aria-selected='true'] {
  color: var(--amber);
  border-color: rgba(240, 180, 41, 0.35);
  background: rgba(240, 180, 41, 0.08);
}

/* --------------------------------------------------------------- gráfico */

.chart { width: 100%; height: 210px; display: block; overflow: visible; }

.chart__line {
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.75;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: draw 1.5s var(--ease) 0.15s forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

.chart__area { fill: url(#areaFade); opacity: 0; animation: fade 0.9s var(--ease) 0.7s forwards; }

@keyframes fade { to { opacity: 1; } }

.chart__grid { stroke: var(--hairline); stroke-width: 1; }

.chart__label { font-family: var(--mono); font-size: 9px; fill: var(--text-faint); }

/* Trecho que o Analytics ainda não fechou: hachura, nunca uma linha em zero. */
.chart__gap { fill: url(#gapHatch); }
.chart__gap-label { fill: var(--text-faint); opacity: 0.75; letter-spacing: 0.1em; }

.chart__dot { fill: var(--ink); stroke: var(--amber); stroke-width: 2; }

.chart__hit { fill: transparent; cursor: crosshair; }
.chart__hit:hover + .chart__marker { opacity: 1; }
.chart__marker { opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.chart__marker line { stroke: var(--hairline-hi); stroke-dasharray: 2 3; }

/* ------------------------------------------------------------ estatística */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}

.stat { background: var(--panel); padding: 18px 20px; transition: background 0.25s var(--ease); }
.stat:hover { background: var(--panel-hi); }

.stat__value {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-top: 9px;
  font-variant-numeric: tabular-nums;
}

.stat__note { font-size: 11.5px; color: var(--text-faint); margin-top: 5px; }

/* -------------------------------------------------------------- tabelas */

.table { width: 100%; border-collapse: collapse; font-size: 13px; }

.table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 14px 11px;
  border-bottom: 1px solid var(--hairline);
}

.table td { padding: 12px 14px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.table tbody tr { transition: background 0.18s var(--ease); }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.022); }
.table tbody tr:last-child td { border-bottom: none; }

.table__title {
  max-width: 40ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.thumb {
  width: 34px;
  height: 46px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--panel-hi);
  display: block;
}

/* ------------------------------------------------------------------ tags */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--hairline-hi);
  color: var(--text-dim);
  white-space: nowrap;
}

.pill--live      { border-color: rgba(74, 222, 147, 0.4); color: var(--green); }
.pill--scheduled { border-color: rgba(240, 180, 41, 0.4); color: var(--amber); }
.pill--private   { border-color: var(--hairline-hi); color: var(--text-faint); }
.pill--error     { border-color: rgba(242, 102, 74, 0.45); color: var(--red); }

/* --------------------------------------------------------------- botões */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 17px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline-hi);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
              color 0.2s var(--ease), transform 0.12s var(--ease);
}

.btn:hover:not(:disabled) { border-color: var(--text-faint); background: rgba(255, 255, 255, 0.04); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn--primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #140E01;
  font-weight: 600;
}

.btn--primary:hover:not(:disabled) { background: #FFC63F; border-color: #FFC63F; }

.btn--danger:hover:not(:disabled) { border-color: var(--red); color: var(--red); background: rgba(242, 102, 74, 0.07); }

.btn--sm { padding: 6px 12px; font-size: 12px; }

/* ------------------------------------------------------------- formulário */

.field { margin-bottom: 18px; }

.field__label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.field__hint { font-size: 11.5px; color: var(--text-faint); margin-top: 7px; line-height: 1.5; }

.input, .textarea, .select {
  width: 100%;
  background: var(--ink-lift);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 10px 13px;
  font-size: 13.5px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--amber);
  background: var(--ink);
}

.textarea { resize: vertical; min-height: 108px; line-height: 1.6; }

/* O select nativo precisa das duas cores explícitas para não herdar o tema do sistema. */
.select { appearance: none; cursor: pointer; padding-right: 34px;
  background-color: var(--ink-lift);
  color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%2398A0AB' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }

/* Chips de horário. */
.slots { display: flex; flex-wrap: wrap; gap: 6px; }

.slot {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 6px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  color: var(--text-faint);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease),
              background 0.18s var(--ease);
}

.slot:hover { border-color: var(--hairline-hi); color: var(--text); }

.slot[aria-pressed='true'] {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(240, 180, 41, 0.09);
}

/* Interruptor. */
.switch { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; user-select: none; }

.switch__track {
  width: 38px;
  height: 21px;
  border-radius: 999px;
  background: var(--hairline);
  border: 1px solid var(--hairline-hi);
  position: relative;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
  flex: none;
}

.switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}

.switch input { position: absolute; opacity: 0; pointer-events: none; }

.switch input:checked + .switch__track { background: rgba(240, 180, 41, 0.24); border-color: var(--amber); }
.switch input:checked + .switch__track::after { transform: translateX(17px); background: var(--amber); }

/* --------------------------------------------------------- navegador de pastas */

.browser { display: grid; grid-template-columns: 1fr 300px; gap: 1px; background: var(--hairline); }

.browser__list, .browser__side { background: var(--panel); padding: 6px; max-height: 420px; overflow-y: auto; }
.browser__side { padding: 18px 20px; }

.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  min-width: 0;
}

.crumbs button { color: var(--text-dim); transition: color 0.18s; }
.crumbs button:hover { color: var(--amber); }

.entry {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius);
  text-align: left;
  font-size: 13px;
  color: var(--text-dim);
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.entry:hover { background: rgba(255, 255, 255, 0.035); color: var(--text); }
.entry svg { width: 15px; height: 15px; flex: none; color: var(--text-faint); }
.entry__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry__count { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); }

/* --------------------------------------------------------------- progresso */

.bar { height: 3px; background: var(--hairline); border-radius: 999px; overflow: hidden; }

.bar__fill {
  height: 100%;
  background: var(--amber);
  border-radius: 999px;
  transition: width 0.4s var(--ease);
}

.bar__fill--done { background: var(--green); }

.job { margin-bottom: 14px; }

.job__files {
  max-height: 260px;
  overflow-y: auto;
  border-top: 1px solid var(--hairline);
}

.job__file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 20px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--hairline);
}

.job__file:last-child { border-bottom: none; }
.job__file .num { color: var(--text-faint); font-size: 11px; margin-left: auto; white-space: nowrap; }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
  background: var(--hairline-hi);
}

.dot--done { background: var(--green); }
.dot--uploading { background: var(--amber); animation: blink 1.1s ease-in-out infinite; }
.dot--failed { background: var(--red); }

@keyframes blink { 50% { opacity: 0.25; } }

/* -------------------------------------------------------------- conexões */

.accounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

.account { padding: 22px; display: flex; flex-direction: column; gap: 16px; }

.account__top { display: flex; align-items: center; gap: 14px; }

.account__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-hi);
  border: 1px solid var(--hairline);
  flex: none;
}

.account__avatar--text {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--amber);
  background: rgba(240, 180, 41, 0.10);
  border-color: rgba(240, 180, 41, 0.3);
}

.account__name { font-size: 15px; }
.account__handle { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

.account--soon { opacity: 0.55; }

/* ------------------------------------------------------------------ misc */

.empty { padding: 46px 20px; text-align: center; color: var(--text-faint); font-size: 13px; }
.empty strong { display: block; color: var(--text-dim); font-size: 14px; margin-bottom: 6px; font-weight: 500; }

.notice {
  display: flex;
  gap: 11px;
  padding: 12px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline-hi);
  background: var(--ink-lift);
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 18px;
  line-height: 1.55;
}

.notice--warn  { border-color: rgba(240, 180, 41, 0.35); background: rgba(240, 180, 41, 0.05); }
.notice--error { border-color: rgba(242, 102, 74, 0.4);  background: rgba(242, 102, 74, 0.05); color: #F4A895; }

.notice svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }

.skeleton {
  background: linear-gradient(90deg, var(--panel) 25%, var(--panel-hi) 50%, var(--panel) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--radius);
  color: transparent;
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* Avisos flutuantes. */
.toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 380px;
}

.toast {
  display: flex;
  gap: 11px;
  padding: 13px 16px;
  background: var(--panel-hi);
  border: 1px solid var(--hairline-hi);
  border-left: 2px solid var(--amber);
  border-radius: var(--radius);
  font-size: 13px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  animation: slide 0.4s var(--ease) both;
}

.toast--ok    { border-left-color: var(--green); }
.toast--error { border-left-color: var(--red); }

@keyframes slide {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- responsivo */

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; }
  .hero__left { border-right: none; border-bottom: 1px solid var(--hairline); }
  .browser { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  :root { --rail: 100%; }
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; align-items: center;
          padding: 14px 18px; border-right: none; border-bottom: 1px solid var(--hairline);
          gap: 18px; overflow-x: auto; }
  .brand { padding: 0 18px 0 0; border-bottom: none; border-right: 1px solid var(--hairline); margin: 0; }
  .brand__sub { display: none; }
  .nav { flex-direction: row; padding: 0; }
  .nav__item[aria-current='true']::before { left: 12px; top: auto; bottom: -14px; transform: none;
                                            width: calc(100% - 24px); height: 2px; }
  .rail__foot { display: none; }
}

/* Tabelas largas rolam dentro do próprio painel, nunca a página. */
.scroll-x { overflow-x: auto; }

/* Listas longas rolam dentro do painel para a página não virar um rolo infinito. */
.scroll-y {
  max-height: 440px;
  overflow-y: auto;
  /* Sem "contain" de propósito: ao chegar no fim da lista a rolagem segue para
     a página, senão o cursor fica preso e o usuário acha que travou. */
}

/* O cabeçalho acompanha a rolagem — sem ele, quem desce perde as colunas. */
.scroll-y .table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel);
  padding-top: 13px;
}

/* Barra discreta, para não competir com os dados. */
.scroll-y::-webkit-scrollbar { width: 9px; }
.scroll-y::-webkit-scrollbar-track { background: transparent; }
.scroll-y::-webkit-scrollbar-thumb {
  background: var(--hairline-hi);
  border-radius: 999px;
  border: 3px solid var(--panel);
}
.scroll-y::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ------------------------------------------------------------- canal ativo */

.chan {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px 16px;
  padding: 9px 11px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--ink-lift);
}

.chan__pic {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-hi);
  flex: none;
}

.chan__name {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Com um canal só não há o que escolher: vira rótulo. */
.chan--solo { background: transparent; border-color: transparent; padding-left: 12px; }

.chan__pick {
  flex: 1;
  min-width: 0;
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 20px 2px 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%2398A0AB' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

.chan__pick:focus { outline: none; }
.chan__pick option { background: var(--panel); color: var(--text); }


/* ------------------------------------------------------------------ acesso */

.gate {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--ink);
}

.gate[hidden] { display: none; }

.gate__card {
  width: 100%;
  max-width: 380px;
  padding: 38px 34px 34px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 2px 0 rgba(255, 255, 255, 0.02) inset;
}

.gate__card .brand__mark { font-size: 34px; margin-bottom: 6px; }

.gate__sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 30px;
}

.gate__error {
  margin-bottom: 16px;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(242, 102, 74, 0.4);
  background: rgba(242, 102, 74, 0.06);
  color: #F4A895;
  font-size: 12.5px;
}

.gate__error[hidden] { display: none; }
