/* Worumi Bio: painel (estilo macOS / visionOS) */
:root {
  --bg: #000; --fg: rgba(255,255,255,.92); --fg2: rgba(255,255,255,.6); --fg3: rgba(255,255,255,.4);
  --glass: rgba(255,255,255,.035); --glass2: rgba(255,255,255,.06); --glass3: rgba(255,255,255,.1);
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --accent: #a855f7; --accent2: #3b82f6; --green: #30d158; --orange: #ff9f0a; --red: #ff453a; --blue: #0a84ff;
  --grad: linear-gradient(135deg, #a855f7, #3b82f6);
  --ease: cubic-bezier(.2,.9,.25,1); --spring: cubic-bezier(.2,.9,.3,1.25);
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}
body.app { font-family: var(--font-ui); background: var(--bg); color: var(--fg); display: flex; height: 100vh; height: 100dvh; overflow: hidden; font-size: 14.5px; letter-spacing: -.005em; }
/* Nota: já existiu aqui um "zoom" automático em ecrãs grandes (4K, ultrawide). Foi removido
   porque o CSS zoom, combinado com height:100dvh + overflow:hidden, faz o browser calcular mal
   a altura de scroll disponível — o resultado era páginas do painel (Definições, Admin, etc.)
   a aparecerem cortadas em baixo, sem conseguir dar scroll até ao fim. Sem o zoom o scroll
   funciona sempre corretamente, em qualquer monitor. */
.amb { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(circle at 12% 45%, rgba(126,34,206,.22), transparent 32%), radial-gradient(circle at 88% 22%, rgba(59,130,246,.14), transparent 30%), radial-gradient(circle at 60% 110%, rgba(236,72,153,.1), transparent 35%); }
.glass { background: var(--glass); backdrop-filter: blur(40px) saturate(150%); -webkit-backdrop-filter: blur(40px) saturate(150%); border: 1px solid var(--line); box-shadow: 0 10px 40px -10px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04); }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 10px; } ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }
::selection { background: rgba(168,85,247,.45); }

/* ---------- Barra lateral ---------- */
.side { width: 264px; flex: none; padding: 16px; position: relative; z-index: 3; }
.side-in { height: 100%; border-radius: 30px; padding: 20px 14px 14px; display: flex; flex-direction: column; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; margin-bottom: 30px; text-decoration: none; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.brand em { font-style: normal; color: var(--fg3); font-weight: 600; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: url(/assets/release-20260928-13/favicon.svg) center/cover; box-shadow: 0 6px 20px -4px rgba(168,85,247,.6); }
.nav-label { font-size: 11px; font-weight: 700; color: var(--fg3); text-transform: uppercase; letter-spacing: .1em; padding: 0 10px; margin-bottom: 10px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 13px; color: var(--fg2); text-decoration: none; font-weight: 500; transition: background .2s, color .2s; position: relative; }
.nav a .ic { font-size: 19px; }
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav a.on { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 50%; width: 4px; height: 18px; margin-top: -9px; border-radius: 0 4px 4px 0; background: var(--grad); }
.side-card { margin-top: auto; margin-bottom: 12px; padding: 16px; border-radius: 20px; background: linear-gradient(145deg, rgba(168,85,247,.18), rgba(59,130,246,.1)); border: 1px solid rgba(168,85,247,.25); }
.side-card b { display: block; font-size: 13.5px; margin-bottom: 4px; }
.side-card p { margin: 0 0 12px; font-size: 12.5px; color: var(--fg2); line-height: 1.45; }
.side-card .btn { width: 100%; justify-content: center; }
.me { display: flex; align-items: center; gap: 11px; padding: 12px 6px 2px; border-top: 1px solid var(--line); }
.me .avatar { width: 38px; height: 38px; }
.me-tx { flex: 1; min-width: 0; }
.me-tx b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-tx span { display: block; font-size: 12px; color: var(--fg3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 34px; height: 34px; border-radius: 11px; border: 0; background: transparent; color: var(--fg2); display: grid; place-items: center; font-size: 18px; transition: background .2s, color .2s, transform .2s; flex: none; }
.icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.icon-btn:active { transform: scale(.9); }
.icon-btn.danger:hover { background: rgba(255,69,58,.15); color: var(--red); }

.avatar { border-radius: 50%; background: #1c1c1e; display: grid; place-items: center; overflow: hidden; font-weight: 700; color: #fff; flex: none; border: 1px solid var(--line2); font-size: 14px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Área principal ---------- */
.main { flex: 1; min-width: 0; height: 100%; overflow-y: auto; position: relative; z-index: 2; padding: 30px 28px 80px 12px; scroll-behavior: smooth; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 6px 0 28px; flex-wrap: wrap; }
.top h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.top p { margin: 5px 0 0; color: var(--fg2); font-size: 15px; }
.top-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.save { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--fg3); font-weight: 500; padding: 0 6px; transition: color .3s; min-width: 92px; justify-content: flex-end; }
.save .ic { font-size: 15px; }
.save.ok { color: var(--green); }
.save.err { color: var(--red); }
.save.warn { color: var(--orange); }
.save .spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: #fff; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 17px; border-radius: 99px; border: 1px solid var(--line2); background: var(--glass2); color: #fff; font-size: 13.5px; font-weight: 600; text-decoration: none; transition: background .2s, transform .25s var(--spring), box-shadow .2s, opacity .2s; white-space: nowrap; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.btn .ic { font-size: 16px; }
.btn:hover { background: rgba(255,255,255,.12); }
.btn:active { transform: scale(.96); }
.btn.white { background: #fff; color: #000; border-color: #fff; box-shadow: 0 0 20px rgba(255,255,255,.25); }
.btn.white:hover { background: rgba(255,255,255,.88); }
.btn.grad { background: var(--grad); border-color: transparent; box-shadow: 0 8px 24px -8px rgba(168,85,247,.7); }
.btn.grad:hover { filter: brightness(1.1); }
.btn.danger { color: var(--red); border-color: rgba(255,69,58,.3); background: rgba(255,69,58,.08); }
.btn.danger:hover { background: rgba(255,69,58,.16); }
.btn.sm { padding: 7px 13px; font-size: 12.5px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.view { animation: viewIn .5s var(--ease); max-width: 1440px; margin: 0 auto; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Painéis e grelhas ---------- */
.panel { border-radius: 26px; padding: 24px; position: relative; }
.panel h3 { margin: 0; font-size: 16.5px; font-weight: 650; letter-spacing: -.015em; }
.panel .hint { margin: 5px 0 0; color: var(--fg2); font-size: 13px; line-height: 1.5; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.grid { display: grid; gap: 20px; align-items: stretch; }
.grid.g2 > .panel { display: flex; flex-direction: column; }
.grid.g2 > .stack { display: flex; flex-direction: column; gap: 20px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.mt { margin-top: 20px; }

/* KPI */
.kpi { border-radius: 24px; padding: 20px 20px 16px; overflow: hidden; position: relative; transition: transform .35s var(--spring), background .25s; }
.kpi:hover { transform: translateY(-2px); background: rgba(255,255,255,.05); }
.kpi-top { display: flex; justify-content: space-between; align-items: center; color: var(--fg2); font-size: 13px; font-weight: 500; }
.kpi-top .ic { font-size: 17px; color: var(--fg3); }
.kpi-v { font-size: 32px; font-weight: 700; letter-spacing: -.035em; margin-top: 12px; font-variant-numeric: tabular-nums; }
.kpi-d { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--fg3); }
.kpi-d.up { color: var(--green); } .kpi-d.down { color: var(--red); }
.kpi svg.spark { position: absolute; right: 0; bottom: 0; width: 46%; height: 46px; opacity: .8; }
.kpi-v, .kpi-top { position: relative; z-index: 1; }
.kpi.hl::before { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg, rgba(168,85,247,.16), transparent 60%); pointer-events: none; }

/* Completar perfil */
.complete { display: flex; gap: 22px; align-items: center; }
.ring { width: 92px; height: 92px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .rbg { stroke: rgba(255,255,255,.08); }
.ring .rfg { transition: stroke-dashoffset 1.2s var(--ease); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line2); background: rgba(255,255,255,.05); font-size: 12.5px; font-weight: 550; color: var(--fg); transition: background .2s, transform .25s var(--spring); }
.pill:hover { background: rgba(255,255,255,.1); }
.pill:active { transform: scale(.95); }
.pill .ic { font-size: 14px; }
.pill.done { color: var(--green); border-color: rgba(48,209,88,.25); background: rgba(48,209,88,.08); }

/* Gráficos */
.chart { position: relative; height: 260px; }
.chart svg { width: 100%; height: 100%; overflow: visible; display: block; }
.chart svg text { font-family: var(--font-ui); }
.chart .gridl { stroke: rgba(255,255,255,.06); }
.chart .axis { fill: var(--fg3); font-size: 11px; font-weight: 600; }
.chart .tip { position: absolute; top: 0; pointer-events: none; padding: 10px 12px; border-radius: 14px; background: rgba(30,30,34,.92); border: 1px solid var(--line2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); font-size: 12.5px; white-space: nowrap; opacity: 0; transition: opacity .15s; transform: translateX(-50%); box-shadow: 0 12px 30px -10px rgba(0,0,0,.6); z-index: 2; }
.chart .tip b { display: block; margin-bottom: 6px; font-size: 12px; color: var(--fg2); font-weight: 600; }
.chart .tip div { display: flex; align-items: center; gap: 8px; }
.chart .tip i { width: 8px; height: 8px; border-radius: 50%; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--fg2); font-weight: 500; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid var(--line); gap: 2px; position: relative; }
.admin-tabs { margin-bottom: 18px; }
.admin-pane-host { display: block; }
.seg button { border: 0; background: transparent; color: var(--fg2); padding: 6px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 600; transition: background .25s, color .2s; }
.seg button.on { background: rgba(255,255,255,.14); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px; }
.bar-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; background: rgba(255,255,255,.07); }
.bar-tx { min-width: 0; }
.bar-tx b { display: block; font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.06); margin-top: 7px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; background: var(--grad); width: 0; transition: width 1s var(--ease); }
.bar-n { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.bar-n small { display: block; color: var(--fg3); font-weight: 500; font-size: 11px; }
.donut { display: flex; align-items: center; gap: 22px; }
.donut svg { width: 128px; height: 128px; flex: none; transform: rotate(-90deg); }
.donut-l { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.donut-l div { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.donut-l i { width: 10px; height: 10px; border-radius: 3px; }
.donut-l b { margin-left: auto; font-variant-numeric: tabular-nums; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 90px; }
.hours div { border-radius: 4px 4px 2px 2px; background: var(--grad); min-height: 3px; opacity: .85; transition: opacity .2s; }
.hours div:hover { opacity: 1; }
.hours-ax { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--fg3); margin-top: 8px; font-weight: 600; }
.feed { display: flex; flex-direction: column; }
.feed div { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed div:last-child { border-bottom: 0; }
.feed .fi { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; flex: none; }
.feed .fi.v { background: rgba(10,132,255,.15); color: #64b5ff; }
.feed .fi.c { background: rgba(168,85,247,.16); color: #d0a4ff; }
.feed span { flex: 1; min-width: 0; color: var(--fg2); }
.feed span b { color: var(--fg); font-weight: 600; }
.feed time { color: var(--fg3); font-size: 12px; white-space: nowrap; }
.banner { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 18px; background: rgba(255,159,10,.08); border: 1px solid rgba(255,159,10,.25); color: #ffd18a; font-size: 13px; margin-bottom: 20px; }
.banner .ic { font-size: 18px; }
.banner span { flex: 1; }

/* O teu link */
.mylink { display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 15px; border-radius: 15px; background: rgba(0,0,0,.3); border: 1px solid var(--line); font-size: 13.5px; }
.mylink span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.mylink span i { font-style: normal; color: var(--fg3); }
.qr-mini { width: 132px; height: 132px; padding: 10px; border-radius: 20px; background: #fff; margin: 18px auto 4px; }
.qr-mini svg { width: 100%; height: 100%; display: block; }

/* ---------- Links ---------- */
.add-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.add-main { flex: 1; min-width: 220px; justify-content: center; padding: 15px 20px; font-size: 15px; border-radius: 18px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 26px; }
.quick .pill .ic { font-size: 15px; }
.lrows { display: flex; flex-direction: column; gap: 12px; position: relative; }
.lrow { border-radius: 22px; transition: box-shadow .25s, background .25s, border-color .25s; position: relative; }
.lrow.dragging { z-index: 5; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); background: rgba(40,40,46,.85); border-color: var(--line2); transition: none; }
.lrow.shift { transition: transform .3s var(--ease); }
.lrow.off .lr-main { opacity: .45; }
.lr-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 8px; }
.grip { width: 30px; height: 40px; display: grid; place-items: center; color: var(--fg3); font-size: 18px; cursor: grab; touch-action: none; border-radius: 10px; flex: none; }
.grip:hover { color: #fff; background: rgba(255,255,255,.06); }
.grip:active { cursor: grabbing; }
.lr-main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; cursor: pointer; transition: opacity .2s; }
.lr-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 21px; flex: none; border: 1px solid rgba(255,255,255,.12); }
.lr-tx { min-width: 0; flex: 1; }
.lr-tx b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-tx span { display: block; font-size: 12.5px; color: var(--fg3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 650; padding: 3px 8px; border-radius: 99px; background: rgba(255,255,255,.07); color: var(--fg2); }
.tag .ic { font-size: 12px; }
.tag.star { background: rgba(255,214,10,.12); color: #ffd60a; }
.tag.clock { background: rgba(10,132,255,.13); color: #64b5ff; }
.tag.play { background: rgba(255,69,58,.13); color: #ff8a80; }
.tag.warn { background: rgba(255,159,10,.13); color: #ffc15e; }
.lr-clicks { text-align: right; font-size: 12px; color: var(--fg3); white-space: nowrap; padding: 0 6px; }
.lr-clicks b { display: block; font-size: 15px; color: var(--fg); font-weight: 650; font-variant-numeric: tabular-nums; }
.lr-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.lr-body > div { overflow: hidden; }
.lrow.open .lr-body { grid-template-rows: 1fr; }
.lrow.open .chev { transform: rotate(180deg); }
.chev { transition: transform .35s var(--ease); }
.editor { padding: 6px 20px 20px 52px; display: grid; gap: 16px; }
.sect-row .lr-ic { background: transparent; border-style: dashed; color: var(--fg3); }

/* Formulários */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .lbl { font-size: 12px; font-weight: 600; color: var(--fg2); letter-spacing: .01em; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lbl small, .field > label small { font-weight: 500; color: var(--fg3); }
.inp { width: 100%; padding: 11px 14px; border-radius: 13px; border: 1px solid var(--line2); background: rgba(0,0,0,.3); color: #fff; font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.inp::placeholder { color: rgba(255,255,255,.3); }
.inp:focus { border-color: rgba(168,85,247,.7); box-shadow: 0 0 0 4px rgba(168,85,247,.18); background: rgba(0,0,0,.45); }
.inp.bad { border-color: rgba(255,69,58,.7); box-shadow: 0 0 0 4px rgba(255,69,58,.12); }
textarea.inp { resize: vertical; min-height: 88px; line-height: 1.5; }
select.inp { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-opacity='.5' stroke-width='2' stroke-linecap='round'><path d='M6 9.5l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
select.inp option { background: #1c1c1e; }
.inp-pre { display: flex; align-items: center; border-radius: 13px; border: 1px solid var(--line2); background: rgba(0,0,0,.3); transition: border-color .2s, box-shadow .2s; overflow: hidden; isolation: isolate; }
.inp-pre:focus-within { border-color: rgba(168,85,247,.7); box-shadow: 0 0 0 4px rgba(168,85,247,.18); }
.inp-pre span { padding-left: 14px; color: var(--fg3); font-size: 14px; white-space: nowrap; }
.inp-pre .inp, .inp-pre .inp:focus, .inp-pre .inp:focus-visible { border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none !important; padding-left: 2px; border-radius: 0; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.help { font-size: 12px; color: var(--fg3); line-height: 1.45; }
.help.ok { color: var(--green); } .help.bad { color: var(--red); }

.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sw-row:last-child { border-bottom: 0; }
.sw-row b { display: block; font-size: 14px; font-weight: 550; }
.sw-row span { display: block; font-size: 12.5px; color: var(--fg3); margin-top: 2px; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(120,120,128,.36); transition: background .3s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.3); transition: transform .35s var(--spring), width .2s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:active + i::after { width: 30px; }
.switch input:checked:active + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(255,255,255,.5); }
.switch.sm { width: 42px; height: 25px; }
.switch.sm i::after { width: 21px; height: 21px; }
.switch.sm input:checked + i::after { transform: translateX(17px); }

/* Caixa de verificação (checkbox) com o mesmo acabamento Apple do interruptor acima. */
.cbx { position: relative; width: 24px; height: 24px; flex: none; display: inline-block; cursor: pointer; }
.cbx input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; margin: 0; }
.cbx i { position: absolute; inset: 0; border-radius: 8px; border: 1.5px solid var(--line2); background: rgba(255,255,255,.04); transition: background .18s, border-color .18s; }
.cbx i::after { content: ""; position: absolute; inset: 0; opacity: 0; transform: scale(.4); transition: opacity .15s, transform .18s var(--spring); background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 13l4 4L19 7'/></svg>") no-repeat center / 15px; }
.cbx input:hover + i { border-color: rgba(255,255,255,.4); }
.cbx input:checked + i { background: #0a84ff; border-color: #0a84ff; }
.cbx input:checked + i::after { opacity: 1; transform: scale(1); }
.cbx input:focus-visible + i { box-shadow: 0 0 0 3px rgba(10,132,255,.35); }
.cbx input:disabled + i { opacity: .4; cursor: not-allowed; }
.cbx input:disabled { cursor: not-allowed; }
.cbx.bad i { border-color: var(--red); }

/* Seletor de cor com moldura, em vez do quadrado cru do sistema operativo. */
.color-pick { position: relative; display: inline-block; width: 32px; height: 32px; border-radius: 9px; border: 1.5px solid var(--line2); overflow: hidden; cursor: pointer; flex: none; transition: border-color .18s, box-shadow .18s; background: rgba(255,255,255,.04); }
.color-pick:hover { border-color: rgba(255,255,255,.4); }
.color-pick:focus-within { border-color: #0a84ff; box-shadow: 0 0 0 3px rgba(10,132,255,.28); }
.color-pick input[type=color] { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; cursor: pointer; background: none; }
.color-pick.bad { border-color: var(--red); }
.color-pick.disabled { opacity: .4; pointer-events: none; }

.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.icon-grid button { aspect-ratio: 1; border-radius: 12px; border: 1px solid transparent; background: rgba(255,255,255,.05); color: var(--fg2); display: grid; place-items: center; font-size: 18px; transition: background .2s, color .2s, transform .2s var(--spring); }
.icon-grid button:hover { background: rgba(255,255,255,.1); color: #fff; }
.icon-grid button.on { background: rgba(168,85,247,.22); border-color: rgba(168,85,247,.6); color: #fff; }
.icon-grid button.auto { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; padding: 0; position: relative; transition: transform .25s var(--spring); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.swatch:hover { transform: scale(1.1); }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.swatch.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); overflow: hidden; }
.swatch.custom input { position: absolute; inset: -6px; opacity: 0; cursor: pointer; width: calc(100% + 12px); height: calc(100% + 12px); }
.row-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--line); margin-top: 2px; padding-top: 14px; }

/* ---------- Aparência ---------- */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 14px; }
.theme { border: 0; padding: 0; background: none; text-align: center; color: var(--fg2); font-size: 12.5px; font-weight: 600; }
.theme-mini { aspect-ratio: 9 / 15; border-radius: 18px; position: relative; overflow: hidden; border: 2px solid transparent; transition: transform .35s var(--spring), border-color .2s, box-shadow .2s; margin-bottom: 8px; box-shadow: 0 10px 24px -12px rgba(0,0,0,.7); }
.theme:hover .theme-mini { transform: translateY(-3px); }
.theme.on .theme-mini { border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.14); }
.theme.on { color: #fff; }
.theme-mini .tm-av { position: absolute; top: 14%; left: 50%; width: 26%; aspect-ratio: 1; margin-left: -13%; border-radius: 50%; background: rgba(0,0,0,.6); border: 2px solid rgba(255,255,255,.5); }
.theme-mini .tm-b { position: absolute; left: 14%; right: 14%; height: 9%; border-radius: 99px; background: rgba(255,255,255,.28); border: 1px solid rgba(255,255,255,.35); }
.theme-mini.light .tm-b { background: rgba(255,255,255,.7); }
.theme-mini .tm-custom { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; color: #fff; }
.styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.style-opt { border: 1px solid var(--line2); background: rgba(255,255,255,.03); border-radius: 18px; padding: 16px 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--fg2); font-size: 12.5px; font-weight: 600; transition: border-color .2s, background .2s, transform .25s var(--spring); }
.style-opt:hover { background: rgba(255,255,255,.07); }
.style-opt.on { border-color: rgba(168,85,247,.8); background: rgba(168,85,247,.12); color: #fff; }
.style-opt i { display: block; width: 100%; height: 26px; border-radius: 99px; }
.so-glass { background: linear-gradient(120deg, rgba(255,255,255,.28), rgba(255,255,255,.12)); border: 1px solid rgba(255,255,255,.3); }
.so-solid { background: linear-gradient(115deg, #a855f7, #6d28d9); }
.so-outline { border: 1.5px solid rgba(255,255,255,.7); }
.so-minimal { background: rgba(255,255,255,.15); height: 18px !important; margin: 4px 0; }
.fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.font-opt { border: 1px solid var(--line2); background: rgba(255,255,255,.03); border-radius: 16px; padding: 14px 6px 10px; color: var(--fg2); font-size: 11.5px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: border-color .2s, background .2s; }
.font-opt span { font-size: 26px; color: #fff; font-weight: 600; line-height: 1.1; }
.font-opt.on { border-color: rgba(168,85,247,.8); background: rgba(168,85,247,.12); color: #fff; }
.range { width: 100%; accent-color: #a855f7; }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row output { min-width: 44px; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; font-size: 13px; }
.colors4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cpick { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--fg3); font-weight: 600; }
.cpick label { position: relative; height: 46px; border-radius: 14px; border: 1px solid var(--line2); overflow: hidden; cursor: pointer; }
.cpick input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; cursor: pointer; }
.avatar-up { display: flex; align-items: center; gap: 18px; }
.avatar-up .avatar { width: 84px; height: 84px; font-size: 28px; }
.drop { border: 1.5px dashed var(--line2); border-radius: 18px; padding: 18px; text-align: center; color: var(--fg2); font-size: 13px; transition: border-color .2s, background .2s; cursor: pointer; }
.drop.over, .drop:hover { border-color: rgba(168,85,247,.7); background: rgba(168,85,247,.07); }
.drop .ic { font-size: 22px; margin: 0 auto 8px; color: var(--fg3); }
.soc-rows { display: flex; flex-direction: column; gap: 10px; }
.soc-row { display: grid; grid-template-columns: 42px 1fr 34px; gap: 10px; align-items: center; }
.soc-row .soc-ic { width: 42px; height: 42px; border-radius: 13px; background: rgba(255,255,255,.07); display: grid; place-items: center; font-size: 19px; }

/* ---------- Pré-visualização (iPhone) ---------- */
.pv { width: 372px; flex: none; height: 100%; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; position: relative; z-index: 2; }
.phone { width: 322px; height: min(680px, calc(100vh - 110px)); border-radius: 54px; padding: 11px; background: linear-gradient(145deg, #3a3a3e, #121214 40%, #2a2a2e); box-shadow: 0 0 0 1.5px #4a4a50, 0 40px 90px -30px rgba(0,0,0,.95), 0 0 70px -20px rgba(168,85,247,.35); position: relative; }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 44px; background: #000; display: block; }
.phone-notch { position: absolute; top: 22px; left: 50%; width: 96px; height: 28px; margin-left: -48px; background: #000; border-radius: 20px; z-index: 2; }
.pv-cap { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg3); font-weight: 500; }
.pv-cap .live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
body.no-pv .pv { display: none; }
.pv-fab { display: none; }

/* ---------- Modal e toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s; display: grid; place-items: center; padding: 20px; }
.modal-back.on { opacity: 1; }
.modal { width: min(440px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 28px; padding: 26px; background: rgba(30,30,34,.9); border: 1px solid var(--line2); backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%); transform: scale(.94) translateY(10px); transition: transform .45s var(--spring); box-shadow: 0 40px 100px -30px rgba(0,0,0,.9); }
.modal-back.on .modal { transform: none; }
.modal h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.02em; }
.modal p { margin: 0 0 18px; color: var(--fg2); line-height: 1.5; font-size: 14px; }
.modal .acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.toast { position: fixed; left: 50%; top: 20px; z-index: 100; transform: translate(-50%, -150%); padding: 11px 18px; border-radius: 99px; background: rgba(40,40,44,.92); border: 1px solid var(--line2); display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); box-shadow: 0 16px 40px -12px rgba(0,0,0,.7); transition: transform .5s var(--spring); }
.toast.on { transform: translate(-50%, 0); }
.toast .ic { font-size: 18px; color: var(--green); }
.toast.err .ic { color: var(--red); }

.empty-st { text-align: center; padding: 48px 20px; color: var(--fg2); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-st .ic { font-size: 40px; margin: 0 auto 14px; color: var(--fg3); }
.empty-st b { font-size: 14.5px; font-weight: 600; color: var(--fg); }
.empty-st .hint { margin-top: 5px; max-width: 260px; }
/* Versão compacta: usada dentro de um cartão de estatísticas (ex.: "Links mais clicados" sem dados
   ainda), para não ficar mais baixa nem mais alta que o cartão vizinho com conteúdo (ex.: o donut de
   dispositivos) — parece um estado pensado de propósito, não um espaço em branco por engano. */
.empty-st.sm { padding: 26px 16px; min-height: 190px; }
.empty-st.sm .ic { font-size: 30px; margin-bottom: 10px; }
.skel { height: 120px; border-radius: 24px; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.07), rgba(255,255,255,.03)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Responsivo ---------- */
@media (max-width: 1400px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1280px) {
  .pv { display: none; }
  .main { padding-bottom: 110px; }
  .pv-fab { display: flex; position: fixed; right: 22px; bottom: 22px; z-index: 20; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 99px; border: 0; background: #fff; color: #000; font-weight: 650; font-size: 14px; box-shadow: 0 16px 40px -10px rgba(0,0,0,.8); transition: transform .3s var(--spring); }
  .pv-fab:active { transform: scale(.95); }
  body.pv-open .pv { display: flex; position: fixed; inset: 0; width: auto; z-index: 60; background: rgba(0,0,0,.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: 20px; animation: fade .3s; }
  body.pv-open .pv-fab { z-index: 61; }
  body.no-pv .pv-fab { display: none; }
}
@keyframes fade { from { opacity: 0; } }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  body.app { display: block; overflow: auto; height: auto; }
  .side { display: none; }
  .main { height: auto; overflow: visible; padding: 18px 16px 156px; }
  .top h1 { font-size: 26px; }
  .top { margin-bottom: 20px; }
  .tabbar { display: flex; }
  .pv-fab { bottom: 94px; right: 16px; }
  .editor { padding: 4px 14px 16px; }
  .styles { grid-template-columns: repeat(2, 1fr); }
  .fonts { grid-template-columns: repeat(3, 1fr); }
  .g3, .g2 { grid-template-columns: 1fr; }
  .lr-clicks { display: none; }
  .complete { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: 1fr 1fr; gap: 12px; } .kpi-v { font-size: 26px; } .f2 { grid-template-columns: 1fr; } .top-acts .btn.ghost { display: none; } .save { min-width: 0; } .panel { padding: 18px; border-radius: 22px; } .colors4 { grid-template-columns: repeat(2, 1fr); } }
.tabbar { display: none; position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 30; justify-content: space-around; padding: 8px 6px; border-radius: 26px; background: rgba(28,28,30,.78); border: 1px solid var(--line2); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); box-shadow: 0 16px 40px -10px rgba(0,0,0,.8); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--fg3); text-decoration: none; padding: 5px 8px; border-radius: 14px; transition: color .2s; }
.tabbar a .ic { font-size: 22px; }
.tabbar a.on { color: #fff; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (prefers-reduced-transparency: reduce) {
  /* Sobe a opacidade e tira o blur das superfícies que ainda usam vidro real nesta versão
     (a maioria dos painéis/botões já ficou opaca na "v5"); mantém as mesmas cores de fundo. */
  .toast, .tabbar, .spot, .modal-back, .chart .tip, body.pv-open .pv {
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
  .toast { background: #1c1c1e; }
  .tabbar { background: #1c1c1e; }
  .spot { background: #1c1c1e; }
  .modal-back { background: rgba(0,0,0,.92); }
  .chart .tip { background: #1c1c1e; }
  body.pv-open .pv { background: rgba(0,0,0,.95); }
}
/* Feedback ao toque: garantir que TODOS os controlos clicáveis relevantes reagem no próprio
   instante em que se carrega (não só alguns botões), tal como .btn/.icon-btn/.pill já faziam. */
.seg button:active { transform: scale(.94); }
.tabbar a:active { transform: scale(.9); }
.nav a:active { background: rgba(255,255,255,.16); }
.swatch:active { transform: scale(.9); }
button.badge.btn-badge:active:not(:disabled) { transform: scale(.93); }
.spot-row:active { background: rgba(255,255,255,.1); }
.next:active { transform: scale(.98); }
.btile:active .btile-ic { transform: scale(.9); }

/* Anel de foco consistente para navegação por teclado, reaproveitando o mesmo padrão azul
   (0 0 0 3px rgba(10,132,255,.35)) já usado em .cbx/.switch/.range/.inp — em vez do contorno
   por omissão do browser, que aqui destoava do resto da interface. */
.nav a:focus-visible, .icon-btn:focus-visible, .btn:focus-visible, .pill:focus-visible,
.seg button:focus-visible, .tabbar a:focus-visible, .style-opt:focus-visible,
.font-opt:focus-visible, .layout:focus-visible, .socstyle:focus-visible,
.swatch:focus-visible, .irow.tap:focus-visible, button.badge.btn-badge:focus-visible,
.next:focus-visible, .spot-row:focus-visible, .btile:focus-visible,
.icon-grid button:focus-visible, .me-top:focus-visible, .search:focus-visible,
.onb-dot:focus-visible {
  outline: none; box-shadow: 0 0 0 3px rgba(10,132,255,.35);
}
.theme:focus-visible .theme-mini { outline: none; box-shadow: 0 0 0 3px rgba(10,132,255,.5); }
.save:empty { display: none; }
@media (max-width: 860px) { .tabbar { display: flex; } }
@media (max-width: 520px) { .kpi svg.spark { opacity: .35; width: 60%; } .kpi-d { font-size: 11px; } }

/* =========================================================
   v2: acabamento Apple (Definições do macOS, Spotlight, etc.)
   ========================================================= */
body.app { font-feature-settings: "cv11" 0, "ss01" 0; }
.side { width: 272px; }
.side-in { padding: 18px 12px 12px; background: rgba(28,28,32,.5); }
.brand { margin-bottom: 16px; flex: none; }
.search { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--fg3); font-size: 13.5px; margin-bottom: 14px; transition: background .2s, border-color .2s; flex: none; }
.search:hover { background: rgba(255,255,255,.09); border-color: var(--line2); }
.search .ic { font-size: 15px; }
.search span { flex: 1; text-align: left; }
.search kbd { font: 600 11px/1 var(--font-ui); padding: 4px 6px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--fg3); border: 1px solid var(--line); }
.me-top { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px; border-radius: 14px; border: 0; background: transparent; text-align: left; margin-bottom: 10px; transition: background .2s; flex: none; }
.me-top:hover { background: rgba(255,255,255,.06); }
.me-top .me-tx { display: flex; flex-direction: column; min-width: 0; }
.me-top b { font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-top span span, .me-top .me-tx > span { font-size: 11.5px; color: var(--fg3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { gap: 14px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; -ms-overflow-style: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-g { display: flex; flex-direction: column; gap: 2px; }
.nav a { padding: 6px 8px; gap: 10px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--fg); }
.nav a.on { background: rgba(255,255,255,.12); font-weight: 600; }
.nav a.on::before { display: none; }
.sq { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; color: rgba(255,255,255,.62); background: rgba(255,255,255,.07); box-shadow: inset 0 .5px 0 rgba(255,255,255,.08); font-style: normal; transition: color .2s, background .2s; }
.nav a.on .sq { background: #0a84ff; color: #fff; }
.sq.lg { width: 44px; height: 44px; border-radius: 13px; }
.sq.lg svg { width: 20px; height: 20px; }
.sq .ic { font-size: 15px !important; }
.sq.sm { width: 30px; height: 30px; border-radius: 8px; }
.sq.sm .ic { font-size: 17px !important; }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); flex: none; }
.side-foot .btn { justify-content: center; width: 100%; }
/* Rodapé compacto e minimalista: página / partilhar / sair, em ícones pequenos, sem botões gigantes. */
.side-foot-row { display: flex; align-items: center; gap: 8px; }
.side-foot-row .icon-btn { flex: 1 1 0; width: auto; min-width: 0; height: 40px; border-radius: 12px; background: rgba(255,255,255,.04); }
.side-foot-row .icon-btn:hover { background: rgba(255,255,255,.09); }

/* Listas agrupadas (iOS / macOS) */
.ilist { border-radius: 14px; background: rgba(255,255,255,.045); border: 1px solid var(--line); overflow: hidden; margin-top: 14px; }
.panel .ilist:first-child { margin-top: 0; }
.irow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 9px 14px; border: 0; background: transparent; text-align: left; color: var(--fg); position: relative; font: inherit; }
.irow + .irow::before { content: ""; position: absolute; top: 0; left: 56px; right: 0; height: 1px; background: var(--line); }
.irow:not(:has(.sq)) + .irow::before, .irow + .irow:not(:has(.sq))::before { left: 14px; }
.irow.tap { cursor: pointer; transition: background .15s; }
.irow.tap:hover { background: rgba(255,255,255,.05); }
.irow.tap:active { background: rgba(255,255,255,.09); }
.irow-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.irow-tx b { font-size: 14px; font-weight: 550; }
.irow-tx span { font-size: 12.5px; color: var(--fg3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.irow-go { color: var(--fg3); font-size: 15px; }
.irow-acts { display: flex; gap: 2px; }
.irow-acts .icon-btn[disabled] { opacity: .25; pointer-events: none; }
.ic.up { transform: rotate(180deg); }
.note { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: rgba(10,132,255,.09); border: 1px solid rgba(10,132,255,.22); color: #9ccaff; font-size: 12.5px; line-height: 1.45; margin-top: 10px; }
.note > .ic, .note > span > .ic { font-size: 17px; flex: none; }
.note span { flex: 1; }
.head-r { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn.ghost-txt { background: transparent; border-color: transparent; color: var(--fg2); }
.btn.ghost-txt:hover { color: #fff; background: rgba(255,255,255,.06); }
.inp.sm { padding: 8px 12px; font-size: 13px; border-radius: 11px; margin-top: 10px; }
.seg.wrap { flex-wrap: wrap; }
.swatch.auto { background: rgba(255,255,255,.08); color: var(--fg2); font-size: 12px; font-weight: 700; }
.kpi .kpi-v { font-size: 28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Grelha de redes (inspirada no guns.lol, desenhada como o ecrã inicial do iPhone) */
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 16px 8px; }
.btile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--fg2); font-size: 11.5px; font-weight: 550; padding: 4px 0; border-radius: 16px; transition: transform .3s var(--spring); }
.btile:hover { transform: translateY(-2px); color: #fff; }
.btile:active { transform: scale(.92); }
.btile-ic { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-size: 26px; box-shadow: inset 0 .5px 0 rgba(255,255,255,.3), 0 6px 16px -6px rgba(0,0,0,.7); }
.btile-ic.lg { width: 60px; height: 60px; border-radius: 17px; font-size: 30px; flex: none; }
.btile-l { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btile-badge { position: absolute; top: -2px; right: calc(50% - 34px); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-size: 12px; border: 2px solid #1a1a1d; }
.btile-badge.link { background: #8e8e93; }
.btile.aslink .btile-ic { opacity: .55; }
.btile.on .btile-l { color: #fff; }
.legend2 { display: flex; gap: 18px; margin-top: 18px; font-size: 12px; color: var(--fg3); flex-wrap: wrap; }
.legend2 span { display: inline-flex; align-items: center; gap: 7px; }
.legend2 .dot { width: 10px; height: 10px; border-radius: 50%; }
.legend2 .dot.on { background: var(--green); } .legend2 .dot.link { background: #8e8e93; }
.sheet-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.sheet-head h3 { margin: 0 0 2px; }
.sheet-head p { margin: 0; font-size: 13px; }

/* Media (avatar, fundo, música) */
.mgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mtile { border-radius: 18px; background: rgba(255,255,255,.035); border: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 10px; transition: border-color .2s, background .2s; }
.mtile.over { border-color: rgba(191,90,242,.7); background: rgba(191,90,242,.08); }
.mt-drop { position: relative; height: 120px; border-radius: 12px; overflow: hidden; cursor: pointer; background: rgba(0,0,0,.25); border: 1.5px dashed var(--line2); display: grid; place-items: center; transition: border-color .2s, background .25s, transform .25s var(--spring), box-shadow .25s; }
.mt-drop:hover { border-color: rgba(255,255,255,.35); }
.mtile.has .mt-drop { border-style: solid; border-color: transparent; }
/* Arrastar um ficheiro para cima: cresce ligeiramente, brilha a azul e mostra "Larga aqui".
   (a classe "over" fica no .mtile, que é o elemento que o JS já tinha à mão) */
.mtile.over .mt-drop { border-style: solid; border-color: var(--blue); background: rgba(10,132,255,.14); transform: scale(1.03); box-shadow: 0 0 0 5px rgba(10,132,255,.16), 0 16px 32px -14px rgba(10,132,255,.5); }
.mtile.over .mt-drop-hint { opacity: 1; transform: translateY(0) scale(1); }
.mtile.over .mt-prev, .mtile.over .mt-empty { opacity: .25; filter: blur(1px); }
.mt-drop-hint { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; font-size: 12.5px; font-weight: 650; opacity: 0; transform: translateY(6px) scale(.94); transition: opacity .2s, transform .25s var(--spring); pointer-events: none; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.mt-drop-hint .ic { font-size: 22px; animation: dropBounce 1s ease-in-out infinite; }
@keyframes dropBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.mt-empty { color: var(--fg3); font-size: 26px; }
.mt-prev { position: absolute; inset: 0; }
.mt-prev video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mt-prev.av { position: static; width: 88px; height: 88px; border-radius: 50%; overflow: hidden; border: 3px solid rgba(255,255,255,.2); }
.mt-prev.av img { width: 100%; height: 100%; object-fit: cover; }
.mt-prev.audio { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 30px; background: linear-gradient(135deg, rgba(191,90,242,.35), rgba(10,132,255,.25)); }
.mt-prev .eq { display: flex; gap: 3px; align-items: flex-end; height: 26px; }
.mt-prev .eq i { width: 4px; border-radius: 2px; background: #fff; animation: eq2 1s ease-in-out infinite alternate; }
.mt-prev .eq i:nth-child(2) { animation-delay: -.2s; } .mt-prev .eq i:nth-child(3) { animation-delay: -.5s; } .mt-prev .eq i:nth-child(4) { animation-delay: -.7s; } .mt-prev .eq i:nth-child(5) { animation-delay: -.35s; }
@keyframes eq2 { from { height: 5px; } to { height: 26px; } }
.mt-spin { position: absolute; width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; animation: rot .7s linear infinite; display: none; }
.mtile.busy .mt-spin { display: block; }
.mtile.busy .mt-prev, .mtile.busy .mt-empty { opacity: .3; }
.mt-foot { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.mt-foot > div { flex: 1; min-width: 0; }
.mt-foot b { display: block; font-size: 13.5px; font-weight: 600; }
.mt-foot span { display: block; font-size: 11.5px; color: var(--fg3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Pré-visualização: iPhone ou janela Safari */
/* A coluna inteira (barra + telemóvel/computador + legenda "Ao vivo") forma um único bloco compacto,
   alinhado ao lado esquerdo (mais perto do conteúdo principal) em vez de flutuar centrado e isolado
   no meio de uma coluna larga. */
.pv { width: 340px; transition: width .45s var(--ease); gap: 12px; align-items: flex-start; padding-left: 10px; padding-right: 18px; }
.pv.desk { width: min(760px, 46vw); }
.pv-group { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 100%; min-height: 0; margin: auto 0; }
.pv-bar { display: flex; align-items: center; gap: 8px; width: 100%; justify-content: center; flex-wrap: wrap; }
.pv-bar .seg button { display: inline-flex; align-items: center; gap: 6px; }
.pv-bar .seg .ic { font-size: 14px; }
/* Zoom do modo Computador: fica ao lado do seletor iPhone/Computador, só visível nesse modo. */
.pv-zoom { display: none; align-items: center; gap: 6px; background: rgba(255,255,255,.06); border: 1px solid var(--line2); border-radius: 99px; padding: 4px 6px; }
.pv.desk .pv-zoom { display: flex; }
.pv-zoom button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: var(--fg); font-size: 15px; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, transform .15s; }
.pv-zoom button:hover { background: rgba(255,255,255,.16); }
.pv-zoom button:active { transform: scale(.9); }
.pv-zoom button:disabled { opacity: .3; cursor: default; }
.pv-zoom span { font-size: 11px; font-weight: 650; color: var(--fg2); min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
/* Altura máxima para o "palco" da pré-visualização: em ecrãs muito altos (4K/ultrawide) impede que o
   telemóvel fique a flutuar sozinho, longe da barra de cima — a barra, o telemóvel e a legenda ficam
   sempre agrupados e centrados juntos, como um único bloco. No modo Computador, a proporção do palco
   acompanha a do ecrã simulado (16:10) para não sobrar espaço vazio à volta da moldura. */
.pv-stage { width: 100%; flex: 1; min-height: 0; max-height: 640px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.pv.desk .pv-stage { max-height: min(540px, calc(100vh - 260px)); aspect-ratio: 16 / 10.5; flex: 0 1 auto; }
.device { position: relative; transition: all .45s var(--ease); }
.device .dev-bar { display: none; }
.device.is-phone { width: 318px; height: min(672px, calc(100vh - 150px)); border-radius: 54px; padding: 11px; background: linear-gradient(145deg, #3a3a3e, #121214 40%, #2a2a2e); box-shadow: 0 0 0 1.5px #4a4a50, 0 40px 90px -30px rgba(0,0,0,.95), 0 0 70px -20px rgba(191,90,242,.35); }
.device.is-phone .dev-screen { width: 100%; height: 100%; border-radius: 44px; overflow: hidden; background: #000; }
.device.is-phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.device .phone-notch { position: absolute; top: 22px; left: 50%; width: 96px; height: 28px; margin-left: -48px; background: #000; border-radius: 20px; z-index: 2; }
.device.is-desk { border-radius: 14px; overflow: hidden; background: #1c1c1e; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 40px 90px -30px rgba(0,0,0,.95), 0 0 70px -24px rgba(10,132,255,.3); }
.device.is-desk .phone-notch { display: none; }
.device.is-desk .dev-bar, .big-pv.is-desk .dev-bar { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px; background: #2a2a2d; border-bottom: 1px solid rgba(0,0,0,.4); }
.lights { display: flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; } .lights i:nth-child(3) { background: #28c840; }
.lights.ghost { visibility: hidden; }
.dev-url { flex: 1; text-align: center; font-size: 11.5px; color: var(--fg2); background: rgba(255,255,255,.07); border-radius: 7px; padding: 4px 10px; max-width: 360px; margin: 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device.is-desk .dev-screen { overflow: hidden; background: #000; }
.device.is-desk iframe { border: 0; display: block; }
.pv-cap span { color: var(--fg2); }
.modal.modal-wide { width: min(1320px, 96vw); max-height: 96vh; padding: 18px; }
.big-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.big-head .seg button { display: inline-flex; align-items: center; gap: 6px; }
.big-pv { margin: 0 auto; position: relative; }
.big-pv .dev-bar { display: none; }
.big-pv.is-phone { width: 390px; height: min(844px, calc(96vh - 110px)); border-radius: 56px; padding: 12px; background: linear-gradient(145deg, #3a3a3e, #121214 40%, #2a2a2e); box-shadow: 0 0 0 1.5px #4a4a50; }
.big-pv.is-phone iframe { width: 100%; height: 100%; border: 0; border-radius: 45px; display: block; }
.big-pv.is-desk { width: 100%; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.big-pv.is-desk .phone-notch { display: none; }
.big-pv.is-desk iframe { width: 100%; height: min(80vh, 820px); border: 0; display: block; }

/* Spotlight */
.spot-back { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.28); opacity: 0; transition: opacity .2s; display: flex; justify-content: center; align-items: flex-start; padding: 14vh 16px 16px; }
.spot-back.on { opacity: 1; }
.spot { width: min(640px, 100%); border-radius: 22px; background: rgba(40,40,44,.78); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(50px) saturate(190%); -webkit-backdrop-filter: blur(50px) saturate(190%); box-shadow: 0 40px 100px -20px rgba(0,0,0,.9); overflow: hidden; transform: scale(.97) translateY(-6px); transition: transform .3s var(--spring); }
.spot-back.on .spot { transform: none; }
.spot-bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; font-size: 22px; color: var(--fg2); }
.spot-in { flex: 1; border: 0; outline: 0; background: transparent; font-size: 20px; font-weight: 450; color: #fff; }
.spot-in::placeholder { color: rgba(255,255,255,.35); }
.spot-list { border-top: 1px solid var(--line); padding: 6px; max-height: 52vh; overflow: auto; }
.spot-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--fg); text-align: left; font-size: 14px; }
.spot-row.on { background: rgba(10,132,255,.85); color: #fff; }
.spot-row.on .spot-s { color: rgba(255,255,255,.8); }
.spot-ic { width: 28px; height: 28px; border-radius: 7px; background: rgba(255,255,255,.1); display: grid; place-items: center; font-size: 16px; flex: none; }
.spot-t { flex: 1; font-weight: 550; }
.spot-s { font-size: 12.5px; color: var(--fg3); }
.spot-empty { padding: 18px; text-align: center; color: var(--fg3); font-size: 14px; }

/* Onboarding */
body.is-onb .side, body.is-onb .top, body.is-onb .tabbar { display: none !important; }
body.is-onb .main { padding-left: 40px; }
.onb-top { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 34px; }
.onb-top .brand { margin: 0; padding: 0; }
.onb-dots { display: flex; gap: 8px; align-items: center; }
.onb-dot { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line2); background: rgba(255,255,255,.05); color: var(--fg3); font-size: 12.5px; font-weight: 700; display: grid; place-items: center; transition: all .3s var(--spring); }
.onb-dot.on { background: #fff; color: #000; border-color: #fff; transform: scale(1.08); }
.onb-dot.done { background: rgba(48,209,88,.18); color: var(--green); border-color: rgba(48,209,88,.4); }
.onb-dot .ic { font-size: 14px; }
.onb { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; animation: viewIn .5s var(--ease); }
.onb h1 { margin: 0; font-size: clamp(32px, 4vw, 44px); letter-spacing: -.035em; line-height: 1.05; }
.onb .lead { margin: -4px 0 8px; color: var(--fg2); font-size: 16px; }
.onb-step { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg3); }
.onb-av .mtile { max-width: 260px; }
.onb-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.onb-nav .btn { padding: 12px 22px; font-size: 14.5px; }
.onb-party { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 32px; background: linear-gradient(135deg, #bf5af2, #0a84ff); box-shadow: 0 16px 40px -12px rgba(191,90,242,.7); animation: pop .7s var(--spring); }
@keyframes pop { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
.onb .mylink .btn { flex: none; }

@media (max-width: 1280px) { .pv.desk { width: auto; } }
@media (max-width: 1100px) { .mgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  body.is-onb .main { padding-left: 16px; }
  .mgrid { grid-template-columns: 1fr; }
  .bgrid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
  .btile-ic { width: 50px; height: 50px; }
  .spot-back { padding-top: 10vh; }
  .tabbar a { padding: 5px 4px; font-size: 10px; }
}
@media (max-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr); } }
.stack, .panel { min-width: 0; }
.lr-tx .tag { display: inline-flex; margin-top: 0; white-space: nowrap; color: inherit; font-size: 11px; }
.lr-tx .tag.star { color: #ffd60a; } .lr-tx .tag.clock { color: #64b5ff; } .lr-tx .tag.play { color: #ff8a80; } .lr-tx .tag.warn { color: #ffc15e; }

/* v3: KPIs sem texto por cima do gráfico */
.kpi { display: flex; flex-direction: column; padding: 18px 18px 0; }
.kpi svg.spark { position: static; order: 9; display: block; width: calc(100% + 36px); height: 42px; margin: 12px -18px 0; opacity: .85; }
.kpi:not(:has(svg.spark)) { padding-bottom: 18px; }
.kpi-d { margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 520px) {
  .kpi { padding: 14px 14px 0; border-radius: 20px; }
  .kpi:not(:has(svg.spark)) { padding-bottom: 14px; }
  .kpi .kpi-v { font-size: 22px; margin-top: 8px; }
  .kpi-top { font-size: 12px; }
  .kpi svg.spark { width: calc(100% + 28px); margin: 8px -14px 0; height: 30px; opacity: .85; }
  .kpi-d { font-size: 11px; }
}

/* Apresentação: miniaturas dos layouts */
.layouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.layout { border: 1px solid var(--line2); background: rgba(255,255,255,.03); border-radius: 18px; padding: 10px 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--fg2); text-align: center; transition: border-color .2s, background .2s, transform .3s var(--spring); }
.layout:hover { transform: translateY(-2px); background: rgba(255,255,255,.06); }
.layout.on { border-color: rgba(191,90,242,.8); background: rgba(191,90,242,.1); color: #fff; }
.layout b { font-size: 13px; margin-top: 6px; }
.layout small { font-size: 11px; color: var(--fg3); line-height: 1.3; }
.lm { width: 100%; aspect-ratio: 10 / 13; border-radius: 12px; background: linear-gradient(160deg, #3b2a5c, #1b1330 60%, #0f0c1a); display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12% 12% 0; overflow: hidden; }
.lm i { display: block; font-style: normal; }
.lm-av { width: 26%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,.55); margin-bottom: 2px; }
.lm-l { height: 5px; border-radius: 3px; background: rgba(255,255,255,.55); }
.lm-l.big { width: 58%; height: 8px; margin-top: 4px; background: rgba(255,255,255,.8); }
.lm-l.w60 { width: 50%; } .lm-l.w40 { width: 32%; opacity: .6; } .lm-l.w50 { width: 60%; }
.lm-dots { display: flex; gap: 4px; margin: 2px 0 3px; }
.lm-dots b { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); }
.lm-b { width: 100%; height: 11%; border-radius: 6px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.18); }
.lm-card { width: 100%; display: flex !important; align-items: center; gap: 5px; padding: 6px; border-radius: 7px; background: rgba(255,255,255,.14); }
.lm-card b { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,.6); flex: none; }
.lm-grid { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 5px; width: 92%; margin: 4px 0; }
.lm-grid b { aspect-ratio: 1; border-radius: 4px; background: rgba(255,255,255,.4); }

/* Estilo dos ícones das redes */
.socstyles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.socstyle { border: 1px solid var(--line2); background: rgba(255,255,255,.03); border-radius: 16px; padding: 14px 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--fg2); transition: border-color .2s, background .2s; }
.socstyle.on { border-color: rgba(191,90,242,.8); background: rgba(191,90,242,.1); color: #fff; }
.socstyle b { font-size: 13px; margin-top: 8px; }
.socstyle small { font-size: 11px; color: var(--fg3); text-align: center; }
.ss-prev { display: flex; gap: 6px; }
.ss-prev i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; color: #fff; font-style: normal; }
.s-plain .ss-prev i { font-size: 19px; }
.s-glass .ss-prev i { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.s-brand .ss-prev i { background: var(--b); }
@media (max-width: 860px) { .layouts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .socstyles { gap: 8px; } .socstyle small { display: none; } }

/* =========================================================
   v5: painel clean, neutro, azul Apple
   ========================================================= */
/* --fg3 (rótulos/legendas terciárias) subido de .38 para .5: a .38, sobre os painéis quase opacos
   (#1c1c1e) desta versão "clean", o texto ficava perto de 3.7:1 de contraste — abaixo do 4.5:1 da
   WCAG AA para texto normal, e é usado em texto real (.help, subtítulos de links, badges), não só
   decorativo. A .5 fica perto de 5:1, sem deixar de ler como o tom mais apagado da hierarquia. */
:root { --accent: #0a84ff; --grad: #0a84ff; --line: rgba(255,255,255,.07); --line2: rgba(255,255,255,.11); --fg2: rgba(255,255,255,.58); --fg3: rgba(255,255,255,.5); }
body.app { background: #000; }
.amb { display: none; }
.glass { background: #1c1c1e; backdrop-filter: none; -webkit-backdrop-filter: none; border: 1px solid var(--line); box-shadow: none; }
.side-in { background: #141416; }
.panel { border-radius: 18px; }
.panel h3 { font-weight: 600; }
.top h1 { font-weight: 650; letter-spacing: -.028em; }
.kpi { border-radius: 18px; }
.kpi:hover { transform: none; background: #232326; }
.kpi.hl::before { display: none; }
.kpi .kpi-v { font-weight: 650; }
.btn { backdrop-filter: none; -webkit-backdrop-filter: none; background: #2c2c2e; border-color: transparent; font-weight: 550; }
.btn:hover { background: #3a3a3c; }
.btn.white { box-shadow: none; }
.btn.grad { background: #0a84ff; box-shadow: none; }
.btn.grad:hover { filter: none; background: #0071e3; }
.btn.danger { background: rgba(255,69,58,.12); border-color: transparent; }
.nav a.on { background: rgba(255,255,255,.09); }
.search, .me-top:hover { background: rgba(255,255,255,.05); }
.inp, .inp-pre { background: #0f0f10; border-color: var(--line2); }
.inp:focus, .inp-pre:focus-within { border-color: #0a84ff; box-shadow: 0 0 0 3px rgba(10,132,255,.25); background: #0f0f10; }
.inp-pre .inp:focus { border: 0; box-shadow: none; background: transparent; }
.range { accent-color: #0a84ff; }
.seg { background: #0f0f10; }
.seg button.on { background: #3a3a3c; box-shadow: none; }
.pill { background: #2c2c2e; border-color: transparent; }
.pill:hover { background: #3a3a3c; }
.pill.done { background: rgba(48,209,88,.1); }
.ilist { background: #151517; border-color: var(--line); }
.lrow.glass { background: #1c1c1e; }
.bar-fill, .hours div { background: #0a84ff; }
.banner { background: rgba(255,159,10,.07); border-color: rgba(255,159,10,.18); }
.note { background: rgba(10,132,255,.07); border-color: rgba(10,132,255,.18); }
.layout.on, .socstyle.on, .style-opt.on, .font-opt.on { border-color: #0a84ff; background: rgba(10,132,255,.1); }
.icon-grid button.on { background: rgba(10,132,255,.18); border-color: #0a84ff; }
.theme.on .theme-mini { border-color: #0a84ff; box-shadow: 0 0 0 3px rgba(10,132,255,.3); }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px #0a84ff; }
.mtile { background: #151517; }
.mtile.over, .drop.over, .drop:hover { border-color: #0a84ff; background: rgba(10,132,255,.07); }
.device.is-phone, .big-pv.is-phone { box-shadow: 0 0 0 1.5px #3a3a3c, 0 40px 80px -30px rgba(0,0,0,.9); background: linear-gradient(145deg, #2c2c2e, #111 45%, #232326); }
.device.is-desk { box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 30px 70px -30px rgba(0,0,0,.9); }
.brand-mark { box-shadow: none; }
.modal { background: #1c1c1e; backdrop-filter: none; -webkit-backdrop-filter: none; border-color: var(--line2); }
.lm { background: linear-gradient(180deg, #2c2c2e, #1c1c1e); }
.tabbar { background: rgba(22,22,24,.86); }
.toast { background: rgba(44,44,46,.95); }
.onb-party { background: #0a84ff; box-shadow: none; }
::selection { background: rgba(10,132,255,.4); }

/* v7: organização por grupos */
@media (max-width: 860px) { .top-acts #copyLink { display: none; } .top-acts .btn { padding: 7px 13px; font-size: 12.5px; } .top { flex-wrap: nowrap; } }
.panel-head { align-items: center; margin-bottom: 16px; }
.panel .hint { font-size: 12.5px; }
.grid.g3 { gap: 14px; }
.next { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; border-radius: 16px; margin-bottom: 14px; text-align: left; color: var(--fg); transition: background .2s; }
.next:hover { background: #232326; }
.next-ring { width: 34px; height: 34px; flex: none; }
.next-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.next-ring circle { fill: none; stroke-width: 4; stroke-linecap: round; }
.next-ring .rbg { stroke: rgba(255,255,255,.1); }
.next-ring .rfg { stroke: #0a84ff; }
.next-tx { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.next-tx b { font-size: 14px; font-weight: 600; }
.next-tx span { font-size: 12px; color: var(--fg3); }
.tabs-top { margin-bottom: 18px; }
.tabs-top button { padding: 7px 16px; font-size: 13px; }
.stack.narrow { max-width: 820px; }
.stack.narrow .panel { padding: 22px; }
.lr-clicks { font-size: 11px; }
@media (max-width: 520px) { .grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .grid.g3 .kpi .kpi-v { font-size: 19px; } .grid.g3 .kpi-d { white-space: normal; } }

.group-t { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fg3); margin: 26px 4px 10px; }
.group-t:first-child { margin-top: 0; }
.kpi-d .vs { font-weight: 500; opacity: .8; }
@media (max-width: 520px) { .kpi-d .vs { display: none; } }
.grip { opacity: .55; } .lrow:hover .grip { opacity: 1; }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.cols { margin-top: 26px; }
.cols .complete { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 16px; align-items: center; }
.cols .complete > div:last-child { display: contents; }
.cols .complete .ring { width: 64px; height: 64px; grid-row: 1 / span 2; }
.cols .complete .ring b { font-size: 15px; }
.cols .complete .ring circle { stroke-width: 9; }
.cols .complete h3 { grid-column: 2; align-self: end; }
.cols .complete .hint { grid-column: 2; align-self: start; }
.cols .complete .pills { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 16px; }
/* Sem min-width:0, um item de grid recusa-se a encolher abaixo do tamanho do seu texto por quebrar —
   em painéis estreitos, o texto era cortado a meio da palavra na borda em vez de passar à linha seguinte. */
.cols .complete .pill { justify-content: flex-start; border-radius: 12px; padding: 9px 11px; min-width: 0; white-space: normal; }
.cols .complete .pill .icw:last-child .ic { margin-left: auto; }
.cols .panel-head { flex-wrap: wrap; }
.cols .complete .pill { text-align: left; font-size: 12px; line-height: 1.25; }
.cols .complete h3 { margin-bottom: 2px; }
.cols .complete .hint { margin-top: 0; }

/* Controlo deslizante ao estilo iOS */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 0; }
.range:focus { outline: none; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, #0a84ff var(--p, 50%), rgba(255,255,255,.14) var(--p, 50%)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; margin-top: -10px; border: 0; box-shadow: 0 2px 6px rgba(0,0,0,.35), 0 0 0 .5px rgba(0,0,0,.08); transition: transform .18s cubic-bezier(.2,.9,.3,1.3); }
.range:active::-webkit-slider-thumb { transform: scale(1.12); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(10,132,255,.35), 0 2px 6px rgba(0,0,0,.35); }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); }
.range::-moz-range-progress { height: 4px; border-radius: 2px; background: #0a84ff; }
.range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.range-row { gap: 16px; }
.range-row output { min-width: 48px; font-size: 13px; font-weight: 600; color: var(--fg2); }

/* Menos efeitos, mais sobriedade */
.onb-party { background: #30d158; }
.theme-mini .tm-custom { background: rgba(0,0,0,.25); }

.lm-spacer { flex: 1; max-height: 22%; }
.lm-dots.big { gap: 7px; margin-top: 8px; }
.lm-dots.big b { width: 11px; height: 11px; }
.so-text { height: 8px !important; width: 60% !important; margin: 9px auto; background: rgba(255,255,255,.55); border-radius: 4px !important; }
.layouts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1300px) { .layouts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Admin */
.panel.stat { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.stat-n { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.stat-l { color: var(--fg2); font-size: 13px; }
.admin-rows { display: grid; gap: 10px; margin-top: 16px; }
.admin-row { display: grid; grid-template-columns: 1.4fr 1.3fr auto; gap: 14px; align-items: center; padding: 14px 16px; }
.admin-row.is-banned { border-color: rgba(255,69,58,.3); background: rgba(255,69,58,.06); }
.admin-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-who b { font-size: 14.5px; }
.admin-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-acts { display: flex; gap: 8px; justify-self: end; }
.badge { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); font-size: 12px; font-weight: 600; color: var(--fg2); }
.badge.on { background: rgba(10,132,255,.18); border-color: rgba(10,132,255,.4); color: #fff; }
button.badge.btn-badge { cursor: pointer; transition: background .15s, transform .1s; }
button.badge.btn-badge:hover:not(:disabled) { background: rgba(255,255,255,.14); }
button.badge.btn-badge:disabled { opacity: .5; cursor: default; }
@media (max-width: 800px) { .admin-row { grid-template-columns: 1fr; } .admin-acts { justify-self: start; } }
.admin-row .hint.pill-mini { padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.06); }
.ov-mini { display: flex; align-items: flex-end; gap: 3px; height: 54px; margin-top: 10px; }
.ov-mini i { flex: 1; min-width: 3px; border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg, #64d2ff, #0a84ff); }
.ov-devices { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.ov-dev-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--fg2); }
.ov-dev-row span:first-child { width: 62px; flex: none; }
.ov-dev-track { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.06); overflow: hidden; }
.ov-dev-fill { height: 100%; border-radius: 3px; background: #0a84ff; }
.ov-dev-row b { width: 34px; text-align: right; flex: none; color: var(--fg); }
.coupon-rows { display: grid; gap: 10px; margin-top: 16px; }
.coupon-row { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; }
.coupon-row.is-off { opacity: .5; }
.coupon-code { font-family: ui-monospace, monospace; font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.coupon-form { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; }
.coupon-form .field { display: flex; flex-direction: column; gap: 6px; }
.coupon-form .field label { font-size: 12px; color: var(--fg3); }
@media (max-width: 900px) { .coupon-form { grid-template-columns: repeat(2, 1fr); } .coupon-row { grid-template-columns: 1fr; } }

/* Badges */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.badge-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--line); transition: border-color .2s, background .2s; flex-wrap: wrap; }
/* O botão de compra (ex.: "1,99 € · Comprar") é largo demais para caber ao lado do texto em cartões
   estreitos — passa para a sua própria linha em vez de espremer o texto até as palavras se sobreporem. */
.badge-card > .btn { flex: 1 0 100%; justify-content: center; margin-top: 2px; }
.badge-card.on { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); }
.badge-ic { flex: none; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--bc) 18%, transparent); color: var(--bc); }
.badge-ic svg { width: 19px; height: 19px; }
.badge-ic.glow { box-shadow: 0 0 0 1px color-mix(in srgb, var(--bc) 45%, transparent), 0 0 14px -1px var(--bc); }
.badge-card.on .badge-ic.glow { box-shadow: 0 0 0 1px color-mix(in srgb, var(--bc) 65%, transparent), 0 0 18px 0 var(--bc); }
/* .badge-real mostra o selo real (o mesmo desenho da página pública), não o chip de texto ".badge" usado no resto do painel. */
.badge-real { flex: none; width: 38px; height: 38px; display: block; }
.badge-real .badge-tip, .badge-real svg.badge { all: revert; display: block; width: 100%; height: 100%; }
.badge-tx { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.badge-tx b { font-size: 13.5px; }
.badge-tx span { font-size: 12px; color: var(--fg3); overflow-wrap: break-word; word-break: break-word; }
@media (max-width: 640px) { .badge-grid { grid-template-columns: 1fr; } }
