/* =====================================================================
   SIMM.Download — sistema de design (tema claro)
   Estrutura e proporções do Sillis Experience: trilho lateral escuro,
   página clara, cartões brancos de borda fina e sombra curta, indicadores
   com ícone, login dividido.
   Identidade SIMM.PRO (manual v1.0 · mai/2025): azul-escuro #11122E no
   trilho, no texto e nos blocos de código; laranja #FF6600 com moderação;
   Barlow. O manual pede para evitar fundo 100% branco: a página usa o azul
   em opacidade baixa e o branco fica para os cartões.
   Laranja sobre branco não passa em contraste para texto (2,94:1): texto
   laranja usa #B84A00 (5,2:1) — o manual permite variar para mais escuro.
   Botão laranja leva texto azul-escuro (6,2:1), nunca branco (2,9:1).
   Regra herdada do SIMM.HUB: LARANJA É MARCA, NUNCA ESTADO. Estado vai
   sempre com rótulo, ícone e fundo próprio — as tintas escuras de verde,
   âmbar e vermelho se confundem entre si (validado).
   ===================================================================== */
:root {
  --navy: #11122E;  --navy-800: #1B1D45;  --navy-700: #262A62;
  --ink: #11122E;   --ink-2: #3A3C57;     --muted: #55576F;  --faint: #696B84;
  --line: #E2E2EA;  --line-2: #CDCEDA;
  --page: #F3F3F6;  --card: #FFFFFF;      --tint: #F7F7FA;   --tint-2: #EEEEF3;
  --orange: #FF6600; --orange-2: #FF7A1A; --orange-ink: #B84A00; --orange-soft: #FFF0E5;
  --orange-on-navy: #FF9147;
  --brand-yellow: #FFE90B; --brand-red: #E63A17;
  --ok: #13753A;   --ok-bg: #E8F4EC;
  --warn: #8A6100; --warn-bg: #FBF4DC;
  --err: #B42318;  --err-bg: #FCEBE9;
  --data: #5B72D9;                       /* barras e séries: nem marca, nem estado */
  --shadow-sm: 0 1px 2px rgba(17,18,46,.06), 0 1px 3px rgba(17,18,46,.04);
  --shadow-md: 0 6px 16px rgba(17,18,46,.08), 0 2px 4px rgba(17,18,46,.04);
  --shadow-lg: 0 18px 44px rgba(17,18,46,.16);
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --mono: ui-monospace, 'Cascadia Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page); color: var(--ink);
  font-family: 'Barlow', system-ui, sans-serif; font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
select { color-scheme: light; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.mono { font-family: var(--mono); font-size: .86em; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.kicker { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--orange-ink); font-weight: 600; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .strong { font-weight: 600; color: var(--ink); }
.link { color: var(--orange-ink); font-weight: 600; } .link:hover { text-decoration: underline; }

/* ── Casco: trilho escuro + área principal clara ────────────────── */
.app { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 100vh; }
.rail { flex: 1 1 244px; background: var(--navy); color: #fff; display: flex; flex-direction: column; }
.rail-brand { padding: 24px 22px 18px; }
.rail-brand img { height: 24px; width: auto; display: block; }
.rail-brand .kicker { display: block; margin-top: 10px; color: var(--orange-on-navy); font-size: 11px; letter-spacing: .2em; }
.rail-nav { padding: 6px 12px 20px; display: flex; flex-direction: column; gap: 2px; }
.rail-sec { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.42); font-weight: 600; padding: 18px 12px 6px; }
.rail-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: var(--r-sm); color: rgba(255,255,255,.74); font-size: 15px; font-weight: 500; transition: background .15s, color .15s; }
.rail-item .ico { width: 19px; height: 19px; opacity: .9; }
.rail-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.rail-item.on { background: rgba(255,102,0,.16); color: #fff; }
.rail-item.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; background: var(--orange); border-radius: 0 4px 4px 0; }
.rail-item.on .ico { color: var(--orange-on-navy); opacity: 1; }
.rail-item .count { margin-left: auto; font-size: 12px; color: rgba(255,255,255,.5); font-variant-numeric: tabular-nums; }
.rail-foot { margin-top: auto; padding: 14px 22px 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: rgba(255,255,255,.45); line-height: 1.7; }

.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 64px; padding: 10px 32px; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar .search { flex: 0 1 440px; }
.topbar .search .input { background: var(--tint); border-color: var(--line); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.user { display: flex; align-items: center; gap: 10px; line-height: 1.25; }
.user .meta { text-align: right; }
.user .nm { font-size: 13.5px; font-weight: 600; }
.user .em { font-size: 12px; color: var(--faint); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; letter-spacing: .02em; flex-shrink: 0; }
/* sem teto de largura: com max-width de 1480 px (o do Sillis, mas sem centralizar), numa tela
   de 1920 sobrava uma faixa morta à direita, desalinhada da barra do topo que vai até a borda */
.content { padding: 28px 32px 72px; width: 100%; }

/* ── Cabeçalho de página ────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -.005em; margin-top: 6px; color: var(--ink); }
.page-head h1 em { font-style: normal; color: var(--orange-ink); }
.page-head .lead { color: var(--muted); font-size: 15.5px; line-height: 1.55; max-width: 720px; margin-top: 8px; }
.page-head .idline { margin-top: 8px; font-size: 14px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.crumbs { font-size: 12.5px; color: var(--faint); display: flex; gap: 8px; align-items: center; font-weight: 500; }
.crumbs a { color: var(--orange-ink); font-weight: 600; } .crumbs a:hover { text-decoration: underline; }

/* ── Indicadores (o .kpi do Sillis) ─────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 18px 20px 20px; min-width: 0; }
.stat .lbl { font-size: 13px; color: var(--muted); font-weight: 600; padding-right: 48px; }
.stat b { display: block; font-size: 32px; font-weight: 700; line-height: 1.05; margin-top: 8px; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat b small { font-size: 16px; font-weight: 600; color: var(--faint); margin-left: 4px; }
.stat .sub { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.k-ico { position: absolute; right: 16px; top: 16px; width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: rgba(17,18,46,.06); color: var(--navy-700); }
.k-ico .ico { width: 20px; height: 20px; }
.k-ico.brand { background: var(--orange-soft); color: var(--orange-ink); }
.k-ico.warn { background: var(--warn-bg); color: var(--warn); }

/* ── Cartões (painéis) e grades ─────────────────────────────────── */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); min-width: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 56px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 16px; font-weight: 700; color: var(--ink); }
.panel-body { padding: 18px 20px; }
.panel-note { display: flex; gap: 10px; align-items: center; padding: 11px 20px; border-top: 1px solid var(--line); background: var(--tint); font-size: 13.5px; color: var(--muted); }
.panel-note .ico { width: 16px; height: 16px; color: var(--faint); }
.cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.mb { margin-bottom: 18px; }

/* ── Tabelas ────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); font-weight: 700; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--tint); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover td { background: #FAFAFC; }
.tbl .r { text-align: right; }
.tbl .sub { display: block; font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.tbl a.strong:hover { color: var(--orange-ink); }
.tbl a.rowlink { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r-sm); color: var(--faint); }
.tbl a.rowlink:hover { background: var(--tint-2); color: var(--ink); }
.tbl tr.gap td { background: #FFFBEF; }

/* família de driver: cabeçalho acima da tabela de builds */
.family { padding: 18px 20px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.family h4 { font-size: 18px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.family .about { margin-top: 4px; font-size: 14px; color: var(--muted); display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; }

/* ── Botões ─────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: var(--r-sm); border: 1px solid #E25B00; background: var(--card); color: var(--orange-ink); font-size: 14.5px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: var(--orange-soft); }
.btn.solid { background: var(--orange); border-color: var(--orange); color: var(--navy); font-weight: 700; box-shadow: 0 2px 8px rgba(255,102,0,.28); }
.btn.solid:hover { background: var(--orange-2); border-color: var(--orange-2); }
.btn.quiet { border-color: var(--line-2); color: var(--ink); }
.btn.quiet:hover { border-color: var(--navy-700); background: #FAFAFD; }
.btn.danger { border-color: rgba(180,35,24,.4); color: var(--err); }
.btn.danger:hover { background: var(--err-bg); border-color: var(--err); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn .ico { width: 17px; height: 17px; }
.iconbtn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.iconbtn:hover { background: var(--tint-2); color: var(--ink); }

/* ── Etiquetas e estado ─────────────────────────────────────────── */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--tint-2); color: var(--ink-2); font-size: 12px; font-weight: 600; line-height: 1.45; white-space: nowrap; }
.tag .ico { width: 13px; height: 13px; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.err { background: var(--err-bg); color: var(--err); }
.tag.brand { background: var(--orange-soft); color: var(--orange-ink); }
.state { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.state.ok { color: var(--ok); } .state.warn { color: var(--warn); } .state.err { color: var(--err); }
.state.off { color: var(--faint); }
.state.off::before { background: transparent; border: 1.5px solid currentColor; width: 8px; height: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ── Formulários ────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .select { width: 100%; min-height: 42px; padding: 0 13px; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--ink); font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: var(--faint); }
textarea.input { padding: 10px 13px; line-height: 1.45; resize: vertical; }
.input:focus, .select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,102,0,.18); }
.search { position: relative; display: block; }
.search .ico { position: absolute; left: 13px; top: 12px; width: 17px; height: 17px; color: var(--faint); pointer-events: none; }
.search .input { padding-left: 40px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 12.5px; color: var(--faint); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.toolbar .search { flex: 1 1 280px; }
.toolbar .select { flex: 0 1 210px; width: auto; }
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: var(--card); padding: 18px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.drop .fico { width: 46px; height: 46px; border-radius: 12px; background: var(--orange-soft); display: inline-flex; align-items: center; justify-content: center; color: var(--orange-ink); flex-shrink: 0; }
.drop .fname { font-weight: 600; font-size: 16px; color: var(--ink); }

/* ── Código, listas, definições ─────────────────────────────────── */
/* pre-wrap: linha longa quebra em vez de sumir na borda — numa coluna estreita o fim da linha
   (justo o arquivo e o sha256) ficava escondido atrás de uma rolagem que ninguém vê */
.code { margin: 0; background: var(--navy); border-radius: var(--r); padding: 16px 18px; font-family: var(--mono); font-size: 12.5px; line-height: 1.75; color: #E4E5F0; white-space: pre-wrap; overflow-wrap: anywhere; }
.code .k { color: #FF9147; } .code .s { color: #C9D3FF; } .code .n { color: #9FE0B5; } .code .c { color: #8E8FA8; }
.note code, .lead code { font-family: var(--mono); font-size: .86em; color: var(--ink); background: var(--tint-2); padding: 1px 5px; border-radius: 5px; }
.checks { list-style: none; padding: 0; }
.checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink); }
.checks li:first-child { border-top: 0; }
.checks li .ico { margin-top: 2px; }
.checks li.ok .ico { color: var(--ok); } .checks li.warn .ico { color: var(--warn); } .checks li.err .ico { color: var(--err); }
.checks li .sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.dl { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 11px 16px; font-size: 14.5px; }
.dl dt { font-size: 13px; color: var(--faint); font-weight: 500; }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-weight: 500; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); font-size: 14px; color: var(--ink-2); }
.note .ico { color: var(--orange-ink); margin-top: 1px; }
.note.warn { background: var(--warn-bg); border-color: #EEDDA6; } .note.warn .ico { color: var(--warn); }
.note b { color: var(--ink); font-weight: 700; }

/* ── Medidores: série única, cor de dado, valor em tinta de texto ─ */
.bar { height: 8px; background: var(--tint-2); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--data); border-radius: 999px; }
/* ranking com rótulo longo (nome de peça): nome e valor em cima, barra embaixo */
.rank { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rank:first-child { padding-top: 2px; }
.rank:last-child { border-bottom: 0; padding-bottom: 2px; }
.rank-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-size: 14.5px; }
.rank-top .num { font-weight: 700; color: var(--ink); }
.rank .sub { font-size: 12.5px; color: var(--faint); }

/* ── Cartões de download ────────────────────────────────────────── */
.cardgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; min-width: 0; transition: box-shadow .18s, transform .18s; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h3 { font-size: 21px; font-weight: 700; line-height: 1.15; color: var(--ink); }
.card .ver { font-size: 15px; color: var(--ink-2); }
.card .meta { font-size: 13.5px; color: var(--muted); }
.card .foot { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 10px; }

/* ── Vazio ──────────────────────────────────────────────────────── */
.empty { padding: 34px 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .eico { width: 60px; height: 60px; border-radius: 50%; background: var(--orange-soft); display: inline-flex; align-items: center; justify-content: center; color: var(--orange-ink); margin-bottom: 6px; }
.empty .eico .ico { width: 28px; height: 28px; }
.empty h4 { font-size: 16px; font-weight: 700; color: var(--ink); }
.empty p { max-width: 420px; font-size: 14.5px; }

/* ── Login (o split do Sillis, com a marca SIMM.PRO) ────────────── */
/* proporcional, 1.1fr/.9fr como no Sillis: com o painel fixo em 420 px, numa tela de 1920
   o lado escuro ficava com quase tudo e o formulário virava uma faixa na borda */
.login { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); min-height: 100vh; }
.login-hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: 52px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
/* align-self: num flex em coluna o filho estica até a largura do container, e o logo de altura
   fixa saía achatado (o Sillis já tinha esta mesma correção no .lh-logo) */
.login-hero .logo { height: 34px; width: auto; display: block; position: relative; align-self: flex-start; }
/* o símbolo inteiro, no canto de baixo e longe do texto — cortado pela borda parecia defeito */
.login-hero .mark { position: absolute; right: 56px; bottom: 48px; width: 190px; opacity: .08; pointer-events: none; }
.login-hero .inner { position: relative; max-width: 560px; }
.login-hero h1 { font-size: 42px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; margin-bottom: 16px; }
.login-hero h1 em { font-style: normal; color: var(--orange); }
.login-hero .sub { font-size: 17px; line-height: 1.55; color: rgba(255,255,255,.78); max-width: 480px; }
.login-hero .bottom { position: relative; font-size: 13px; color: rgba(255,255,255,.5); }
.login-panel { background: var(--card); display: flex; align-items: center; justify-content: center; padding: 48px 40px; position: relative; }
.login-panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--brand-yellow), var(--orange) 55%, var(--brand-red)); }
.login-box { width: 100%; max-width: 380px; }
.login-box .lb-mark { display: block; height: 44px; width: auto; margin-bottom: 22px; }
.login-box h2 { font-size: 28px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.login-box > p { color: var(--muted); font-size: 15.5px; margin-bottom: 24px; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; background: var(--card); color: var(--ink); font-weight: 600; font-size: 15.5px; border: 1px solid var(--line-2); border-radius: var(--r-sm); transition: border-color .15s, box-shadow .15s; }
.btn-google:hover { border-color: var(--navy-700); box-shadow: var(--shadow-sm); }
.btn-google svg { width: 20px; height: 20px; }
.btn-google.off { opacity: .5; cursor: not-allowed; }
.btn-google.off:hover { border-color: var(--line-2); box-shadow: none; }
.login-aviso { display: block; margin-top: 8px; font-size: 13px; color: var(--faint); }

/* ── Telas muito largas: o conteúdo ocupa tudo, então os cartões ganham coluna ── */
@media (min-width: 2200px) {
  .cardgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Telas estreitas ────────────────────────────────────────────── */
@media (max-width: 1240px) {
  .login-hero .mark { display: none; }   /* o lado escuro estreita e o símbolo encostaria no rodapé */
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { display: none; }         /* como no Sillis: no celular fica só o formulário */
}
@media (max-width: 1200px) {
  .stats, .stats.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* abaixo disto a coluna da esquerda do .cols fica com menos de 640 px — a largura mínima
   das tabelas — e elas passariam a rolar de lado, com o botão da ponta escondido */
@media (max-width: 1343px) {
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .cardgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .rail { flex-basis: 100%; }
  .rail-nav { flex-direction: row; flex-wrap: wrap; padding: 4px 12px 12px; }
  .rail-sec, .rail-foot { display: none; }
  .rail-item.on::before { left: 8px; right: 8px; top: auto; bottom: 0; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .topbar { padding: 10px 16px; }
  .user .meta { display: none; }
  .content { padding: 22px 16px 56px; }
  .page-head h1 { font-size: 25px; }
  .stats, .stats.three, .form-grid, .cardgrid { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 10px; }
  .login-panel { padding: 40px 20px; }
  .faixa-demo { padding: 8px 16px; }
}

/* =====================================================================
   Só no app — o que o canvas de design não precisava ter
   ===================================================================== */
/* Trilho parado ao rolar (no canvas ele era só uma coluna). No celular ele vira
   faixa de cima e rola junto, como no canvas. */
@media (min-width: 821px) {
  .rail { position: sticky; top: 0; height: 100vh; overflow-y: auto; align-self: flex-start; }
}
.hidden { display: none !important; }
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pequeno { font-size: 13px; }
.texto-aviso { color: var(--warn) !important; }
/* numa linha só: empilhados, os botões de uma linha da tabela pareciam de linhas diferentes */
.acoes-linha { display: inline-flex; gap: 4px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
.acoes-linha form { display: inline-flex; margin: 0; }
.iconbtn.perigo:hover { background: var(--err-bg); color: var(--err); }
.lista-simples .linha { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lista-simples .linha:last-child { border-bottom: 0; }
.code.rolagem { max-height: 560px; overflow: auto; }
.user .avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Telas enxutas (05/10/2026: "poluídas e difíceis de entender") — cada tela fica com o
   título e a ação; explicação, nota de rodapé e detalhe técnico saíram ou ficaram atrás
   de um clique. As regras abaixo são o que essa limpeza precisou. */
/* uma faixa só avisa que há demonstração, em vez de uma etiqueta em cada item */
.faixa-demo { display: flex; gap: 8px; align-items: center; padding: 8px 32px; background: var(--tint-2); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.faixa-demo .ico { width: 15px; height: 15px; color: var(--faint); }
.faixa-demo form { margin: 0 0 0 auto; }
.faixa-demo button { background: none; border: 0; padding: 0; color: var(--orange-ink); font-weight: 600; cursor: pointer; }
.faixa-demo button:hover { text-decoration: underline; }
.iconbtn.mini { width: 30px; height: 30px; margin-left: -6px; }
.iconbtn.mini .ico { width: 15px; height: 15px; }
.family-expl { margin-top: 10px; font-size: 14.5px; max-width: 640px; }
/* publicar: os botões ficam num painel ao lado do formulário e acompanham a rolagem */
.lado-publicar { position: sticky; top: 20px; }
.lado-publicar .panel-body { display: flex; flex-direction: column; gap: 10px; }
.lado-publicar .btn { width: 100%; }
.note.ok { background: var(--ok-bg); border-color: #BFDFC9; }
.note.ok .ico { color: var(--ok); }
/* o resto do retrato do servidor (serviços, IP/MAC, JSON) fica fechado por padrão */
.mais { margin-top: 18px; }
.mais > summary { display: inline-flex; align-items: center; gap: 8px; padding: 8px 2px; cursor: pointer; list-style: none; font-weight: 600; color: var(--ink-2); }
.mais > summary::-webkit-details-marker { display: none; }
.mais > summary:hover { color: var(--ink); }
.mais > summary .ico { transition: transform .15s; }
.mais[open] > summary .ico { transform: rotate(90deg); }
.mais > .stack { margin-top: 10px; }
a.tag { cursor: pointer; }
a.tag .ico { width: 12px; height: 12px; }

/* Envio de arquivo */
.arquivo-input { display: block; width: 100%; margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.arquivo-input::file-selector-button { font: inherit; font-weight: 600; margin-right: 12px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--card); color: var(--ink); cursor: pointer; }
.drop-envio .fname { display: block; cursor: pointer; }
.progresso { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.progresso .bar i { transition: width .2s; }

/* Login de teste local (DEV_LOGIN=1) */
.dev-box { margin-top: 20px; padding: 16px; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: var(--tint); display: flex; flex-direction: column; gap: 10px; }
.dev-row { display: flex; gap: 8px; }
.dev-row .input { flex: 1; min-width: 0; }

/* Modal — nunca alert()/confirm() nativo (regra do ecossistema) */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(17,18,46,.45); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 20px 20px; overflow-y: auto; }
.modal { background: var(--card); border-radius: var(--r-lg); width: 100%; max-width: 460px; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal.modal-lg { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-body { padding: 18px 20px; }
.modal-body p { color: var(--ink-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--tint); }

/* Aviso que some sozinho */
.flash-wrap { position: fixed; top: 16px; right: 16px; z-index: 80; max-width: 440px; }
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-md); font-size: 14.5px; animation: entra .25s ease; }
.flash.ok .ico { color: var(--ok); }
.flash.erro .ico { color: var(--err); }
.flash .f-msg { color: var(--ink); }
@keyframes entra { from { transform: translateY(-6px); opacity: 0; } }

/* Página de erro */
.erro-pagina { max-width: 560px; margin: 12vh auto; padding: 0 20px; display: flex; flex-direction: column; gap: 12px; }
.erro-logo { height: 30px; width: auto; margin-bottom: 18px; }
.erro-pagina h1 { font-size: 30px; font-weight: 700; }
.erro-pagina p { color: var(--muted); font-size: 16px; margin-bottom: 8px; }
/* confirmação de ação destrutiva: vermelho cheio (branco sobre #B42318 = 6,6:1) */
.btn.solid.danger { background: var(--err); border-color: var(--err); color: #fff; box-shadow: none; }
.btn.solid.danger:hover { background: #941C13; border-color: #941C13; }
.iconbtn.copiado { color: var(--ok); background: var(--ok-bg); }
