/* GOAT — componentes e páginas. Usa só as variáveis de tokens.css. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-15)/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
/* Fundo: paisagem de montanha à noite, por trás do vidro, com um véu escuro por cima para o
   texto que assenta direto no fundo manter contraste. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 7, 13, .55), rgba(5, 7, 13, .25) 45%, rgba(5, 7, 13, .45)),
    url("/assets/landscape.svg?v=d5a5dd0f8b") center bottom / cover no-repeat,
    var(--bg);
}
/* Modo dia: mesma paisagem de dia, por cima, com fade. A interface continua escura; o véu é mais
   forte em cima para os títulos brancos manterem contraste sobre o céu claro. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms var(--ease);
  background:
    linear-gradient(180deg, rgba(5, 7, 13, .72), rgba(5, 7, 13, .54) 45%, rgba(5, 7, 13, .50)),
    url("/assets/landscape-day.svg?v=cd6fb6ba45") center bottom / cover no-repeat;
}
html[data-scene="day"] body::after { opacity: 1; }
/* O texto pequeno que assenta direto na paisagem (fora dos painéis) usa o cinzento secundário:
   com o terciário, o contraste ficava abaixo de AA por cima do céu de dia e do brilho da lua. */
:root .auth-foot,
:root .section-title,
:root .crumb,
:root main .muted:not(.card .muted) { color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { body::after { transition: none; } }
a { color: var(--sky); }
[hidden] { display: none !important; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- tipografia ---------- */
h1 { font-size: var(--fs-32); line-height: 1.15; font-weight: 700; letter-spacing: -.8px; margin: 0 0 var(--s-2); }
h1.xl { font-size: var(--fs-40); letter-spacing: -1px; }
h2 { font-size: var(--fs-17); line-height: 1.3; font-weight: 600; margin: 0; }
.sub { color: var(--text-2); margin: 0; }
.muted { color: var(--text-3); }
.small { font-size: var(--fs-13); }
.section-title {
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-3);
  margin: var(--s-6) 0 var(--s-3);
}

/* ---------- estrutura ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--s-4); }
@media (min-width: 640px) { .wrap { padding: 0 var(--s-5); } }
main { padding: var(--s-6) 0 var(--s-9); }

header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5, 7, 13, .72);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--hairline);
}
header.top .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-3); height: 64px; }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--text); text-decoration: none; font-weight: 700; font-size: var(--fs-17); letter-spacing: .5px; justify-self: start; border-radius: var(--r-control); padding: var(--s-1) var(--s-2) var(--s-1) 0; }
.logo { width: 34px; height: 34px; flex: none; }
.logo.lg { width: 56px; height: 56px; }

/* Navegação em cápsula. */
nav.tabs-nav { display: flex; gap: var(--s-1); padding: var(--s-1); border-radius: var(--r-pill); background: rgba(255, 255, 255, .06); border: 1px solid var(--hairline); }
nav.tabs-nav a {
  display: inline-flex; align-items: center; gap: var(--s-2);
  height: 36px; padding: 0 var(--s-4);
  border-radius: var(--r-pill);
  color: var(--text-2); text-decoration: none; font-weight: 600; font-size: var(--fs-13);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
nav.tabs-nav a svg.i { width: 18px; height: 18px; }
nav.tabs-nav a:hover { background: var(--hover); color: var(--text); }
nav.tabs-nav a.on { background: var(--selected); color: var(--text); }

.top-actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: var(--s-2); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--hover); color: var(--text); font-weight: 700; font-size: var(--fs-15); text-decoration: none;
  transition: background var(--t-fast) var(--ease);
}
.avatar:hover { background: rgba(255, 255, 255, .18); }
.avatar.on { background: var(--selected); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .36); }
.avatar.lg { width: 56px; height: 56px; font-size: var(--fs-20); justify-self: auto; }

/* ---------- painel de vidro ---------- */
.card, dialog, .toast {
  position: relative;
  background: var(--glass-sheen), var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--r-panel);
}
/* Contorno de 1px com gradiente vertical. */
.card::before, dialog::before, .toast::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-border);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card { padding: var(--s-5); }
.card.list-card { padding: 0; overflow: hidden; }

/* ---------- campos ---------- */
.field { display: block; margin-top: var(--s-4); }
.field > span { display: block; font-size: var(--fs-13); font-weight: 600; color: var(--text-2); margin-bottom: var(--s-2); }
.field small { display: block; color: var(--text-3); font-size: var(--fs-12); margin-top: var(--s-2); }
input, select {
  width: 100%;
  height: var(--control-h);
  padding: 0 var(--s-3);
  font: inherit;
  font-size: var(--fs-15);
  color: var(--text);
  background-color: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: var(--r-control);
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
input::placeholder { color: var(--text-3); }
input:hover, select:hover { background-color: rgba(255, 255, 255, .10); }
input:focus-visible, select:focus-visible { outline: 2px solid #FFF; outline-offset: 0; border-color: transparent; }
select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F5F5F7' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
select option { background: #111522; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: var(--control-h); min-width: var(--control-h); padding: 0 var(--s-4);
  font: inherit; font-size: var(--fs-15); font-weight: 600; white-space: nowrap; text-decoration: none;
  color: var(--text); background: var(--hover);
  border: 0; border-radius: var(--r-control); cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.btn:hover { background: rgba(255, 255, 255, .18); }
.btn:active { background: var(--pressed); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: #FFF; color: #000; }
.btn.primary:hover { background: rgba(255, 255, 255, .88); }
.btn.primary:active { background: rgba(255, 255, 255, .72); }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger, .btn.danger-solid { color: var(--error); }
.btn.danger-solid { background: var(--hover); }
.btn.icon { padding: 0; width: var(--control-h); }
.btn.block { width: 100%; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* O "foco" das apps: o elemento ativo fica branco com texto preto, sem anel. */
.btn:focus-visible,
nav.tabs-nav a:focus-visible,
.seg button:focus-visible,
.avatar:focus-visible,
.brand:focus-visible,
.crumb:focus-visible,
a.product:focus-visible,
.code-box:focus { outline: none; background: var(--focus-bg); color: var(--focus-fg); }
a.product:focus-visible .muted,
a.product:focus-visible .stats { color: rgba(0, 0, 0, .65); }
a.product:focus-visible .product-ico { background: rgba(0, 0, 0, .08); color: #000; }

/* Separadores (cápsula). */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s-1); padding: var(--s-1); border-radius: var(--r-pill); background: rgba(255, 255, 255, .06); border: 1px solid var(--hairline); }
.seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: 40px; padding: 0 var(--s-3);
  font: inherit; font-size: var(--fs-15); font-weight: 600;
  color: var(--text-2); background: transparent; border: 0; border-radius: var(--r-pill); cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.seg button:hover { background: var(--hover); color: var(--text); }
.seg button.on { background: var(--selected); color: var(--text); }
.seg button { white-space: nowrap; min-width: 0; }
.seg button:disabled { cursor: default; }
.seg button:disabled:not(.on) { opacity: .45; }

/* Etiquetas pequenas (chip). */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 var(--s-2); border-radius: var(--r-pill); background: var(--hover); color: var(--text-2); font-size: var(--fs-12); font-weight: 600; letter-spacing: .3px; }

/* Avisos. */
.alert { display: flex; gap: var(--s-2); align-items: flex-start; padding: var(--s-3); border-radius: var(--r-control); font-size: var(--fs-13); margin-top: var(--s-4); background: var(--hover); color: var(--text-2); }
.alert svg.i { width: 18px; height: 18px; margin-top: 1px; }
.alert.err { background: rgba(255, 105, 97, .12); color: var(--error); }
.alert.ok { background: var(--hover); color: var(--text); }
.alert .btn { margin-top: var(--s-2); height: 36px; font-size: var(--fs-13); }

.row { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-5); }
.row.end { justify-content: flex-end; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); flex-wrap: wrap; }
.crumb { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--text-3); font-size: var(--fs-12); font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; text-decoration: none; margin-bottom: var(--s-2); border-radius: var(--r-small); padding: 2px 4px 2px 0; }
.crumb svg.i { width: 16px; height: 16px; color: var(--sky); }

/* Estados: vazio, a carregar. */
.empty { text-align: center; padding: var(--s-7) var(--s-5); }
.empty .big-ico { width: 56px; height: 56px; margin: 0 auto var(--s-4); border-radius: var(--r-panel); display: grid; place-items: center; background: var(--hover); color: var(--sky); }
.empty .big-ico svg.i { width: 26px; height: 26px; }
.empty .row { justify-content: center; }
.skeleton { height: 76px; border-radius: var(--r-card); background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .08), rgba(255, 255, 255, .04)); background-size: 200% 100%; animation: sk 1.4s ease-in-out infinite; }
.skeleton + .skeleton { margin-top: var(--s-2); }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton, .spin { animation: none; } }

/* ---------- entrar / ativar (painel centrado) ---------- */
.auth { max-width: 440px; margin: 0 auto; padding-top: var(--s-4); }
.auth-head { text-align: center; margin-bottom: var(--s-5); }
.auth-head .logo { margin: 0 auto var(--s-4); display: block; }
.auth-head .sub { max-width: 360px; margin: 0 auto; }
.auth .card .btn.block { margin-top: var(--s-5); }
.auth-foot { text-align: center; margin-top: var(--s-4); font-size: var(--fs-13); color: var(--text-3); }
.result-ico { width: 64px; height: 64px; margin: 0 auto var(--s-4); border-radius: 50%; display: grid; place-items: center; background: var(--hover); }
.result-ico svg.i { width: 30px; height: 30px; }
.result-ico.ok { color: var(--text); }
.result-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.result-actions .btn { flex: 1 1 180px; }

/* Caixas do código (como o teclado de código das apps). */
.code-boxes { display: flex; justify-content: center; align-items: center; gap: var(--s-2); }
.code-box {
  width: clamp(40px, 11.5vw, 52px);
  height: clamp(52px, 15vw, 64px);
  padding: 0;
  text-align: center;
  font: 600 var(--fs-24)/1 var(--font);
  text-transform: uppercase;
  color: var(--text);
  background: rgba(255, 255, 255, .14);
  border: 0;
  border-radius: var(--r-control);
  caret-color: transparent;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.code-box:hover { background: rgba(255, 255, 255, .20); }
.code-boxes.err .code-box:not(:focus) { box-shadow: inset 0 0 0 1px var(--error); }
.code-sep { width: 10px; height: 2px; border-radius: 1px; background: var(--text-3); flex: none; }

/* ---------- início (produtos) ---------- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-4); }
.product { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-card); color: var(--text); text-decoration: none; transition: background var(--t-fast) var(--ease); }
a.product:hover { background: var(--glass-sheen), rgba(30, 36, 54, .70); }
.product-ico { width: 48px; height: 48px; border-radius: var(--r-card); display: grid; place-items: center; background: var(--hover); color: var(--sky); }
.product-ico svg.i { width: 24px; height: 24px; }
.product h2 { font-size: var(--fs-20); }
.product .stats { display: flex; gap: var(--s-4); flex-wrap: wrap; color: var(--text-3); font-size: var(--fs-13); margin-top: auto; }
.product .stats span { display: inline-flex; align-items: center; gap: var(--s-1); }
.product .stats svg.i { width: 16px; height: 16px; }
.quick { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-4); flex-wrap: wrap; }

/* ---------- linhas (listas, dispositivos, apps) ---------- */
.dev-ico { width: 40px; height: 40px; border-radius: var(--r-control); display: grid; place-items: center; background: var(--hover); color: var(--sky); flex: none; }

.pl { display: grid; grid-template-columns: auto auto 1fr auto; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); border-radius: var(--r-card); }
.pl + .pl { margin-top: var(--s-2); }
#list, #appList { position: relative; }
.app-row { position: relative; background: transparent; }
.pl.dragging, .app-row.dragging { z-index: 5; background: var(--glass-sheen), var(--glass-strong); will-change: transform; transition: background var(--t-fast) var(--ease); }
.app-row.dragging { border-radius: var(--r-control); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.handle { width: 28px; height: 44px; margin-left: -8px; display: grid; place-items: center; color: var(--text-3); cursor: grab; touch-action: none; border-radius: var(--r-small); }
.handle:hover { color: var(--text); background: var(--hover); }
body.reordering, body.reordering * { cursor: grabbing !important; user-select: none; }
.pl-ico { width: 40px; height: 40px; border-radius: var(--r-control); display: grid; place-items: center; background: var(--hover); color: var(--sky); }
.pl-ico.m3u { color: var(--indigo); }
.pl-title { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; font-weight: 600; font-size: var(--fs-17); }
.pl-meta { color: var(--text-3); font-size: var(--fs-13); word-break: break-all; }
.pl-actions { display: flex; align-items: center; gap: 2px; }
.pl-move { display: flex; padding-right: var(--s-2); margin-right: var(--s-1); border-right: 1px solid var(--hairline); }
.pl-move .btn:disabled, .app-actions .btn:disabled { opacity: .25; }
.pl-status { grid-column: 3 / -1; display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-13); color: var(--text-2); }
.pl-status.err { color: var(--error); }
.pl-status.busy { color: var(--text-3); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pl-status.ok .dot { background: var(--brand-gradient); }
.solo .handle, .solo .pl-move { display: none; }
.solo .pl { grid-template-columns: auto 1fr auto; }
.solo .pl-status { grid-column: 2 / -1; }

.dev { display: flex; align-items: center; gap: var(--s-3); min-height: 64px; padding: var(--s-2) var(--s-4); }
.dev + .dev { border-top: 1px solid var(--hairline); }
.dev-name { font-weight: 600; display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.dev-meta { color: var(--text-3); font-size: var(--fs-13); }
.list-card .empty-row { padding: var(--s-4); color: var(--text-3); font-size: var(--fs-13); }

/* ---------- conta ---------- */
.profile { display: flex; align-items: center; gap: var(--s-4); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }

/* ---------- GoatLauncher ---------- */
.opt { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 64px; padding: var(--s-2) 0; }
.opt + .opt { border-top: 1px solid var(--hairline); }
.opt b { display: block; font-weight: 600; }
.opt .muted { font-size: var(--fs-13); }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: var(--r-pill); background: rgba(255, 255, 255, .14); transition: background var(--t-fast) var(--ease); }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text-2); transition: transform var(--t-med) var(--ease), background var(--t-fast) var(--ease); }
.switch input:checked + span { background: var(--brand-gradient); }
.switch input:checked + span::after { transform: translateX(20px); background: #FFF; }
.switch input:focus-visible + span { outline: 2px solid #FFF; outline-offset: 2px; }
.wp-row { display: grid; grid-template-columns: 240px 1fr; gap: var(--s-2); }
.save-bar { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-3); margin-top: var(--s-4); flex-wrap: wrap; }
.save-bar .muted { font-size: var(--fs-13); margin-right: auto; }
.dev-tabs { display: inline-flex; margin-bottom: var(--s-3); }
.dev-tabs.seg { grid-auto-columns: auto; }
.app-row { display: grid; grid-template-columns: auto auto 1fr auto; gap: var(--s-3); align-items: center; min-height: 60px; padding: var(--s-1) var(--s-4); }
.app-row + .app-row { border-top: 1px solid var(--hairline); }
.app-name, .app-ico { transition: opacity var(--t-med) var(--ease); }
.app-row.off .app-name, .app-row.off .app-ico { opacity: .4; }
.app-ico { width: 36px; height: 36px; border-radius: var(--r-control); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-15); color: var(--text); background: var(--hover); }
.app-name { min-width: 0; }
.app-name b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-name small { display: block; color: var(--text-3); font-size: var(--fs-12); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-actions { display: flex; align-items: center; gap: 2px; }
.count-pill { font-size: var(--fs-13); color: var(--text-3); }

/* ---------- diálogo ---------- */
dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; color: var(--text); background: var(--glass-sheen), var(--glass-strong); border: 0; }
dialog::backdrop { background: rgba(5, 7, 13, .64); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog[open] { animation: fade var(--t-med) var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-5) var(--s-5) 0; }
.dlg-head h2 { font-size: var(--fs-20); }
.dlg-body { padding: var(--s-4) var(--s-5) var(--s-1); }
.dlg-foot { display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-5); }

/* ---------- aviso flutuante ---------- */
#toasts { position: fixed; left: 50%; bottom: var(--s-5); transform: translateX(-50%); z-index: 100; display: grid; gap: var(--s-2); width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-4); background: var(--glass-sheen), var(--glass-strong); font-size: var(--fs-15); font-weight: 600; animation: fade var(--t-med) var(--ease); }
.toast svg.i { width: 18px; height: 18px; }
.toast.err svg.i { color: var(--error); }

/* ---------- telemóvel ---------- */
@media (max-width: 720px) {
  nav.tabs-nav a span { display: none; }
  nav.tabs-nav a { padding: 0; width: 44px; justify-content: center; }
}
@media (max-width: 560px) {
  main { padding-top: var(--s-5); }
  h1 { font-size: var(--fs-24); letter-spacing: -.5px; }
  h1.xl { font-size: var(--fs-32); letter-spacing: -.8px; }
  .brand span { display: none; }
  header.top .wrap { grid-template-columns: auto 1fr auto; }
  nav.tabs-nav { justify-self: center; }
  .card { padding: var(--s-4); }
  .pl, .solo .pl { grid-template-columns: auto auto 1fr; }
  .solo .pl { grid-template-columns: auto 1fr; }
  .pl-actions { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid var(--hairline); padding-top: var(--s-2); }
  .pl-move { margin-right: auto; border-right: 0; }
  .pl-status, .solo .pl-status { grid-column: 1 / -1; }
  .wp-row { grid-template-columns: 1fr; }
  .app-row { grid-template-columns: auto 1fr auto; padding: var(--s-1) var(--s-3); }
  .app-row .app-ico { display: none; }
  .dlg-foot .btn { flex: 1; }
  .products { grid-template-columns: 1fr; }
  .seg button svg.i { display: none; }
}

/* ---------- rodapé e língua ---------- */
.site-foot { padding: 0 0 var(--s-6); }
.site-foot .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; border-top: 1px solid var(--hairline); padding-top: var(--s-4); }
.lang-pick { position: relative; display: inline-flex; align-items: center; color: var(--text-2); }
.lang-pick svg.i { position: absolute; inset-inline-start: 12px; width: 18px; height: 18px; pointer-events: none; }
.lang-pick select { width: auto; height: 40px; padding-inline-start: 38px; background-color: rgba(255, 255, 255, .06); font-size: var(--fs-13); font-weight: 600; color: var(--text-2); }
:root .site-foot .muted { color: var(--text-2); }

/* ---------- direita para a esquerda (árabe) ---------- */
[dir="rtl"] .code-boxes { direction: ltr; }
[dir="rtl"] select { background-position: left 12px center; padding-right: var(--s-3); padding-left: 36px; }
[dir="rtl"] .lang-pick select { padding-left: 36px; padding-right: 38px; }
[dir="rtl"] .pl-move { border-right: 0; border-left: 1px solid var(--hairline); padding-right: 0; padding-left: var(--s-2); margin-right: 0; margin-left: var(--s-1); }
[dir="rtl"] .handle { margin-left: 0; margin-right: -8px; }
[dir="rtl"] svg.i[data-flip], [dir="rtl"] .btn svg.i:last-child:not(:first-child) { transform: scaleX(-1); }
/* O árabe é cursivo: espaçamento entre letras parte as ligações. */
html[lang="ar"] *, html[lang="ar"] *::before { letter-spacing: 0 !important; }

/* ---------- instalar as apps (códigos Downloader) ---------- */
.install { margin-top: var(--s-4); }
.auth .install { margin-top: var(--s-6); }
.install-head { display: flex; gap: var(--s-3); align-items: flex-start; }
.install-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-2); margin-top: var(--s-4); }
.auth .install-apps { grid-template-columns: 1fr; }
.install-app { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name btn" "code btn"; align-items: center; gap: var(--s-1) var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-card); background: rgba(255, 255, 255, .06); }
.install-name { grid-area: name; display: flex; align-items: center; gap: var(--s-2); }
.install-name svg.i { color: var(--sky); width: 18px; height: 18px; }
.install-code { grid-area: code; display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
.dl-code { font: 700 var(--fs-24)/1.1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; color: var(--text); }
.install-app .btn { grid-area: btn; }
.install-code { align-items: center; }
.copy-btn { width: 36px; height: 36px; min-width: 36px; color: var(--text-2); }
.copy-btn svg.i { width: 18px; height: 18px; }
.copy-btn.copied { color: var(--text); background: var(--hover); }
@media (pointer: coarse) { .copy-btn { width: 44px; height: 44px; min-width: 44px; } }
