/* =========================================================
   BioFácil — Painel administrativo
   ========================================================= */
:root{
  --ink:#1e2330;
  --ink-2:#2b3040;
  --text:#000;
  --muted:#676b5f;
  --muted-2:#8f9387;
  --bg:#f3f3f1;
  --bg-2:#ebebe7;
  --line:#e0e2d9;
  --line-2:#d3d5cc;
  --white:#fff;
  --purple:#8129d9;
  --purple-h:#6d1fc0;
  --green:#43e660;
  --green-d:#1d9e35;
  --red:#e0352b;
  --radius:16px;
  --shadow-card:0 0 0 1px rgba(0,0,0,.04),0 2px 4px rgba(0,0,0,.03),0 12px 32px rgba(0,0,0,.05);
  --shadow-row:0 0 0 1px rgba(0,0,0,.05),0 2px 6px rgba(0,0,0,.05);
  --rail:72px;
}
*,*::before,*::after{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:14px;color:var(--text);background:var(--ink);-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:inherit}
[hidden]{display:none!important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
svg{flex:none}

/* ---------- Botões genéricos ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:44px;padding:0 20px;border-radius:999px;border:0;font-weight:600;font-size:14px;text-decoration:none;transition:background .15s,transform .1s,box-shadow .15s;white-space:nowrap}
.btn:active{transform:scale(.98)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-lg{height:52px;font-size:16px;width:100%}
.btn-purple{background:var(--purple);color:#fff}
.btn-purple:hover{background:var(--purple-h)}
.btn-dark{background:var(--ink);color:#fff}
.btn-dark:hover{background:#000}
.btn-light{background:var(--bg);color:var(--text)}
.btn-light:hover{background:var(--bg-2)}
.btn-outline{background:#fff;color:var(--text);box-shadow:inset 0 0 0 1px var(--line-2)}
.btn-outline:hover{background:var(--bg)}
.btn-danger{background:#fdecea;color:var(--red)}
.btn-danger:hover{background:#fadbd7}
.btn-sm{height:36px;padding:0 14px;font-size:13px}
.btn-block{width:100%}

/* =========================================================
   LOGIN
   ========================================================= */
.login{position:fixed;inset:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);background:#fff;z-index:10}
.login-left{display:flex;flex-direction:column;padding:32px 40px;overflow:auto}
.login-logo{display:inline-flex;align-items:center;gap:10px;font-weight:800;font-size:20px;letter-spacing:-.02em;text-decoration:none;color:var(--ink)}
.login-form{width:100%;max-width:400px;margin:auto;padding:40px 0;display:flex;flex-direction:column;gap:12px}
.login-form h1{font-size:40px;line-height:1.05;letter-spacing:-.035em;font-weight:800;margin:0;text-align:center}
.login-sub{text-align:center;color:var(--muted);margin:0 0 20px;font-size:16px}
.field{position:relative;display:block}
.field input{width:100%;height:52px;border-radius:10px;border:0;background:var(--bg);padding:0 16px;font-size:16px;outline:none;box-shadow:inset 0 0 0 1px transparent;transition:box-shadow .15s,background .15s}
.field input:hover{box-shadow:inset 0 0 0 1px var(--line-2)}
.field input:focus{background:#fff;box-shadow:inset 0 0 0 2px var(--ink)}
.field.pw input{padding-right:52px}
.pw-eye{position:absolute;right:6px;top:6px;width:40px;height:40px;border:0;background:transparent;border-radius:8px;color:var(--muted);display:grid;place-items:center}
.pw-eye:hover{background:var(--bg-2)}
.login-error{min-height:20px;color:var(--red);font-size:13px;font-weight:500;text-align:center}
.login-foot{text-align:center;color:var(--muted-2);font-size:12px;margin:8px 0 0}
.login-right{background:linear-gradient(160deg,#d2e823 0%,#43e660 40%,#2665d6 100%);display:grid;place-items:center;overflow:hidden;position:relative}
.login-art{position:relative}
.art-phone{width:270px;height:540px;border-radius:40px;background:linear-gradient(180deg,#fff6e8,#ffd6e7);box-shadow:0 40px 80px rgba(0,0,0,.25);padding:48px 22px;display:flex;flex-direction:column;align-items:center;gap:12px;transform:rotate(-5deg)}
.art-avatar{width:76px;height:76px;border-radius:50%;background:linear-gradient(135deg,#ffb88c,#de6262);margin-bottom:6px}
.art-line{height:12px;border-radius:6px;background:var(--ink)}
.art-line.w60{width:60%}.art-line.w40{width:40%}.art-line.dim{opacity:.25;margin-bottom:14px}
.art-btn{width:100%;height:46px;border-radius:999px;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.art-card{width:100%;height:120px;border-radius:22px;background:linear-gradient(135deg,#8129d9,#2665d6)}
.art-chip{position:absolute;background:#fff;color:var(--ink);font-weight:700;padding:12px 16px;border-radius:999px;box-shadow:0 12px 30px rgba(0,0,0,.18);font-size:14px;white-space:nowrap}
.art-chip.c1{left:-90px;top:120px;transform:rotate(-4deg)}
.art-chip.c2{right:-80px;bottom:110px;transform:rotate(5deg)}

/* =========================================================
   APP — estrutura (igual ao layout do painel de referência)
   ========================================================= */
.app{min-height:100vh;display:flex;flex-direction:column}
.banner{height:44px;flex:none;display:flex;align-items:center;justify-content:center;gap:12px;padding:0 64px;color:#fff;position:relative;font-size:13.5px}
.banner-logo{position:absolute;left:14px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:32px;height:32px}
.banner-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.95}
.banner-text b{font-weight:700}
.banner-pill{display:inline-flex;align-items:center;gap:6px;border:1.5px solid var(--green);color:#fff;text-decoration:none;font-weight:600;border-radius:999px;padding:5px 12px;white-space:nowrap;font-size:13px;transition:background .15s}
.banner-pill svg{color:var(--green)}
.banner-pill:hover{background:rgba(67,230,96,.12)}

.shell{flex:1;background:#fff;border-radius:24px 24px 0 0;position:relative;display:flex;flex-direction:column;min-height:0}
.topbar{height:72px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 12px;position:sticky;top:0;z-index:20;background:#fff;border-radius:24px 24px 0 0}
.circle-btn{width:40px;height:40px;border-radius:50%;border:0;background:var(--bg);display:grid;place-items:center;transition:background .15s}
.circle-btn:hover{background:var(--bg-2)}
.switcher{position:relative}
.switcher-btn{display:flex;align-items:center;gap:10px;height:40px;padding:0 14px 0 6px;border-radius:999px;border:0;background:var(--bg);font-weight:600;font-size:14px;max-width:300px;transition:background .15s}
.switcher-btn:hover{background:var(--bg-2)}
.sw-avatar{width:28px;height:28px;border-radius:50%;background:#d9d9d4 center/cover;display:grid;place-items:center;font-size:12px;font-weight:700;color:#555;overflow:hidden;flex:none}
.sw-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.share{position:relative}
.pill-btn{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px;border-radius:999px;border:0;background:var(--bg);font-weight:600;font-size:14px;transition:background .15s}
.pill-btn:hover{background:var(--bg-2)}

/* Barra lateral */
.rail{position:fixed;left:0;top:calc(44px + 72px);bottom:0;width:var(--rail);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;z-index:15;padding:12px 0 80px}
.rail-item{display:flex;flex-direction:column;align-items:center;gap:6px;border:0;background:transparent;padding:4px 0;width:100%;color:var(--text);text-decoration:none}
.rail-ico{width:40px;height:40px;border-radius:50%;background:var(--bg);display:grid;place-items:center;transition:background .15s,box-shadow .15s}
.rail-item:hover .rail-ico{background:var(--bg-2)}
.rail-item span.lbl{font-size:10.5px;font-weight:500;line-height:1}
.rail-item.active .rail-ico{background:#000;color:#fff;box-shadow:0 0 0 2px #fff,0 0 0 4px #000}
.rail-item.active span.lbl{font-weight:700}
.rail-bottom{position:absolute;bottom:20px;left:0;right:0;display:flex;justify-content:center}

/* Área de trabalho */
.workspace{flex:1;display:grid;grid-template-columns:minmax(0,690px) minmax(360px,1fr);gap:24px;padding:16px 24px 40px calc(var(--rail) + 0px);align-items:start}
.card{background:#fff;border-radius:24px;box-shadow:var(--shadow-card);min-height:calc(100vh - 44px - 72px - 40px);overflow:hidden;animation:fadeIn .2s ease}
@keyframes fadeIn{from{opacity:.4;transform:translateY(4px)}to{opacity:1;transform:none}}
.card-head{display:flex;align-items:center;gap:12px;height:72px;margin:0 24px;padding:0 max(0px, calc((100% - 468px) / 2 - 24px));border-bottom:1px solid #eeeee9}
.card-head.with-back{padding-left:max(0px, calc((100% - 468px) / 2 - 64px))}
.card-head h1{font-size:20px;font-weight:700;letter-spacing:-.01em;margin:0;flex:1}
.back-btn{width:36px;height:36px;border-radius:50%;border:0;background:transparent;display:grid;place-items:center;margin-right:4px}
.back-btn:hover{background:var(--bg)}
.card-body{max-width:500px;margin:0 auto;padding:24px 16px 48px}
.card-body.wide{max-width:600px}

.section-title{font-size:14px;font-weight:600;margin:24px 6px 10px}
.section-title:first-child{margin-top:0}
.muted{color:var(--muted)}
.small{font-size:12.5px}
.hint{font-size:12.5px;color:var(--muted);line-height:1.5;margin:8px 6px 0}

/* Linhas estilo "Tema / Plano de fundo / Botões" */
.rows{display:flex;flex-direction:column;gap:12px}
.row{display:flex;align-items:center;gap:14px;min-height:60px;padding:10px 14px 10px 12px;background:#fff;border-radius:var(--radius);box-shadow:var(--shadow-row);border:0;width:100%;text-align:left;transition:box-shadow .15s,transform .1s}
button.row:hover{box-shadow:0 0 0 1px rgba(0,0,0,.08),0 4px 14px rgba(0,0,0,.07)}
button.row:active{transform:scale(.995)}
.row-ico{width:40px;height:40px;border-radius:10px;background:#fff;box-shadow:0 0 0 1px #ececE7;display:grid;place-items:center;flex:none;overflow:hidden;position:relative;font-size:15px;font-weight:600}
.row-ico.gray{background:var(--bg);box-shadow:none}
.row-label{flex:1;font-weight:500;font-size:14px;min-width:0}
.row-label small{display:block;font-weight:400;color:var(--muted);font-size:12.5px;margin-top:2px}
.row-value{color:var(--muted);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px}
.row-chev{color:var(--muted);flex:none}
.ico-theme{font-size:11px;font-weight:600;position:absolute;left:7px;top:5px}
.ico-theme-q{position:absolute;right:5px;bottom:5px;width:16px;height:16px;border-radius:8px 0 6px 0;background:#c8c8c4}
.ico-colors{display:flex;width:22px;height:26px;border-radius:5px;overflow:hidden;box-shadow:0 0 0 1px #d9d9d4}
.ico-colors i{flex:1}

/* Campos */
.input,.textarea,.select{width:100%;border:0;background:var(--bg);border-radius:10px;padding:0 14px;height:48px;outline:none;font-size:14px;box-shadow:inset 0 0 0 1px transparent;transition:box-shadow .15s,background .15s}
.textarea{padding:12px 14px;height:auto;min-height:96px;resize:vertical;line-height:1.45}
.input:hover,.textarea:hover,.select:hover{box-shadow:inset 0 0 0 1px var(--line-2)}
.input:focus,.textarea:focus,.select:focus{background:#fff;box-shadow:inset 0 0 0 2px var(--ink)}
.select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='18' height='18'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23676b5f' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:40px}
.label{display:block;font-size:13px;font-weight:600;margin:0 4px 6px}
.form-grid{display:flex;flex-direction:column;gap:14px}
.counter{display:block;text-align:right;font-size:12px;color:var(--muted-2);margin-top:4px}
.prefix-input{display:flex;align-items:center;background:var(--bg);border-radius:10px;padding-left:14px;box-shadow:inset 0 0 0 1px transparent;transition:box-shadow .15s,background .15s}
.prefix-input:focus-within{background:#fff;box-shadow:inset 0 0 0 2px var(--ink)}
.prefix-input span{color:var(--muted);white-space:nowrap}
.prefix-input input{flex:1;border:0;background:transparent;height:48px;outline:none;padding:0 14px 0 1px;min-width:40px}

/* Switch (toggle verde) */
.switch{position:relative;display:inline-block;width:40px;height:24px;flex:none}
.switch input{opacity:0;width:0;height:0;position:absolute}
.switch span{position:absolute;inset:0;background:#cfd0ca;border-radius:999px;transition:background .2s;cursor:pointer}
.switch span::after{content:"";position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s}
.switch input:checked+span{background:var(--green-d)}
.switch input:checked+span::after{transform:translateX(16px)}
.switch input:focus-visible+span{outline:2px solid var(--ink);outline-offset:2px}

/* Tiles de opção (estilo de botão, fundo, etc.) */
.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.tiles.cols-2{grid-template-columns:repeat(2,1fr)}
.tiles.cols-4{grid-template-columns:repeat(4,1fr)}
.tile{display:flex;flex-direction:column;align-items:center;gap:8px;padding:10px 8px 10px;border-radius:14px;border:0;background:#fff;box-shadow:0 0 0 1px var(--line);font-size:12.5px;font-weight:500;transition:box-shadow .15s}
.tile:hover{box-shadow:0 0 0 1px var(--line-2),0 2px 8px rgba(0,0,0,.06)}
.tile.active{box-shadow:0 0 0 2px var(--ink)}
.tile-prev{width:100%;height:56px;border-radius:10px;background:var(--bg);display:grid;place-items:center;overflow:hidden}
.tile-btn{width:70%;height:18px;background:#c9c9c4}
.tile-btn.outline{background:transparent;border:2px solid #9a9a95}
.tile-btn.soft{background:#fff;box-shadow:0 3px 8px rgba(0,0,0,.18)}
.tile-btn.hard{background:#fff;border:2px solid #111;box-shadow:3px 3px 0 #111}
.tile-btn.glass{background:rgba(255,255,255,.35);border:1px solid rgba(255,255,255,.7)}
.tile-prev.dark{background:linear-gradient(135deg,#8ec5fc,#e0c3fc)}

/* Temas */
.themes{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.theme{border:0;background:transparent;padding:0;display:flex;flex-direction:column;align-items:center;gap:8px;font-size:12.5px;font-weight:500}
.theme-prev{width:100%;aspect-ratio:9/15;border-radius:16px;padding:18% 12%;display:flex;flex-direction:column;align-items:center;gap:7%;box-shadow:0 0 0 1px var(--line);transition:box-shadow .15s,transform .15s;overflow:hidden}
.theme:hover .theme-prev{transform:translateY(-2px)}
.theme.active .theme-prev{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--ink)}
.theme-prev .tp-av{width:28%;aspect-ratio:1;border-radius:50%;background:currentColor;opacity:.25}
.theme-prev .tp-tx{width:50%;height:5px;border-radius:3px;background:currentColor;opacity:.55;margin-bottom:6%}
.theme-prev .tp-bt{width:100%;height:13%;flex:none}

/* Cores */
.color-field{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:14px;background:#fff;box-shadow:var(--shadow-row)}
.color-field .cf-label{font-weight:500}
.cf-input{display:flex;align-items:center;gap:8px;background:var(--bg);border-radius:10px;padding:4px 4px 4px 4px}
.swatch{position:relative;width:34px;height:34px;border-radius:8px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12);overflow:hidden;flex:none}
.swatch input[type=color]{position:absolute;inset:-10px;width:60px;height:60px;border:0;padding:0;cursor:pointer;opacity:0}
.hex{width:86px;border:0;background:transparent;outline:none;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;text-transform:uppercase;height:34px}
.presets{display:flex;flex-wrap:wrap;gap:8px;margin:8px 4px 0}
.preset{width:26px;height:26px;border-radius:50%;border:0;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
.preset:hover{transform:scale(1.1)}

/* Fontes */
.fonts{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.font-opt{display:flex;align-items:center;gap:12px;padding:12px;border:0;border-radius:14px;background:#fff;box-shadow:0 0 0 1px var(--line);text-align:left}
.font-opt .aa{width:40px;height:40px;border-radius:10px;background:var(--bg);display:grid;place-items:center;font-size:18px;flex:none}
.font-opt.active{box-shadow:0 0 0 2px var(--ink)}
.font-opt span.fn{font-size:13px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Figurinhas */
.sticker-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:8px}
.sticker-opt{aspect-ratio:1;border:0;border-radius:12px;background:var(--bg);font-size:24px;display:grid;place-items:center;transition:transform .1s,box-shadow .15s}
.sticker-opt:hover{transform:scale(1.08)}
.sticker-opt.active{background:#fff;box-shadow:0 0 0 2px var(--ink)}

/* =========================================================
   CONTEÚDO (links)
   ========================================================= */
.add-btn{width:100%;height:48px;border-radius:999px;border:0;background:var(--purple);color:#fff;font-weight:600;font-size:15px;display:flex;align-items:center;justify-content:center;gap:8px;transition:background .15s}
.add-btn:hover{background:var(--purple-h)}
.add-form{background:#fff;border-radius:20px;box-shadow:var(--shadow-row);padding:16px;display:flex;flex-direction:column;gap:10px;animation:fadeIn .2s}
.add-form .af-head{display:flex;justify-content:space-between;align-items:center;font-weight:700;font-size:15px}
.add-form .af-actions{display:flex;gap:8px;justify-content:flex-end}
.quick-add{display:flex;flex-wrap:wrap;gap:6px}
.quick-add button{display:inline-flex;align-items:center;gap:6px;border:0;background:var(--bg);border-radius:999px;padding:6px 10px;font-size:12.5px;font-weight:500}
.quick-add button:hover{background:var(--bg-2)}

.link-list{display:flex;flex-direction:column;gap:14px;margin-top:20px}
.lc{display:flex;align-items:stretch;background:#fff;border-radius:24px;box-shadow:var(--shadow-row);transition:box-shadow .15s,opacity .15s;position:relative}
.lc-wrap.dragging{opacity:.5;box-shadow:0 0 0 2px var(--purple)}
.lc.disabled .lc-main{opacity:.55}
.lc-handle{width:36px;display:grid;place-items:center;color:var(--muted-2);cursor:grab;border-radius:24px 0 0 24px;flex:none}
.lc-handle:hover{background:var(--bg)}
.lc-handle:active{cursor:grabbing}
.lc-main{flex:1;min-width:0;padding:14px 8px 10px 4px;display:flex;flex-direction:column;gap:2px}
.lc-line{display:flex;align-items:center;gap:6px;min-width:0}
.lc-title,.lc-url{border:0;background:transparent;outline:none;padding:3px 6px;border-radius:6px;min-width:0;flex:1;width:100%}
.lc-title{font-weight:600;font-size:15px}
.lc-url{font-size:13.5px;color:#333}
.lc-title:focus,.lc-url:focus{background:var(--bg)}
.lc-title::placeholder{color:var(--muted-2);font-weight:500}
.lc-tools{display:flex;align-items:center;gap:2px;margin-top:6px;flex-wrap:wrap}
.lc-tool{width:32px;height:32px;border-radius:8px;border:0;background:transparent;display:grid;place-items:center;color:#3f4339;position:relative}
.lc-tool:hover{background:var(--bg)}
.lc-tool.on{color:var(--purple);background:#f3eafd}
.lc-tool.bolt.on{color:#b26b00;background:#fff4dc}
.lc-clicks{font-size:12.5px;color:var(--muted);margin-left:6px;display:flex;align-items:center;gap:4px}
.lc-side{display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:16px 16px 12px 8px;gap:8px}
.lc-del{width:32px;height:32px;border-radius:8px;border:0;background:transparent;color:#3f4339;display:grid;place-items:center}
.lc-del:hover{background:#fdecea;color:var(--red)}
.lc-panel{border-top:1px solid #eeeee9;padding:14px 16px 16px;margin:0 0 0 0;display:flex;flex-direction:column;gap:12px;animation:fadeIn .15s}
.lc-wrap{background:#fff;border-radius:24px;box-shadow:var(--shadow-row);overflow:hidden}
.lc-wrap .lc{box-shadow:none;border-radius:0}
.thumb-row{display:flex;align-items:center;gap:12px}
.thumb-box{width:56px;height:56px;border-radius:12px;background:var(--bg) center/cover;flex:none;display:grid;place-items:center;color:var(--muted-2)}
.badge{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:700;padding:3px 8px;border-radius:999px;background:#fff4dc;color:#8a5300}
.empty-state{text-align:center;padding:40px 20px;color:var(--muted)}
.empty-state .big{font-size:44px;margin-bottom:8px}
.move-btns{display:none;gap:2px}

/* Cabeçalho */
.avatar-edit{display:flex;align-items:center;gap:18px;padding:16px;border-radius:20px;background:#fff;box-shadow:var(--shadow-row)}
.avatar-big{width:88px;height:88px;border-radius:50%;background:var(--bg) center/cover;display:grid;place-items:center;font-size:32px;font-weight:700;color:#999;flex:none}
.avatar-actions{display:flex;flex-direction:column;gap:8px;flex:1}
.social-list{display:flex;flex-direction:column;gap:10px}
.social-row{display:flex;align-items:center;gap:10px;padding:8px 8px 8px 12px;background:#fff;border-radius:14px;box-shadow:var(--shadow-row)}
.social-row .s-ico{width:36px;height:36px;border-radius:10px;background:var(--bg);display:grid;place-items:center;flex:none}
.social-row .input{height:40px;background:transparent}
.social-row .input:focus{background:var(--bg);box-shadow:none}
.social-row .s-ok{width:8px;height:8px;border-radius:50%;background:var(--green-d);flex:none}
.social-row .s-ok.bad{background:#e0b12b}
.icon-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.icon-opt{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 4px;border:0;border-radius:12px;background:var(--bg);font-size:11.5px;font-weight:500}
.icon-opt:hover{background:var(--bg-2)}
.icon-opt:disabled{opacity:.35;cursor:default}

/* Redirecionamento */
.redirect-hero{display:flex;gap:14px;align-items:flex-start;padding:16px;border-radius:20px;background:linear-gradient(135deg,#fff8e6,#f3eafd);margin-bottom:8px}
.redirect-hero .rh-ico{width:44px;height:44px;border-radius:12px;background:#fff;display:grid;place-items:center;flex:none;box-shadow:0 2px 6px rgba(0,0,0,.06)}
.redirect-hero p{margin:4px 0 0;color:#4a4e44;line-height:1.5;font-size:13px}
.radio-list{display:flex;flex-direction:column;gap:10px}
.radio-card{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:16px;background:#fff;box-shadow:var(--shadow-row);cursor:pointer;border:0;text-align:left;width:100%}
.radio-card .rc-dot{width:20px;height:20px;border-radius:50%;box-shadow:inset 0 0 0 2px var(--line-2);flex:none;display:grid;place-items:center}
.radio-card.active{box-shadow:0 0 0 2px var(--ink)}
.radio-card.active .rc-dot{box-shadow:inset 0 0 0 2px var(--ink)}
.radio-card.active .rc-dot::after{content:"";width:10px;height:10px;border-radius:50%;background:var(--ink)}
.radio-card .rc-ico{width:36px;height:36px;border-radius:10px;background:var(--bg);display:grid;place-items:center;flex:none;overflow:hidden}
.radio-card .rc-ico img{width:100%;height:100%;object-fit:cover}
.radio-card .rc-text{flex:1;min-width:0}
.radio-card .rc-text b{display:block;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.radio-card .rc-text small{display:block;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12.5px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{height:36px;padding:0 14px;border-radius:999px;border:0;background:var(--bg);font-weight:600;font-size:13px}
.chip:hover{background:var(--bg-2)}
.chip.active{background:var(--ink);color:#fff}
.range{width:100%;accent-color:var(--ink);margin:14px 0 4px}
.range-val{display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}
.mock-redirect{margin-top:8px;border-radius:20px;background:var(--bg);padding:18px;display:flex;justify-content:center}
.mock-card{width:100%;max-width:360px;background:#fff;border-radius:20px;padding:12px;box-shadow:0 8px 24px rgba(0,0,0,.12);display:grid;grid-template-columns:48px 1fr;gap:10px 12px;align-items:center}
.mock-ring{width:48px;height:48px;border-radius:50%;box-shadow:inset 0 0 0 4px var(--ink);display:grid;place-items:center;font-weight:800;font-size:16px}
.mock-card small{display:block;color:var(--muted);font-size:11.5px}
.mock-card b{font-size:14px}
.mock-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.mock-actions span{height:36px;border-radius:999px;display:grid;place-items:center;font-weight:600;font-size:12.5px;background:var(--bg)}
.mock-actions span.dark{background:var(--ink);color:#fff}
.status-pill{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;padding:4px 10px;border-radius:999px}
.status-pill.on{background:#e3f9e7;color:#16772a}
.status-pill.off{background:var(--bg);color:var(--muted)}
.status-pill i{width:7px;height:7px;border-radius:50%;background:currentColor}

/* Estatísticas */
.kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.kpi{background:#fff;border-radius:18px;box-shadow:var(--shadow-row);padding:14px 16px}
.kpi small{display:block;color:var(--muted);font-size:12.5px;font-weight:500}
.kpi b{display:block;font-size:26px;letter-spacing:-.02em;margin-top:4px}
.chart{background:#fff;border-radius:18px;box-shadow:var(--shadow-row);padding:16px 14px 10px;margin-top:12px}
.chart-legend{display:flex;gap:14px;font-size:12px;color:var(--muted);margin:0 2px 10px}
.chart-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px}
.bars{display:flex;align-items:flex-end;gap:3px;height:160px;border-bottom:1px solid #eeeee9}
.bar{flex:1;display:flex;align-items:flex-end;justify-content:center;gap:1px;height:100%;position:relative}
.bar i{display:block;width:45%;max-width:14px;border-radius:4px 4px 0 0;min-height:2px}
.bar i.v{background:#cdb8f2}
.bar i.c{background:var(--purple)}
.bar:hover::after{content:attr(data-tip);position:absolute;bottom:100%;left:50%;transform:translateX(-50%);background:var(--ink);color:#fff;font-size:11px;padding:5px 8px;border-radius:6px;white-space:pre;z-index:2;margin-bottom:6px;line-height:1.4}
.bar-labels{display:flex;gap:3px;margin-top:6px}
.bar-labels span{flex:1;text-align:center;font-size:10px;color:var(--muted-2);overflow:hidden;white-space:nowrap}
.table{width:100%;border-collapse:collapse;background:#fff;border-radius:18px;box-shadow:var(--shadow-row);overflow:hidden}
.table th,.table td{padding:12px 14px;text-align:left;font-size:13px;border-bottom:1px solid #f0f0ec}
.table th{font-size:12px;color:var(--muted);font-weight:600;background:#fafaf8}
.table td.num,.table th.num{text-align:right;font-variant-numeric:tabular-nums}
.table tr:last-child td{border-bottom:0}
.table .t-title{font-weight:600;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.table .t-url{color:var(--muted);font-size:12px;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Usuários */
.users{display:flex;flex-direction:column;gap:12px}
.user-card{display:flex;align-items:center;gap:14px;padding:14px;background:#fff;border-radius:20px;box-shadow:var(--shadow-row)}
.user-card.current{box-shadow:0 0 0 2px var(--ink)}
.uc-av{width:48px;height:48px;border-radius:50%;background:var(--bg) center/cover;display:grid;place-items:center;font-weight:700;color:#888;flex:none;font-size:18px}
.uc-info{flex:1;min-width:0}
.uc-info b{display:flex;align-items:center;gap:6px;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.uc-info a{color:var(--muted);font-size:13px;text-decoration:none}
.uc-info a:hover{text-decoration:underline}
.uc-meta{display:flex;gap:12px;font-size:12px;color:var(--muted);margin-top:4px;flex-wrap:wrap}
.uc-actions{display:flex;gap:6px;flex:none}
.icon-btn{width:36px;height:36px;border-radius:10px;border:0;background:var(--bg);display:grid;place-items:center;color:#2f332b;text-decoration:none}
.icon-btn:hover{background:var(--bg-2)}
.icon-btn.danger:hover{background:#fdecea;color:var(--red)}
.tag{font-size:10.5px;font-weight:700;padding:2px 7px;border-radius:999px;background:var(--bg);color:var(--muted)}
.tag.home{background:#e3f9e7;color:#16772a}
.tag.off{background:#fdecea;color:var(--red)}

/* =========================================================
   Prévia (celular)
   ========================================================= */
.preview{position:sticky;top:calc(72px + 8px);display:flex;justify-content:center;padding-top:36px}
.preview-inner{position:relative;display:flex;align-items:center;gap:18px}
.phone{width:232px;height:480px;border-radius:30px;background:#fff;box-shadow:0 0 0 1px #e3e3de,0 18px 40px rgba(0,0,0,.10);overflow:hidden;position:relative}
.phone iframe{position:absolute;left:0;top:0;width:390px;height:807px;border:0;transform:scale(.5949);transform-origin:0 0;background:#fff}
.preview-tools{display:flex;flex-direction:column;gap:2px;background:var(--bg);border-radius:999px;padding:6px 4px}
.tool{width:36px;height:36px;border-radius:50%;border:0;background:transparent;display:grid;place-items:center;color:#111}
.tool:hover{background:#fff}
.mobile-preview-btn{display:none}

/* FAB (botão de dicas) */
.fab{position:fixed;right:24px;bottom:24px;width:48px;height:48px;border-radius:50%;border:0;background:radial-gradient(circle at 30% 30%,#f067ff,#c21fd6 60%,#9a10c9);box-shadow:0 8px 24px rgba(194,31,214,.45);display:grid;place-items:center;z-index:40;transition:transform .15s}
.fab:hover{transform:scale(1.06) rotate(-6deg)}

/* Popovers */
.popover{position:absolute;background:#fff;border-radius:18px;box-shadow:0 0 0 1px rgba(0,0,0,.06),0 16px 48px rgba(0,0,0,.16);padding:8px;z-index:50;min-width:260px;animation:pop .15s ease}
@keyframes pop{from{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:none}}
.switcher-pop{top:48px;left:50%;transform:translateX(-50%);width:320px;max-height:70vh;overflow:auto}
@keyframes popc{from{opacity:0}to{opacity:1}}
.switcher-pop{animation:popc .15s}
.share-pop{top:48px;right:0;width:340px;padding:16px}
.fab-pop{position:fixed;right:24px;bottom:84px;width:320px;padding:16px}
.menu-pop{position:fixed;left:12px;top:calc(44px + 64px);width:240px}
.pop-item{display:flex;align-items:center;gap:12px;width:100%;padding:10px;border:0;background:transparent;border-radius:12px;text-align:left;text-decoration:none;color:inherit;font-weight:500}
.pop-item:hover{background:var(--bg)}
.pop-item .sw-avatar{width:36px;height:36px}
.pop-item .pi-text{flex:1;min-width:0}
.pop-item .pi-text b{display:block;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pop-item .pi-text small{display:block;color:var(--muted);font-size:12px}
.pop-sep{height:1px;background:#eeeee9;margin:6px 4px}
.pop-title{font-weight:700;font-size:15px;margin:0 0 12px}
.copy-row{display:flex;gap:8px;align-items:center;background:var(--bg);border-radius:12px;padding:6px 6px 6px 12px}
.copy-row input{flex:1;border:0;background:transparent;outline:none;font-size:13px;min-width:0}
.share-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.tips{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px}
.tips li{display:flex;gap:10px;font-size:13px;line-height:1.45;color:#33372f}
.tips li b{display:block;color:#000}

/* Modal */
.modal-bg{position:fixed;inset:0;background:rgba(17,20,28,.45);backdrop-filter:blur(2px);display:grid;place-items:center;z-index:100;padding:16px;animation:popc .15s}
.modal{background:#fff;border-radius:24px;width:100%;max-width:440px;max-height:90vh;overflow:auto;box-shadow:0 30px 80px rgba(0,0,0,.3);animation:pop .2s}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:20px 20px 4px}
.modal-head h2{margin:0;font-size:18px;font-weight:700}
.modal-body{padding:12px 20px 4px}
.modal-foot{display:flex;gap:8px;justify-content:flex-end;padding:16px 20px 20px}
.modal-error{color:var(--red);font-size:13px;font-weight:500;min-height:18px;margin-top:8px}

/* Toast */
.toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,30px);background:var(--ink);color:#fff;padding:12px 18px;border-radius:999px;font-weight:600;font-size:13.5px;opacity:0;pointer-events:none;transition:.25s;z-index:200;display:flex;align-items:center;gap:8px;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast.err{background:var(--red)}

/* Indicador de salvamento */
.save-state{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px;white-space:nowrap}
.save-state i{width:7px;height:7px;border-radius:50%;background:var(--green-d)}
.save-state.saving i{background:#e0b12b;animation:blink .8s infinite}
@keyframes blink{50%{opacity:.3}}

.spinner{width:20px;height:20px;border-radius:50%;border:2.5px solid rgba(0,0,0,.12);border-top-color:var(--ink);animation:spin .7s linear infinite;margin:40px auto}
@keyframes spin{to{transform:rotate(360deg)}}

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width:1180px){
  .workspace{grid-template-columns:minmax(0,1fr);padding-right:16px}
  .preview{display:none}
  .preview.open{display:flex;position:fixed;inset:0;top:0;background:rgba(17,20,28,.6);backdrop-filter:blur(4px);z-index:90;align-items:center;justify-content:center;padding:0}
  .preview.open .phone{width:300px;height:620px}
  .preview.open .phone iframe{transform:scale(.7692);height:806px}
  .mobile-preview-btn{display:flex;align-items:center;gap:8px;position:fixed;left:50%;bottom:24px;transform:translateX(-50%);height:44px;padding:0 18px;border-radius:999px;border:0;background:var(--ink);color:#fff;font-weight:600;z-index:95;box-shadow:0 10px 30px rgba(0,0,0,.25)}
}
@media (max-width:760px){
  :root{--rail:0px}
  .banner{padding:0 12px 0 52px;font-size:12px}
  .banner-text{display:none}
  .banner{justify-content:flex-end}
  .rail{top:auto;bottom:0;left:0;right:0;height:68px;width:auto;flex-direction:row;justify-content:space-around;background:#fff;border-top:1px solid #eeeee9;padding:6px 4px calc(6px + env(safe-area-inset-bottom));gap:0}
  .rail-item{width:auto;flex:1;min-width:0}
  .rail-item span.lbl{font-size:9px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 1px}
  .rail-ico{width:34px;height:34px}
  .rail-item.active .rail-ico{box-shadow:0 0 0 2px #fff,0 0 0 3px #000}
  .rail-bottom{position:static;flex:1}
  .workspace{padding:0 10px 110px}
  .card{border-radius:20px;min-height:auto}
  .card-head{margin:0 16px;padding:0}
  .card-head.with-back{padding:0}
  .card-body{padding:18px 6px 40px}
  .switcher-btn{max-width:180px}
  .pill-btn span{display:none}
  .pill-btn{width:40px;padding:0;justify-content:center}
  .fab{bottom:84px;right:14px;width:44px;height:44px}
  .fab-pop{right:12px;left:12px;width:auto;bottom:136px}
  .mobile-preview-btn{bottom:84px}
  .share-pop{position:fixed;left:12px;right:12px;top:120px;width:auto}
  .switcher-pop{position:fixed;left:12px;right:12px;top:120px;transform:none;width:auto}
  .login{grid-template-columns:1fr}
  .login-right{display:none}
  .login-left{padding:24px}
  .login-form h1{font-size:32px}
  .kpis{grid-template-columns:1fr 1fr 1fr}
  .kpi b{font-size:20px}
  .themes{grid-template-columns:repeat(3,1fr);gap:10px}
  .icon-grid{grid-template-columns:repeat(4,1fr)}
  .sticker-grid{grid-template-columns:repeat(6,1fr)}
  .move-btns{display:flex}
  .uc-actions{flex-wrap:wrap;justify-content:flex-end;max-width:84px}
  .row-value{max-width:110px}
  .fonts{grid-template-columns:1fr}
}
