
:root{font-family:Inter,system-ui,sans-serif;color:#eef2ff;background:#070b14}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 10% 0,#172554 0,transparent 30%),#070b14;color:#eef2ff}a{color:inherit;text-decoration:none}.wrap{max-width:1180px;margin:auto;padding:24px}.nav{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:16px 0}.brand{font-size:22px;font-weight:800;margin-right:auto}.btn,button{border:0;border-radius:12px;padding:11px 16px;background:#7c3aed;color:white;font-weight:700;cursor:pointer}.ghost{background:#172033}.card{background:#0f172a;border:1px solid #26334d;border-radius:18px;padding:20px;box-shadow:0 12px 35px #0005}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.metric b{font-size:30px;display:block;margin-top:8px}.muted{color:#94a3b8}.hero{padding:80px 0;display:grid;grid-template-columns:1.2fr .8fr;gap:28px;align-items:center}.hero h1{font-size:clamp(38px,6vw,72px);margin:0}.rocket{font-size:100px;text-align:center}.form{display:grid;gap:12px}input,select,textarea{width:100%;background:#0b1220;color:white;border:1px solid #334155;border-radius:11px;padding:12px}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px;border-bottom:1px solid #26334d}.notice{padding:14px;border-radius:12px;background:#123b2a;border:1px solid #1f7a50;margin-bottom:16px}.warn{background:#3b2a12;border-color:#7a5a1f}.phone{max-width:280px;margin:auto;border:8px solid #111827;border-radius:34px;padding:18px;min-height:520px}.pill{display:inline-block;padding:5px 9px;border-radius:999px;background:#172033;font-size:12px}.login{max-width:440px;margin:8vh auto}.split{display:grid;grid-template-columns:1fr 1fr;gap:16px}@media(max-width:760px){.hero,.split{grid-template-columns:1fr}.wrap{padding:16px}.nav a:not(.brand){font-size:13px}table{display:block;overflow:auto}}

.shell{max-width:none;padding:0}.sidebar{position:fixed;left:0;top:0;bottom:0;width:250px;background:#0b1220;border-right:1px solid #25324a;padding:18px 12px;z-index:40;transition:.25s ease;display:flex;flex-direction:column;gap:6px}.sidebar a,.side-logout{display:flex;gap:12px;align-items:center;padding:12px 14px;border-radius:12px;color:#cbd5e1;background:transparent;width:100%;text-align:left}.sidebar a:hover,.sidebar a:focus{background:#172033;color:#fff;transform:translateX(3px)}.side-brand{font-weight:900;font-size:20px;padding:10px 12px 18px}.collapse-btn{position:absolute;right:-16px;top:20px;width:32px;height:32px;border-radius:50%;padding:0}.app-main{margin-left:250px;padding:28px;min-height:100vh;transition:.25s ease}.sidebar.compact{width:78px}.sidebar.compact span{display:none}.sidebar.compact+.side-overlay+.app-main{margin-left:78px}.mobile-menu{display:none;position:fixed;top:14px;left:14px;z-index:60;width:44px;height:44px;padding:0}.side-overlay{display:none}.page-head{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:16px}.toolbar{display:flex;gap:8px;margin:8px 0 18px}.legacy-list{max-width:980px;display:grid;gap:8px}.legacy-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#111a2b;border:1px solid #26344e;border-radius:14px;padding:13px 14px;box-shadow:0 8px 25px #0003}.row-main{display:flex;flex-direction:column;gap:4px;min-width:0}.row-main b,.row-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.row-main small{color:#94a3b8}.row-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.row-actions form{margin:0}.row-actions button{padding:8px 10px;font-size:13px}.icon-btn{background:#1e293b}.danger{background:#7f1d1d}.modal{display:none;position:fixed;inset:0;background:#000b;z-index:100;align-items:center;justify-content:center;padding:18px}.modal.show{display:flex;animation:fade .15s ease}.modal-card{width:min(720px,100%);max-height:90vh;overflow:auto;background:#0f172a;border:1px solid #334155;border-radius:20px;padding:22px;position:relative;animation:rise .18s ease}.small-modal{max-width:430px}.modal-x{position:absolute;right:12px;top:10px;background:#1e293b}.empty{padding:35px;text-align:center;color:#94a3b8;border:1px dashed #334155;border-radius:14px}@keyframes fade{from{opacity:0}to{opacity:1}}@keyframes rise{from{transform:translateY(12px);opacity:.6}to{transform:none;opacity:1}}@media(max-width:820px){.mobile-menu{display:block}.sidebar{transform:translateX(-105%);width:270px}.sidebar.open{transform:translateX(0)}.sidebar.open~.side-overlay{display:block;position:fixed;inset:0;background:#0009;z-index:35}.app-main,.sidebar.compact+.side-overlay+.app-main{margin-left:0;padding:76px 14px 24px}.collapse-btn{display:none}.page-head{align-items:flex-start}.legacy-row{align-items:flex-start;flex-direction:column}.row-actions{width:100%}.row-actions button{flex:1}.row-actions form{flex:1}.row-actions form button{width:100%}}
.server-form label{display:grid;gap:7px;color:#cbd5e1;font-size:13px;font-weight:650}
.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.mode-help{max-width:980px;display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:0 0 18px}
.mode-help span{padding:10px 12px;border:1px solid #26344e;background:#0e1728;border-radius:12px;color:#94a3b8;font-size:12px}
.server-title{display:flex;align-items:center;gap:9px;min-width:0}
.mode-badge{font-size:10px;font-weight:800;padding:4px 7px;border-radius:999px;white-space:nowrap;border:1px solid transparent}
.mode-0{background:#102a20;color:#6ee7b7;border-color:#1d5742}.mode-1{background:#182646;color:#93c5fd;border-color:#294b82}.mode-2{background:#34204b;color:#d8b4fe;border-color:#5f3a84}.mode-3{background:#4b241d;color:#fdba74;border-color:#85442f}
.openvpn-cert{display:none}
@media(max-width:820px){.mode-help{grid-template-columns:1fr 1fr}.field-grid{grid-template-columns:1fr}.server-title{align-items:flex-start;flex-direction:column;gap:5px}}
@media(max-width:480px){.mode-help{grid-template-columns:1fr}}

/* v6: modais abrem também sem JavaScript */
.modal:target{display:flex;animation:fade .15s ease}
.modal-x{display:flex;align-items:center;justify-content:center;width:34px;height:34px;text-decoration:none;color:#fff}
.edit-btn{padding:8px 10px;font-size:13px}
body:has(.modal:target){overflow:hidden}

.xray-fields{display:none;border:1px solid #26344e;background:#0b1424;border-radius:14px;padding:14px;gap:12px}
.xray-fields label{margin-top:9px}
.xray-title{font-weight:800;color:#a78bfa;margin-bottom:8px}
.reality-fields{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.mode-4,.mode-5,.mode-6,.mode-7,.mode-8{background:#182438;color:#67e8f9;border-color:#24576a}
@media(max-width:700px){.reality-fields{grid-template-columns:1fr}}

.head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.import-card{max-width:650px}
.connection-link-box{min-height:150px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;line-height:1.45}
.import-info{font-size:12px;color:#93c5fd;background:#0c1b32;border:1px solid #1e3a5f;border-radius:12px;padding:11px}
@media(max-width:650px){.head-actions{width:100%;justify-content:stretch}.head-actions .btn{flex:1;text-align:center}}

/* v9 importador universal */
.import-card .connection-link-box{min-height:210px}

.xray-advanced{margin-top:12px;border:1px solid #26344e;border-radius:12px;padding:10px;background:#0a1220}
.xray-advanced summary{cursor:pointer;font-weight:800;color:#93c5fd;margin-bottom:10px}
.raw-uri{min-height:100px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;word-break:break-all}

/* v13: biblioteca/importador de temas */
.sidebar a.active{background:#172033;color:#fff}
.theme-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}
.theme-card{display:flex;flex-direction:column;gap:12px}.theme-disabled{opacity:.62}
.theme-preview{min-height:390px;max-width:230px;padding:16px}.theme-logo{text-align:center;font-size:38px}.theme-preview h2{text-align:center;margin:8px 0 14px}.theme-preview-card{padding:13px;border-radius:14px;margin:12px 0 18px}.theme-preview button{width:100%}
.theme-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.theme-title h3{margin:0}.status-off{background:#4b1d1d;color:#fecaca}
.theme-actions{display:flex;gap:8px;flex-wrap:wrap}.theme-actions form{margin:0}.theme-actions button{padding:9px 11px}
.theme-json summary{cursor:pointer;color:#93c5fd}.theme-json pre{max-height:260px;overflow:auto;white-space:pre-wrap;word-break:break-word;background:#080f1c;border:1px solid #26344e;border-radius:12px;padding:12px;font-size:11px}
@media(max-width:650px){.theme-grid{grid-template-columns:1fr}.theme-actions form{flex:1}.theme-actions form button{width:100%}}

/* v16: preview real de temas HTML/WebView */
.html-pill{background:#123a30;color:#86efac;border:1px solid #205d4b}
.webview-preview{border:1px solid #26344e;background:#0a1220;border-radius:16px;padding:12px}
.webview-preview>summary{cursor:pointer;font-weight:800;color:#c4b5fd;margin-bottom:12px}
.webview-device{position:relative;width:min(100%,300px);height:590px;margin:0 auto 10px;background:#030712;border:8px solid #111827;border-radius:36px;overflow:hidden;box-shadow:0 18px 40px #0008}
.webview-notch{position:absolute;z-index:3;top:7px;left:50%;transform:translateX(-50%);width:92px;height:20px;border-radius:999px;background:#020617;pointer-events:none}
.webview-device iframe{width:100%;height:100%;border:0;background:#000;display:block}
@media(max-width:420px){.webview-device{height:540px;width:100%}}

/* v17: UI responsiva, feedback visual e modais mobile */
html{scroll-behavior:smooth}body{min-height:100vh;overflow-x:hidden}button,.btn,input,select,textarea,.card,.legacy-row,.modal-card{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease,opacity .18s ease}button:hover,.btn:hover{transform:translateY(-1px);box-shadow:0 10px 26px #0004}button:active,.btn:active{transform:translateY(0) scale(.985)}button:disabled{opacity:.62;cursor:wait;transform:none!important}.card,.legacy-row,.modal-card{position:relative;border-radius:24px 9px 24px 9px}.card:before,.modal-card:before,.legacy-row:before{content:"";position:absolute;left:-1px;top:-1px;width:34px;height:34px;border-left:2px solid #8b5cf6;border-top:2px solid #8b5cf6;border-radius:22px 0 0 0;pointer-events:none;opacity:.72}.card:after,.modal-card:after,.legacy-row:after{content:"";position:absolute;right:-1px;bottom:-1px;width:34px;height:34px;border-right:2px solid #22d3ee;border-bottom:2px solid #22d3ee;border-radius:0 0 22px 0;pointer-events:none;opacity:.55}
input:focus,select:focus,textarea:focus{outline:none;border-color:#8b5cf6;box-shadow:0 0 0 3px #7c3aed26;background:#0d1627}textarea{resize:vertical}.form button[type="submit"],.form button:not([type]){min-height:44px}

/* Alertas/toasts */
.notice{position:relative;overflow:hidden;padding:14px 16px 14px 48px;border-radius:18px 7px 18px 7px;background:linear-gradient(135deg,#0d3b2b,#102a23);border:1px solid #277a58;box-shadow:0 14px 38px #0005;animation:toastIn .32s cubic-bezier(.2,.8,.2,1)}.notice:before{content:"✓";position:absolute;left:15px;top:50%;transform:translateY(-50%);width:23px;height:23px;border-radius:50%;display:grid;place-items:center;background:#34d399;color:#052e20;font-weight:900}.notice.warn{background:linear-gradient(135deg,#4a2a12,#33210e);border-color:#a56b25}.notice.warn:before{content:"!";background:#f59e0b;color:#2b1602}.notice.error,.notice.fail{background:linear-gradient(135deg,#451b27,#2e1119);border-color:#a63a55}.notice.error:before,.notice.fail:before{content:"×";background:#fb7185;color:#3b0711}@keyframes toastIn{from{transform:translateY(-10px) scale(.98);opacity:0}to{transform:none;opacity:1}}

/* Estado global de salvamento/carregamento */
.ui-loading{position:fixed;inset:0;z-index:500;display:none;align-items:center;justify-content:center;background:#020617b8;backdrop-filter:blur(7px);padding:20px}.ui-loading.show{display:flex;animation:fade .16s ease}.ui-loading-card{min-width:min(360px,92vw);padding:22px 24px;background:#0f172a;border:1px solid #334155;border-radius:24px 8px 24px 8px;box-shadow:0 24px 70px #0009;text-align:center}.ui-spinner{width:42px;height:42px;margin:0 auto 14px;border:4px solid #334155;border-top-color:#8b5cf6;border-right-color:#22d3ee;border-radius:50%;animation:uiSpin .75s linear infinite}.ui-loading-title{font-weight:900;font-size:16px}.ui-loading-text{color:#94a3b8;font-size:13px;margin-top:5px}@keyframes uiSpin{to{transform:rotate(360deg)}}
.submit-loading{position:relative;padding-right:42px!important}.submit-loading:after{content:"";position:absolute;right:14px;top:50%;width:16px;height:16px;margin-top:-8px;border:2px solid #ffffff55;border-top-color:#fff;border-radius:50%;animation:uiSpin .65s linear infinite}

/* Modais mais fluidos e utilizáveis em telas pequenas */
.modal{overscroll-behavior:contain;backdrop-filter:blur(4px)}.modal-card{scrollbar-width:thin;scrollbar-color:#475569 transparent}.modal-card h2{padding-right:44px;margin-top:2px}.modal-x{z-index:4;box-shadow:0 7px 20px #0005}.modal.show .modal-card,.modal:target .modal-card{animation:modalPop .24s cubic-bezier(.2,.9,.25,1)}@keyframes modalPop{from{transform:translateY(18px) scale(.97);opacity:0}to{transform:none;opacity:1}}

/* Tabelas e ações */
table{min-width:640px}.card:has(table){overflow:auto}.row-actions{position:relative;z-index:1}.page-head h1{margin-bottom:4px}.page-head p{margin-top:0}

@media(max-width:820px){
  .app-main{width:100%;overflow:hidden}.page-head{flex-direction:column}.page-head>button,.page-head>.btn{width:100%}.toolbar{display:grid;grid-template-columns:1fr 1fr}.toolbar .btn,.toolbar button{text-align:center;width:100%}
  .modal{align-items:flex-end;padding:0;background:#000c}.modal-card,.small-modal{width:100%;max-width:none;max-height:92dvh;border-radius:26px 10px 0 0;padding:22px 16px calc(18px + env(safe-area-inset-bottom));border-bottom:0;animation:none}.modal-card:after{display:none}.modal-card:before{width:48px;height:34px;border-radius:24px 0 0 0}.modal-x{position:sticky;float:right;top:0;margin:-4px 0 6px 10px;width:40px;height:40px;border-radius:14px 6px 14px 6px}.modal.show .modal-card,.modal:target .modal-card{animation:sheetUp .28s cubic-bezier(.2,.9,.25,1)}@keyframes sheetUp{from{transform:translateY(100%);opacity:.65}to{transform:none;opacity:1}}
  .field-grid,.reality-fields{grid-template-columns:1fr!important}.form{gap:14px}.form label{font-size:13px}input,select,textarea{font-size:16px;min-height:46px;border-radius:14px 6px 14px 6px}
  .legacy-row{border-radius:20px 7px 20px 7px}.row-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.row-actions>*{min-width:0}.row-actions>a,.row-actions>button,.row-actions form,.row-actions form button{width:100%;text-align:center}.head-actions{display:grid;grid-template-columns:1fr;width:100%}
  .theme-actions{display:grid;grid-template-columns:1fr 1fr}.theme-actions>*{width:100%}.theme-actions form button{width:100%}
  .webview-device{max-width:320px;height:min(68dvh,610px)}
}
@media(max-width:520px){
  .app-main{padding-left:12px;padding-right:12px}.app-main h1{font-size:26px}.card{padding:16px;border-radius:20px 7px 20px 7px}.grid{grid-template-columns:1fr 1fr;gap:10px}.metric{min-width:0}.metric b{font-size:25px}.metric{font-size:13px}
  .toolbar{grid-template-columns:1fr}.row-actions{grid-template-columns:1fr 1fr}.theme-actions{grid-template-columns:1fr}.notice{position:fixed;z-index:450;left:10px;right:10px;top:70px;margin:0;max-height:30dvh;overflow:auto;box-shadow:0 18px 55px #000b}.ui-loading-card{border-radius:22px 7px 22px 7px}.login{margin:4vh auto}.login .card{padding:20px}.rocket{font-size:72px}
}
@media(max-width:360px){.grid,.row-actions{grid-template-columns:1fr}.mobile-menu{left:10px}.app-main{padding-left:10px;padding-right:10px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* v18: Guardian Nova padrão + prévias WebView estáveis */
.theme-grid{align-items:start}
.theme-card{align-self:start;min-width:0}
.fixed-theme-preview{display:block;overflow:visible}
.webview-preview-title{font-weight:900;color:#c4b5fd;margin:0 0 12px;font-size:16px}
.fixed-theme-preview .webview-device{
  width:min(100%,390px);
  height:auto;
  aspect-ratio:390/844;
  min-height:0;
  max-height:none;
  margin:0 auto 10px;
  flex:none;
}
.fixed-theme-preview .webview-device iframe{position:absolute;inset:0;width:100%;height:100%;overflow:auto}
.default-update-hint{display:flex;align-items:center;min-height:38px;padding:8px 10px;border:1px solid #3b4c79;border-radius:12px 5px 12px 5px;background:#111a2b;font-size:12px}
@media(max-width:820px){
  .fixed-theme-preview .webview-device{width:min(100%,390px);height:auto;aspect-ratio:390/844;max-height:none}
}
@media(max-width:420px){
  .fixed-theme-preview .webview-device{width:100%;height:auto;aspect-ratio:390/844;max-height:none}
  .webview-preview-title{font-size:15px}
}

/* v20 - tema principal administrável */
.default-theme-btn{background:linear-gradient(135deg,#f6b73c,#ff8a3d)!important;color:#111827!important;border:0!important;font-weight:800;box-shadow:0 8px 24px rgba(246,183,60,.18)}
.default-update-hint{display:flex;align-items:center;min-height:42px;padding:10px 13px;border:1px solid rgba(246,183,60,.35);border-radius:14px;background:rgba(246,183,60,.08);color:#ffd47a!important;font-weight:700}
.theme-access-form{margin-top:14px;padding-top:14px;border-top:1px solid rgba(255,255,255,.08);display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end}.theme-access-form select{width:100%;min-height:46px;border-radius:14px;background:#101831;color:#fff;border:1px solid #34436d;padding:0 12px}@media(max-width:640px){.theme-access-form{grid-template-columns:1fr}.app-main table{min-width:620px}.card{overflow-x:auto}}


/* v23 - Minha Conta + catálogo compacto de temas */
.account-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr);gap:18px;align-items:start}
.account-app-hint{padding:12px 14px;border:1px solid #33456e;background:#0b1428;border-radius:16px 6px 16px 6px;color:#aeb9d7;font-size:12px;line-height:1.45}
.client-themes-page .theme-grid{grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}
.client-themes-page .theme-card{padding:13px;border-radius:19px 7px 19px 7px}
.client-themes-page .theme-title h3{font-size:15px}
.client-themes-page .pill{font-size:9px;padding:4px 7px}
.client-themes-page .webview-preview{padding:8px;border-radius:13px}
.client-themes-page .webview-preview-title{font-size:12px;margin-bottom:7px}
.client-themes-page .fixed-theme-preview .webview-device{width:min(100%,205px);aspect-ratio:390/844;border-width:5px;border-radius:24px;margin-bottom:4px}
.client-themes-page .webview-notch{width:62px;height:13px;top:5px}
.client-themes-page .theme-actions button{min-height:38px;padding:8px 10px;font-size:12px}
@media(max-width:760px){.account-grid{grid-template-columns:1fr}.client-themes-page .theme-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.client-themes-page .theme-card{padding:10px}.client-themes-page .fixed-theme-preview .webview-device{width:min(100%,175px)}}
@media(max-width:390px){.client-themes-page .theme-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.client-themes-page .theme-title{gap:4px}.client-themes-page .theme-title h3{width:100%;font-size:13px}.client-themes-page .pill{font-size:8px}.client-themes-page .webview-preview-title{display:none}.client-themes-page .webview-preview{padding:5px}.client-themes-page .theme-actions{margin-top:7px}.client-themes-page .theme-actions button{font-size:11px;padding:7px 5px}}


/* v24 - Preview de temas fixo no catálogo do cliente */
.client-themes-page .webview-preview{
  overflow:hidden !important;
}

.client-themes-page .webview-device{
  position:relative;
  overflow:hidden !important;
  height:auto !important;
  max-height:none !important;
}

.client-themes-page .webview-device iframe{
  position:absolute !important;
  inset:0 !important;
  width:390px !important;
  height:844px !important;
  max-width:none !important;
  max-height:none !important;
  border:0 !important;
  overflow:hidden !important;
  pointer-events:none !important;
  transform-origin:top left !important;
  scrollbar-width:none !important;
}

.client-themes-page .webview-device iframe::-webkit-scrollbar{
  display:none !important;
  width:0 !important;
  height:0 !important;
}

.client-themes-page .fixed-theme-preview{
  overflow:hidden !important;
}

.client-themes-page .fixed-theme-preview .webview-device{
  width:min(100%,205px) !important;
  aspect-ratio:390/844 !important;
}

@media(max-width:760px){
  .client-themes-page .fixed-theme-preview .webview-device{
    width:min(100%,175px) !important;
  }
}

@media(max-width:390px){
  .client-themes-page .fixed-theme-preview .webview-device{
    width:min(100%,160px) !important;
  }
}


/* v27 - Galeria de ícones do app */
.app-logo-picker{display:flex;flex-direction:column;gap:14px}
.app-logo-picker-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.app-logo-picker-head strong{display:block;font-size:14px}
.app-logo-picker-head small{display:block;color:#aeb9d7;font-size:11px;margin-top:4px;line-height:1.35}
.app-logo-current{width:58px;height:58px;border:1px solid #3a4b78;border-radius:17px 7px 17px 7px;background:#0a1225;display:grid;place-items:center;overflow:hidden;flex:0 0 auto}
.app-logo-current img{width:100%;height:100%;object-fit:cover}
.app-icon-gallery{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}
.app-icon-option{min-width:0;padding:8px 5px;border:1px solid #33456e;background:#0b1428;color:#dce5ff;border-radius:15px 5px 15px 5px;display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer;transition:.18s ease}
.app-icon-option:hover{transform:translateY(-2px);border-color:#6756ff}
.app-icon-option.selected{border-color:#8a72ff;box-shadow:0 0 0 2px #7048ff33;background:#121b38}
.app-icon-option img{width:44px;height:44px;object-fit:contain;border-radius:10px}
.app-icon-option span{max-width:100%;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.app-logo-actions{display:flex;justify-content:flex-start}
@media(max-width:760px){
  .app-icon-gallery{grid-template-columns:repeat(4,minmax(0,1fr))}
  .app-icon-option img{width:40px;height:40px}
}
@media(max-width:420px){
  .app-icon-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}
  .app-logo-picker-head{align-items:flex-start}
}


/* v28 - Themes: preview completo e organizado */
.client-themes-page .theme-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr)) !important;
  gap:18px !important;
  align-items:start !important;
}

.client-themes-page .theme-card{
  display:flex !important;
  flex-direction:column !important;
  gap:12px !important;
  min-width:0 !important;
  overflow:visible !important;
  padding:14px !important;
}

.client-themes-page .webview-preview{
  width:100% !important;
  overflow:visible !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:flex-start !important;
}

.client-themes-page .fixed-theme-preview{
  width:100% !important;
  overflow:visible !important;
  display:flex !important;
  justify-content:center !important;
  align-items:flex-start !important;
}

.client-themes-page .fixed-theme-preview .webview-device{
  position:relative !important;
  width:240px !important;
  height:520px !important;
  aspect-ratio:auto !important;
  overflow:hidden !important;
  flex:0 0 auto !important;
  border-radius:28px !important;
  margin:0 auto !important;
}

.client-themes-page .webview-device iframe{
  position:absolute !important;
  top:0 !important;
  left:0 !important;
  width:390px !important;
  height:844px !important;
  max-width:none !important;
  max-height:none !important;
  border:0 !important;
  overflow:hidden !important;
  pointer-events:none !important;
  transform-origin:top left !important;
  transform:scale(.6153846154) !important;
}

.client-themes-page .theme-title{
  width:100% !important;
  align-items:flex-start !important;
  flex-wrap:wrap !important;
}

.client-themes-page .theme-actions{
  width:100% !important;
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:8px !important;
}

.client-themes-page .theme-actions form,
.client-themes-page .theme-actions button,
.client-themes-page .theme-actions a{
  width:100% !important;
  min-width:0 !important;
}

@media(max-width:900px){
  .client-themes-page .theme-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
  }
  .client-themes-page .fixed-theme-preview .webview-device{
    width:210px !important;
    height:455px !important;
  }
  .client-themes-page .webview-device iframe{
    transform:scale(.5384615385) !important;
  }
}

@media(max-width:560px){
  .client-themes-page .theme-grid{
    grid-template-columns:1fr !important;
    gap:14px !important;
  }
  .client-themes-page .theme-card{
    padding:12px !important;
  }
  .client-themes-page .fixed-theme-preview .webview-device{
    width:220px !important;
    height:476px !important;
  }
  .client-themes-page .webview-device iframe{
    transform:scale(.5641025641) !important;
  }
}

@media(max-width:360px){
  .client-themes-page .fixed-theme-preview .webview-device{
    width:200px !important;
    height:433px !important;
  }
  .client-themes-page .webview-device iframe{
    transform:scale(.5128205128) !important;
  }
}


/* v29 - Admin/Themes: preview completo, fixo e sem scroll */
.admin-theme-card .webview-preview,
body.admin-themes-page .webview-preview{
  width:100% !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
}

.admin-theme-card .fixed-theme-preview,
body.admin-themes-page .fixed-theme-preview{
  width:100% !important;
  overflow:hidden !important;
  display:flex !important;
  justify-content:center !important;
  align-items:flex-start !important;
}

.admin-theme-card .webview-device,
body.admin-themes-page .webview-device{
  position:relative !important;
  width:240px !important;
  height:520px !important;
  min-height:0 !important;
  max-height:none !important;
  aspect-ratio:auto !important;
  overflow:hidden !important;
  border-radius:28px !important;
  margin:0 auto !important;
}

.admin-theme-card .webview-device iframe,
body.admin-themes-page .webview-device iframe{
  position:absolute !important;
  top:0 !important;
  left:0 !important;
  width:390px !important;
  height:844px !important;
  min-height:0 !important;
  max-width:none !important;
  max-height:none !important;
  border:0 !important;
  overflow:hidden !important;
  pointer-events:none !important;
  transform:scale(.6153846154) !important;
  transform-origin:top left !important;
  scrollbar-width:none !important;
}

.admin-theme-card .webview-device iframe::-webkit-scrollbar,
body.admin-themes-page .webview-device iframe::-webkit-scrollbar{
  display:none !important;
  width:0 !important;
  height:0 !important;
}

body.admin-themes-page .theme-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr)) !important;
  gap:18px !important;
  align-items:start !important;
}

body.admin-themes-page .theme-card{
  min-width:0 !important;
  overflow:visible !important;
}

@media(max-width:900px){
  body.admin-themes-page .theme-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  .admin-theme-card .webview-device,
  body.admin-themes-page .webview-device{width:210px !important;height:455px !important}
  .admin-theme-card .webview-device iframe,
  body.admin-themes-page .webview-device iframe{transform:scale(.5384615385) !important}
}

@media(max-width:620px){
  body.admin-themes-page .theme-grid{grid-template-columns:1fr !important}
  .admin-theme-card .webview-device,
  body.admin-themes-page .webview-device{width:220px !important;height:476px !important}
  .admin-theme-card .webview-device iframe,
  body.admin-themes-page .webview-device iframe{transform:scale(.5641025641) !important}
}


/* v33 - campos XHTTP */
.xhttp-fields{
  display:none;
  padding:14px;
  border:1px solid #34436d;
  border-radius:18px 7px 18px 7px;
  background:#0d1630;
  margin:12px 0;
}
.xhttp-fields textarea{min-height:110px}


/* v34 - fila de build APK */
.build-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.8fr);gap:18px;align-items:start}
.build-app-preview{display:flex;align-items:center;gap:14px;padding:14px;border:1px solid #33456e;background:#0b1428;border-radius:18px 7px 18px 7px;margin:12px 0 16px}
.build-app-preview img,.build-app-placeholder{width:64px;height:64px;border-radius:18px;object-fit:cover;display:grid;place-items:center;background:#111b35;font-size:28px;flex:0 0 auto}
.build-app-preview strong{display:block;font-size:18px}.build-app-preview small{display:block;color:#aeb9d7;margin-top:5px}
.build-main-button{width:100%;min-height:48px;font-weight:800}
.build-flow{display:flex;flex-direction:column;gap:9px}.build-flow span{padding:10px 12px;border-left:3px solid #765cff;background:#0c1530;border-radius:3px 12px 12px 3px}
.build-list{display:flex;flex-direction:column;gap:10px}.build-row{padding:13px;border:1px solid #31436d;background:#0b1429;border-radius:16px 6px 16px 6px}
.build-row-main{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.build-status{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:900;letter-spacing:.4px}
.status-QUEUED{background:#e5a93b22;color:#ffc45c;border:1px solid #e5a93b55}
.status-BUILDING{background:#3788ff22;color:#79b2ff;border:1px solid #3788ff55}
.status-COMPLETED{background:#23c48322;color:#67e6b0;border:1px solid #23c48355}
.status-FAILED{background:#ff557722;color:#ff8ca3;border:1px solid #ff557755}
.build-download{display:inline-flex;margin-top:10px}.build-error{margin-top:7px;color:#ff93a8}.build-ready-notice a{font-weight:800;margin-left:8px}
.table-wrap{overflow:auto}.table-wrap table{width:100%;border-collapse:collapse;min-width:820px}.table-wrap th,.table-wrap td{padding:10px;border-bottom:1px solid #28385e;text-align:left;vertical-align:top}
@media(max-width:760px){.build-layout{grid-template-columns:1fr}.build-row-main{align-items:flex-start}.build-app-preview img,.build-app-placeholder{width:56px;height:56px}}

.apk-build-toast{position:fixed;right:18px;bottom:18px;z-index:9999;width:min(390px,calc(100vw - 28px));display:flex;align-items:center;gap:12px;padding:13px 14px;background:#101a35;border:1px solid #4a62a0;border-radius:18px 7px 18px 7px;box-shadow:0 18px 50px #0009;opacity:0;transform:translateY(20px);pointer-events:none;transition:.22s ease}
.apk-build-toast.show{opacity:1;transform:none;pointer-events:auto}.apk-build-toast-text{flex:1;min-width:0}.apk-build-toast-text b,.apk-build-toast-text span{display:block}.apk-build-toast-text span{font-size:11px;color:#b8c3df;margin-top:3px}.apk-build-toast-link{white-space:nowrap;font-size:12px;font-weight:800}.apk-build-toast button{border:0;background:transparent;color:#fff;font-size:22px;padding:0}
@media(max-width:520px){.apk-build-toast{left:14px;right:14px;bottom:14px;width:auto;align-items:flex-start;flex-wrap:wrap}.apk-build-toast-text{width:calc(100% - 30px)}}


/* v36 - gerenciamento remoto do builder */
.builder-endpoint{display:flex;flex-direction:column;align-items:flex-end;gap:3px;max-width:360px;padding:9px 12px;border:1px solid #34466f;background:#0c1530;border-radius:15px 5px 15px 5px}
.builder-endpoint span{font-size:8px;letter-spacing:1.3px;color:#8f9aba}.builder-endpoint b{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.builder-admin-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);gap:18px;margin-top:18px;align-items:start}
.builder-base-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(275px,1fr));gap:12px}
.builder-base-card{padding:13px;border:1px solid #30416a;background:#0b1429;border-radius:18px 6px 18px 6px;min-width:0}
.builder-base-card.active{border-color:#2bc98c;box-shadow:inset 0 0 0 1px #2bc98c33}
.builder-base-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.builder-base-top strong{display:block;font-size:16px}.builder-base-top span{display:block;font-size:10px;color:#aeb8d2;margin-top:3px}
.builder-sha{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:5px}.builder-check{display:flex!important;flex-direction:row!important;align-items:center;gap:9px}.builder-check input{width:auto!important}
.builder-base-form input[type="file"]{padding:11px;border:1px dashed #4a5d8c;background:#091226;border-radius:13px}
@media(max-width:760px){.builder-admin-grid{grid-template-columns:1fr}.builder-endpoint{align-items:flex-start;width:100%;max-width:none}.builder-base-list{grid-template-columns:1fr}}


/* v38 - teste integração builder */
.builder-test-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:14px}
.builder-test-item{padding:10px;border-radius:14px 5px 14px 5px;border:1px solid #3b4b73;background:#0b1428;min-width:0}
.builder-test-item span{display:block;font-size:9px;color:#9eabc9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.builder-test-item b{display:block;margin-top:4px;font-size:12px}
.builder-test-item.ok{border-color:#2bc98c66}.builder-test-item.ok b{color:#68e9b4}
.builder-test-item.bad{border-color:#ff557766}.builder-test-item.bad b{color:#ff91a7}
@media(max-width:820px){.builder-test-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* v40 - upload base sempre visível */
.builder-upload-checks{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0 12px}
.builder-upload-checks span{padding:5px 8px;border-radius:999px;font-size:9px;font-weight:800;border:1px solid #3d4f79;background:#0b1427}
.builder-upload-checks span.ok{border-color:#2bc98c66;color:#72eab8}
.builder-upload-checks span.bad{border-color:#ff557766;color:#ff93a9}


/* v41 - logs builder */
.builder-log-list{display:flex;flex-direction:column;gap:9px;max-height:700px;overflow:auto}
.builder-log-row{padding:11px 12px;border:1px solid #31436d;background:#091327;border-radius:14px 5px 14px 5px}
.builder-log-row.log-ERROR{border-color:#ff557766}.builder-log-row.log-WARN{border-color:#e8ac4e66}
.builder-log-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:10px;color:#9eabc7}
.builder-log-head b{color:#dce5ff}.builder-log-head time{margin-left:auto}
.builder-log-row pre,.job-log-tail pre{white-space:pre-wrap;word-break:break-word;max-height:320px;overflow:auto;background:#050b18;border:1px solid #253457;border-radius:10px;padding:9px;font-size:10px;margin:8px 0 0;color:#cbd7f5}
.job-log-tail{margin-top:7px}.job-log-tail summary{cursor:pointer;font-size:10px;color:#92adff}


/* v42 - progresso e notificações não bloqueantes */
.builder-job-status-line{display:flex;align-items:center;justify-content:space-between;gap:10px}
.builder-progress{height:8px;background:#09101f;border:1px solid #263a66;border-radius:999px;overflow:hidden;margin:8px 0 6px}
.builder-progress i{display:block;height:100%;width:0;background:linear-gradient(90deg,#7c3aed,#22d3ee);transition:width .35s ease}
.builder-live-indicator{font-size:10px;font-weight:900;color:#68e9b4;border:1px solid #2bc98c55;padding:6px 9px;border-radius:999px}
.builder-live-indicator.offline{color:#ff91a7;border-color:#ff557766}
.builder-job-stalled{box-shadow:inset 3px 0 0 #ff5577}
.apk-toast-progress{width:100%;height:5px;background:#09101f;border-radius:999px;overflow:hidden;order:10}
.apk-toast-progress i{display:block;height:100%;width:0;background:linear-gradient(90deg,#7c3aed,#22d3ee);transition:width .35s ease}
.apk-build-toast.stalled{border-color:#ff557799}
@media(max-width:520px){
  .notice{
    position:relative!important;
    z-index:auto!important;
    left:auto!important;right:auto!important;top:auto!important;
    margin:0 0 12px!important;
    max-height:none!important;
    overflow:visible!important;
    box-shadow:0 8px 24px #0005!important;
    font-size:13px!important;
    line-height:1.35!important;
    padding:11px 12px 11px 42px!important;
  }
  .notice:before{left:11px!important;width:21px!important;height:21px!important}
  .apk-build-toast{
    left:12px!important;right:12px!important;bottom:12px!important;width:auto!important;
    max-height:150px;overflow:hidden;align-items:center!important;
  }
}


/* v43 - links persistentes do APK */
.apk-ready-card{margin-bottom:18px;border-color:#27b77e;background:linear-gradient(135deg,#0c2b25,#101a31);overflow:hidden}
.apk-ready-badge{display:inline-flex;padding:5px 9px;border-radius:999px;border:1px solid #2bc98c66;background:#23c48318;color:#72eab8;font-size:10px;font-weight:900;letter-spacing:.5px}
.apk-ready-card h2{margin:10px 0 4px}.apk-ready-actions,.apk-build-actions,.admin-apk-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:12px}
.apk-ready-actions .button-link,.apk-ready-actions button,.apk-build-actions .button-link,.apk-build-actions button{min-height:40px;display:inline-flex;align-items:center;justify-content:center}
.apk-public-link{display:flex;gap:8px;align-items:center;margin-top:12px;padding:9px 10px;border:1px solid #2d416b;background:#071126;border-radius:12px;min-width:0}
.apk-public-link span{font-size:10px;color:#9eabc8}.apk-public-link code{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.apk-public-link.compact{margin-top:9px}
.apk-admin-url{margin-top:6px;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#8191b6}
.admin-apk-actions button{padding:6px 9px;font-size:10px}
@media(max-width:520px){
  .apk-ready-card{padding:16px}
  .apk-ready-actions,.apk-build-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .apk-ready-actions .button-link:last-child{grid-column:1/-1}
  .apk-public-link{align-items:flex-start;flex-direction:column}
  .apk-public-link code{width:100%}
}

/* v48 - authoritative responsive overrides */
html,body{max-width:100%;overflow-x:hidden}.apk-build-toast{display:none!important}
.apk-build-toast-v48{position:fixed;z-index:1200;right:18px;bottom:18px;width:min(390px,calc(100vw - 36px));box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:14px 15px;border:1px solid #40547f;border-radius:16px;background:#101a35;box-shadow:0 18px 50px #0008;opacity:0;pointer-events:none;transform:translateY(12px);transition:.18s ease}
.apk-build-toast-v48.show{opacity:1;pointer-events:auto;transform:none}.apk-build-toast-v48.completed{border-color:#27b77e}.apk-build-toast-v48.failed{border-color:#e55779}.apk-build-toast-v48.building{border-color:#7657f5}
.apk-toast-main{min-width:0}.apk-toast-title{font-size:14px;font-weight:900;line-height:1.2}.apk-toast-sub{font-size:11px;color:#aeb9d4;margin-top:3px;line-height:1.35}.apk-toast-progress{height:3px;background:#263657;border-radius:999px;overflow:hidden;margin-top:9px}.apk-toast-progress i{display:block;height:100%;background:linear-gradient(90deg,#7657f5,#25c9d8)}
.apk-toast-action{white-space:nowrap;font-size:11px;font-weight:800}.apk-toast-close{width:30px!important;height:30px!important;min-width:30px!important;padding:0!important;border:0!important;border-radius:9px!important;background:#ffffff0d!important;color:#fff!important;font-size:20px!important}
.builder-admin-grid,.builder-base-list,.builder-base-card,.builder-endpoint,.card,.panel,main,.content{min-width:0;max-width:100%;box-sizing:border-box}.builder-base-card,.builder-endpoint{overflow:hidden}.builder-base-form input,.builder-base-form select,.builder-base-form textarea{max-width:100%;box-sizing:border-box}.table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
@media(max-width:760px){.builder-admin-grid{display:block}.builder-admin-grid>*{margin-bottom:14px}.builder-base-list{display:block}.builder-base-card{margin-bottom:10px}.builder-endpoint{width:100%}.builder-test-grid{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.apk-build-toast-v48{left:12px;right:12px;bottom:12px;width:auto;padding:12px;gap:9px}.apk-toast-title{font-size:13px}.apk-toast-sub{font-size:10px}.builder-test-grid{grid-template-columns:1fr}.apk-ready-actions,.apk-build-actions{grid-template-columns:1fr}.apk-ready-actions .button-link:last-child{grid-column:auto}}

/* v49 - capacidade builder */
.builder-capacity-card{margin:18px 0}.builder-capacity-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}
.builder-capacity-grid>div{padding:11px;border:1px solid #30416a;background:#091327;border-radius:14px 5px 14px 5px;min-width:0}
.builder-capacity-grid span,.builder-capacity-grid small{display:block;color:#95a3c2;font-size:9px}.builder-capacity-grid b{display:block;font-size:21px;margin:4px 0}
@media(max-width:800px){.builder-capacity-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){.builder-capacity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.build-row-main{align-items:flex-start;gap:8px}.build-row-main strong{max-width:65%}}

/* v50 - upload e bases async */
.builder-inline-loading{min-height:70px;display:flex;align-items:center;justify-content:center}
.builder-upload-inline{margin-top:10px!important;position:static!important}
.builder-base-form[data-no-global-loading="1"]{position:relative}

/* v51 - cliente build limpo */
.current-build{border-color:#4f66a0;background:linear-gradient(180deg,#101a34,#0d162c)}
.client-build-state,.client-build-error{margin-top:12px;padding:12px;border-radius:12px;background:#091327;border:1px solid #2c3f69;display:flex;flex-direction:column;gap:4px}
.client-build-state b{font-size:13px}.client-build-state span,.client-build-error{font-size:11px;line-height:1.4}
.client-build-error{border-color:#d9516c55;color:#ff9ab0;background:#291221}
.build-history-row{opacity:.9}.build-history-row .build-download{margin-top:10px}


/* v52 - servidores/importacao */
.server-actions-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0 18px}
.server-action{min-width:0;display:flex;align-items:center;gap:10px;text-align:left;padding:13px 14px;border:1px solid #31446f;border-radius:16px 6px 16px 6px;background:#101a31;color:#eef3ff;text-decoration:none;box-sizing:border-box}
button.server-action{width:100%;font:inherit}
.server-action>span{font-size:22px;flex:0 0 auto}.server-action div{min-width:0}.server-action b,.server-action small{display:block}.server-action b{font-size:12px}.server-action small{margin-top:3px;font-size:9px;color:#98a6c5}
.server-action.primary{background:linear-gradient(135deg,#6530ef,#8538f3);border-color:#8351ff}
.import-error-popup{position:fixed;z-index:1500;top:18px;right:18px;width:min(420px,calc(100vw - 36px));display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:11px;padding:13px 14px;border-radius:16px 6px 16px 6px;border:1px solid #ff667d88;background:#281320;color:#fff;box-shadow:0 18px 50px #0009}
.import-error-popup>div:nth-child(2){min-width:0}.import-error-popup b,.import-error-popup span{display:block}.import-error-popup span{font-size:11px;color:#ffc0cc;margin-top:3px;line-height:1.35}
.import-error-popup button{width:30px!important;height:30px!important;min-width:30px!important;padding:0!important;border-radius:9px!important;background:#ffffff0d!important;color:#fff!important}
.import-error-icon{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#ff5577;color:#fff;font-weight:900}
.import-preview-card{width:min(760px,calc(100vw - 28px));max-height:min(86vh,820px);overflow:auto}
.preview-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.preview-count{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:36px;border-radius:12px;background:#7137ef;color:#fff;font-weight:900}
.connection-preview-list{display:flex;flex-direction:column;gap:10px;margin:14px 0}
.connection-preview-item{padding:12px;border:1px solid #31446f;border-radius:14px 5px 14px 5px;background:#0a1428}
.connection-preview-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.connection-preview-top b,.connection-preview-top span{display:block}.connection-preview-top>div>span{font-size:10px;color:#98a6c5;margin-top:2px}
.preview-system{font-size:9px;padding:5px 7px;border-radius:999px;background:#26355c;color:#bdd0ff;white-space:nowrap}
.connection-preview-data{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}.connection-preview-data span{min-width:0;padding:8px;background:#071021;border-radius:9px}.connection-preview-data small,.connection-preview-data b{display:block}.connection-preview-data small{font-size:8px;color:#8391ad}.connection-preview-data b{font-size:10px;margin-top:3px;overflow:hidden;text-overflow:ellipsis}
.preview-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap}
@media(max-width:820px){.server-actions-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.connection-preview-data{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.server-actions-grid{grid-template-columns:1fr 1fr;gap:8px}.server-action{padding:11px 10px}.server-action>span{font-size:18px}.server-action b{font-size:11px}.server-action small{font-size:8px}.connection-preview-data{grid-template-columns:1fr}.preview-actions{display:grid;grid-template-columns:1fr}.preview-actions>*{width:100%;box-sizing:border-box}.import-error-popup{left:12px;right:12px;top:12px;width:auto}}

/* v53-working - personalização antes do build */
.build-profile-form{margin-top:8px}.build-save-profile{margin-top:4px}.build-ready-step{margin-top:18px;padding-top:16px;border-top:1px solid #2d4169}
.build-profile-form .app-icon-gallery{grid-template-columns:repeat(4,minmax(0,1fr))}.build-profile-form .app-icon-option{min-height:108px}.build-profile-form .app-icon-option img{width:58px;height:58px;object-fit:contain}
@media(max-width:760px){.build-profile-form .app-icon-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:480px){.build-profile-form .app-icon-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.build-profile-form .app-icon-option{min-height:100px}}
\n/* v53-working - galeria de ícones em modal */\n.logo-choice-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.logo-choice-card{display:flex;align-items:center;gap:10px;text-align:left;padding:11px;border:1px solid #31446f;border-radius:14px;background:#0a1428;color:#eef3ff}.logo-choice-card.selected{border-color:#7a4dff;box-shadow:0 0 0 2px #7a4dff33}.logo-choice-card b,.logo-choice-card small{display:block}.logo-choice-card small{font-size:9px;color:#91a0bc;margin-top:3px}.logo-choice-preview{width:42px;height:42px;flex:0 0 42px;display:flex;align-items:center;justify-content:center;border-radius:12px;background:#7137ef22;border:1px solid #7137ef55}.original-base-icon{display:flex;align-items:center;justify-content:center;font-size:24px;background:#7137ef22;border:1px solid #7137ef55;border-radius:12px}.app-logo-current .original-base-icon{width:64px;height:64px}.icon-gallery-modal-card{width:min(760px,calc(100vw - 28px));max-height:min(88vh,860px);overflow:auto}.modal-icon-gallery{grid-template-columns:repeat(4,minmax(0,1fr));max-height:none!important;overflow:visible!important}.base-original-option .base-original-large{width:58px;height:58px;display:flex;align-items:center;justify-content:center;font-size:34px}.icon-gallery-modal-card .preview-actions{position:sticky;bottom:0;padding-top:12px;background:linear-gradient(180deg,transparent,#101a31 35%)}\n@media(max-width:720px){.modal-icon-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}}\n@media(max-width:480px){.logo-choice-row{grid-template-columns:1fr}.modal-icon-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.icon-gallery-modal-card{width:calc(100vw - 18px)}}\n
/* v53-working - loja de temas */
.store-theme-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.store-theme-card{min-width:0;overflow:hidden;border:1px solid #31446f;border-radius:20px 8px 20px 8px;background:#101a31}.store-theme-card.owned{border-color:#28b78288}
.store-theme-preview{height:230px;padding:14px;background:var(--store-bg,#07111f);display:flex;align-items:center;justify-content:center}
.store-mini-phone{width:132px;height:204px;padding:11px;border-radius:24px;background:#0b1428;border:1px solid #ffffff18;color:var(--store-text,#fff);display:flex;flex-direction:column;align-items:center}
.store-mini-top{font-size:8px;font-weight:900;align-self:flex-start}.store-mini-circle{width:82px;height:82px;border-radius:50%;margin:26px 0 14px;display:flex;align-items:center;justify-content:center;font-size:31px;border:9px solid var(--store-primary,#7c3aed);background:#081225}.store-mini-box{height:28px;width:100%;border-radius:9px;background:var(--store-card,#111b2b)}
.store-theme-info{padding:14px}.store-theme-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.store-theme-head b,.store-theme-head small{display:block}.store-theme-head b{font-size:14px}.store-theme-head small{font-size:9px;color:#96a5c2;margin-top:3px}
.store-owned-badge{font-size:8px;padding:5px 7px;border:1px solid #2ec08a66;border-radius:999px;color:#70e5b8;background:#1eb17b17}
.store-price{font-size:20px;font-weight:900;margin-top:14px}.store-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.store-actions .btn{text-align:center;display:flex;align-items:center;justify-content:center}
@media(max-width:900px){.store-theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.store-theme-grid{grid-template-columns:1fr}.store-theme-preview{height:205px}}

/* v53-working - admin backup */
.backup-admin-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:14px}.backup-card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.backup-config-state{font-size:8px;padding:5px 8px;border:1px solid #d5a53e66;border-radius:999px;color:#f0c667}.backup-config-state.ok{color:#71e7b9;border-color:#27bc8566}.backup-action-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.backup-action-row form,.backup-action-row button{width:100%}.backup-flow{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.backup-flow span{padding:11px;background:#091327;border:1px solid #2f4169;border-radius:12px}.backup-flow b,.backup-flow small{display:block}.backup-flow b{font-size:14px}.backup-flow small{font-size:9px;color:#94a3c1;margin-top:3px}.backup-command-box{display:grid;grid-template-columns:auto 1fr;gap:7px 10px;margin-top:14px;padding:12px;background:#091327;border-radius:12px}.backup-command-box>b{grid-column:1/-1}.backup-command-box code{color:#c7b6ff}.backup-command-box span{font-size:10px;color:#99a7c1}.backup-history{display:flex;flex-direction:column;gap:8px}.backup-history-item{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:11px 12px;background:#091327;border:1px solid #2f4169;border-radius:12px}.backup-history-item>div:nth-child(2){text-align:right;min-width:0}.backup-history-item b,.backup-history-item small,.backup-history-item span{display:block}.backup-history-item small{font-size:9px;color:#8f9db7;margin-top:3px}.backup-history-item span{font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.backup-error{grid-column:1/-1;color:#ff91a7;font-size:10px;line-height:1.35}
@media(max-width:760px){.backup-admin-grid{grid-template-columns:1fr}.backup-history-item{grid-template-columns:1fr}.backup-history-item>div:nth-child(2){text-align:left}.backup-action-row{grid-template-columns:1fr 1fr}}
@media(max-width:440px){.backup-action-row,.backup-flow{grid-template-columns:1fr}}


/* final legal/support/cookie */
.legal-document{max-width:900px;line-height:1.65}.legal-document h2{margin-top:22px}.legal-document p{color:#aeb9cf}.legal-end{margin-top:28px;padding:14px;text-align:center;border:1px dashed #465a86;border-radius:12px}.legal-accept{max-width:900px;margin:14px 0 40px;padding:16px;background:#101a31;border:1px solid #31446f;border-radius:16px}.check-line{display:flex;gap:10px;align-items:flex-start}.legal-accept button{margin-top:12px}.legal-accept small{display:block;margin-top:8px;color:#8e9db9}.public-legal{max-width:900px;margin:30px auto;padding:16px}
.register-terms{display:flex!important;gap:8px;align-items:flex-start;font-size:11px}.register-terms input{width:auto!important;margin-top:2px}
.cookie-consent{position:fixed;z-index:9999;left:16px;right:16px;bottom:16px;max-width:760px;margin:auto;padding:14px 16px;background:#101a31;border:1px solid #42547f;border-radius:16px;box-shadow:0 18px 50px #0009;display:flex;align-items:center;justify-content:space-between;gap:14px}.cookie-consent b,.cookie-consent span{display:block}.cookie-consent span{font-size:11px;color:#aab6cc;margin-top:3px}.cookie-actions{display:flex;gap:8px;flex:0 0 auto}
.support-grid,.support-admin-list{display:grid;gap:12px}.support-ticket p,.support-admin-ticket p{white-space:pre-wrap}.ticket-status{white-space:nowrap;font-size:9px;padding:5px 8px;border-radius:999px;border:1px solid #466}.status-WAITING{color:#ffd77a}.status-ANSWERED{color:#71e6bd}.status-CLOSED,.status-FINISHED{color:#aab6cc}.ticket-admin-head{display:flex;justify-content:space-between;gap:10px}.ticket-admin-head small{display:block;color:#91a0bb;margin-top:3px}.ticket-admin-actions{display:grid;grid-template-columns:2fr 1fr;gap:10px}.ticket-admin-actions form{display:grid;gap:8px}
@media(max-width:650px){.cookie-consent{flex-direction:column;align-items:stretch}.cookie-actions button{flex:1}.ticket-admin-actions{grid-template-columns:1fr}}

.register-legal-box{padding:11px;border:1px solid #31446f;border-radius:12px;background:#091327}.register-legal-box>b{font-size:11px}.register-legal-scroll{height:145px;overflow-y:auto;margin:8px 0;padding:9px;background:#071020;border-radius:9px;font-size:10px;line-height:1.45;color:#aab6ca}.register-legal-scroll p{margin:0 0 9px}.register-legal-box>small{font-size:8px;color:#8998b6}.support-reply{margin-top:10px;padding:10px;border-radius:10px;background:#11273a;border:1px solid #2d6676}.support-reply b,.support-reply span{display:block}.support-reply b{font-size:10px;color:#7be3ce}.support-reply span{font-size:10px;margin-top:4px;white-space:pre-wrap}

.account-quick-links{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}.account-link-card{display:block;padding:13px;border:1px solid #31446f;border-radius:14px;background:#101a31;text-decoration:none}.account-link-card b,.account-link-card span{display:block}.account-link-card span{font-size:10px;color:#94a3bf;margin-top:4px}@media(max-width:600px){.account-quick-links{grid-template-columns:1fr}}

.side-divider{height:1px;background:#263653;margin:8px 14px;opacity:.75}

/* v56 menu/update automation */
.side-divider{height:1px;background:#263653;margin:8px 14px;opacity:.75}
.update-stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.update-base-card{grid-column:span 1}.update-version{margin-top:15px;padding:13px;background:#081225;border-radius:12px}.update-version strong,.update-version span{display:block}.update-version strong{font-size:24px}.update-version span{font-size:10px;color:#91a1be;margin-top:4px}
.update-stat-number{font-size:32px;font-weight:900;margin-bottom:8px}.update-stats-grid .data-card>small{display:block;color:#91a0bd;font-size:10px;margin-top:5px;line-height:1.35}
.update-auto-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.update-flow{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:16px}.update-flow>div{padding:12px;background:#091327;border:1px solid #2f4169;border-radius:12px}.update-flow span{display:flex;width:28px;height:28px;align-items:center;justify-content:center;border-radius:9px;background:#7137ef;color:#fff;font-weight:900;margin-bottom:9px}.update-flow b,.update-flow small{display:block}.update-flow b{font-size:11px}.update-flow small{font-size:9px;color:#92a0bc;margin-top:4px;line-height:1.4}
.update-rule-box{display:grid;grid-template-columns:1fr 1.2fr;gap:8px 14px;margin-top:14px;padding:13px;background:#091327;border-radius:12px}.update-rule-box code{color:#c8b7ff}.update-rule-box span{font-size:10px;color:#a9b5cb}
.empty-inline{margin-top:12px;color:#93a1bd;font-size:11px}
@media(max-width:900px){.update-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.update-flow{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.update-stats-grid,.update-flow{grid-template-columns:1fr}.update-rule-box{grid-template-columns:1fr}.update-auto-head{align-items:center}}


/* v57 - organização segura do formulário SSH + XHTTP */
.server-edit-card{scrollbar-gutter:stable}
.server-edit-card>.modal-x{
  position:sticky;
  top:0;
  margin-left:auto;
  margin-bottom:-34px;
  z-index:12;
  box-shadow:0 8px 24px #0008;
}
.server-edit-card>h2{padding-right:48px}

.xhttp-only-title,.xhttp-only-help{display:none}
.xhttp-auth-grid{display:none}

.server-form.mode-xhttp .connection-endpoint-section,
.server-form.mode-xhttp .network-options-section{
  margin:14px 0;
  padding:15px;
  border:1px solid #30446e;
  border-radius:18px 7px 18px 7px;
  background:#0b1429;
}
.server-form.mode-xhttp .xhttp-only-title{
  display:block;
  margin-bottom:4px;
  font-weight:850;
  font-size:15px;
  color:#d9e2f5;
}
.server-form.mode-xhttp .xhttp-only-help{
  display:block;
  margin:0 0 13px;
  color:#8f9fbd;
  font-size:10px;
  line-height:1.45;
}
.server-form.mode-xhttp .legacy-transport-fields{
  height:0;
  overflow:hidden;
  margin:0;
  padding:0;
}

.xhttp-fields{
  padding:16px;
  border:1px solid #40518a;
  border-radius:20px 8px 20px 8px;
  background:#0d1731;
  margin:14px 0;
}
.xhttp-section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:15px;
}
.xhttp-section-head .xray-title{margin:0;font-size:17px}
.xhttp-section-head p{
  margin:4px 0 0;
  color:#8fa1c2;
  font-size:10px;
  line-height:1.45;
}
.xhttp-transport-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px 12px;
}
.xhttp-transport-grid label,
.xhttp-fields>label,
.xhttp-advanced label{
  gap:8px!important;
}
.xhttp-transport-grid label small{
  display:block;
  color:#7f91b2;
  font-size:9px;
  font-weight:500;
  line-height:1.35;
  margin-top:-2px;
}
.xhttp-insecure-check{
  margin:14px 0 8px;
  padding:11px 12px;
  border:1px solid #2c406a;
  border-radius:12px;
  background:#0a1327;
}
.xhttp-advanced{
  margin-top:13px;
  border:1px solid #2f416d;
  border-radius:13px;
  padding:11px 12px;
  background:#091226;
}
.xhttp-advanced summary{
  cursor:pointer;
  font-weight:800;
  color:#9fc7ff;
}
.network-options-section{margin-top:12px}
.server-form.mode-xhttp .network-options-section>.field-grid{margin-top:10px}

.mode-9{
  background:#123044;
  color:#75e5ff;
  border-color:#2b6d85;
}

@media(max-width:620px){
  .server-edit-card{
    width:100%;
    max-height:94vh;
    padding:17px 14px 20px;
    border-radius:18px 18px 0 0;
  }
  .xhttp-transport-grid{grid-template-columns:1fr;gap:13px}
  .xhttp-section-head{align-items:center}
  .xhttp-section-head .mode-badge{font-size:8px}
  .server-form.mode-xhttp .connection-endpoint-section,
  .server-form.mode-xhttp .network-options-section,
  .xhttp-fields{padding:13px}
}

/* v58 - client admin security */
.admin-client-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.admin-client-card{min-width:0}.admin-client-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.admin-client-head h3{margin:0}.client-status{font-size:9px;font-weight:900;padding:5px 8px;border-radius:999px;border:1px solid}.client-status.status-ACTIVE{color:#66e4b5;border-color:#2fb58266;background:#1e9c7120}.client-status.status-SUSPENDED{color:#ffad6b;border-color:#d97c3d66;background:#b95d2720}.admin-client-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.client-security-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid #293b60}.client-security-actions form,.client-security-actions button,.client-security-actions .btn{width:100%}.warn-action{background:#9a5c20}.success-action{background:#167c5b}.danger-outline{border:1px solid #b23b4c;color:#ff8da0;background:#b23b4c18}.admin-reset-link{margin-bottom:14px}.reset-link-copy{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:12px}.reset-link-copy input{min-width:0}.reset-password-body{min-height:100vh;display:grid;place-items:center;background:#050b16}.reset-password-wrap{width:min(460px,calc(100% - 28px));padding:24px 0}.reset-password-card{text-align:center}.reset-password-card .form{text-align:left}.reset-icon{width:58px;height:58px;margin:0 auto 12px;border-radius:18px;display:grid;place-items:center;font-size:28px;background:#6f35ef22;border:1px solid #7745e866}.reset-icon.error{color:#ff8da0;border-color:#b23b4c66;background:#b23b4c18}@media(max-width:760px){.admin-client-grid{grid-template-columns:1fr}.admin-client-actions{grid-template-columns:1fr}.client-security-actions{grid-template-columns:1fr}.reset-link-copy{grid-template-columns:1fr}}


/* v59 content-online-security */
.admin-brand span{display:flex;flex-direction:column;line-height:1.08}
.admin-brand small{font-size:8px;font-weight:700;color:#7f91b0;margin-top:4px;letter-spacing:.03em}
.metric-online{border-color:#28b78266}.metric-online b{color:#76e8b9}.metric-online small{display:block;font-size:8px;color:#8292ae;margin-top:3px}

.content-admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.content-section{margin-top:14px}
.admin-content-list{display:flex;flex-direction:column;gap:9px}.admin-content-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;border:1px solid #2e416a;border-radius:13px;background:#091327}.admin-content-item>div{min-width:0}.admin-content-item b,.admin-content-item small,.admin-content-item a{display:block}.admin-content-item small{font-size:9px;color:#91a0bc;margin-top:4px;white-space:pre-wrap}.admin-content-item a{font-size:9px;margin-top:6px}.admin-content-item form{flex:0 0 auto}

.home-community,.home-tutorials,.home-news{margin-top:16px}.home-channel-links{display:grid;grid-template-columns:1fr 1fr;gap:10px}.home-channel-card{display:flex;gap:11px;align-items:center;padding:13px;border:1px solid #30446e;border-radius:14px;background:#091327;text-decoration:none}.home-channel-card>span{width:38px;height:38px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:#7137ef22;font-size:20px}.home-channel-card b,.home-channel-card small{display:block}.home-channel-card small{font-size:9px;color:#8fa0bd;margin-top:3px}
.tutorial-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tutorial-card{display:flex;gap:11px;align-items:center;padding:12px;border:1px solid #30446e;border-radius:14px;background:#091327;text-decoration:none}.tutorial-play{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#ef233c22;color:#ff8192}.tutorial-card b,.tutorial-card small{display:block}.tutorial-card small{font-size:9px;color:#8f9fbc;margin-top:3px}
.home-news-grid,.news-user-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.home-news-card,.news-user-card{min-width:0;padding:12px;border:1px solid #30446e;border-radius:14px;background:#091327}.home-news-card img,.news-user-card img{width:100%;max-height:180px;object-fit:cover;border-radius:10px;margin-bottom:9px}.home-news-card small,.news-user-card small{color:#8191ad;font-size:8px}.home-news-card b{display:block;margin-top:4px}.home-news-card p,.news-user-card p{font-size:10px;line-height:1.45;color:#aeb9cf;white-space:pre-wrap}
.modal.show{display:flex!important}.panel-popup-modal{z-index:10050;background:#020817cc}.panel-popup-card{max-width:470px;text-align:left}.panel-popup-card p{white-space:pre-wrap;line-height:1.55;color:#afbbd0}.popup-badge{display:inline-flex;padding:5px 8px;border-radius:999px;background:#7137ef22;border:1px solid #7137ef66;color:#c7b6ff;font-size:8px;font-weight:900;letter-spacing:.08em}.panel-popup-card>.ghost{width:100%;margin-top:9px}

@media(max-width:700px){.content-admin-grid,.home-channel-links,.tutorial-grid,.home-news-grid,.news-user-grid{grid-template-columns:1fr}.admin-content-item{align-items:flex-start}.admin-content-item form{align-self:center}}


/* v61 category runtime */
.server-category-filter{display:flex;gap:8px;overflow-x:auto;padding:4px 0 12px;scrollbar-width:none}.server-category-filter::-webkit-scrollbar{display:none}.category-chip{flex:0 0 auto;width:auto!important;padding:9px 12px!important;border-radius:999px!important;background:#101a31!important;border:1px solid #31446f!important;color:#aebbd2!important;font-size:10px!important}.category-chip.active{background:#7137ef!important;border-color:#895cff!important;color:#fff!important}.category-chip span{display:inline-flex;min-width:20px;height:20px;align-items:center;justify-content:center;border-radius:999px;background:#ffffff12;margin-left:5px;font-size:8px}.server-category-badge{display:inline-flex;margin-top:7px;padding:4px 8px;border:1px solid #36517e;border-radius:999px;color:#8fd5ff;font-size:8px;font-weight:800}.legacy-row[hidden]{display:none!important}.category-server-count{display:block;font-size:8px;color:#8b9ab5;margin-top:3px}


/* v62 — sidebar mobile fluida + card APK simplificado */
.sidebar{
  height:100vh;
  height:100dvh;
  max-height:100dvh;
  overflow:hidden;
  padding-bottom:0;
}

.sidebar>.side-brand{
  flex:0 0 auto;
  margin-right:28px;
}

.sidebar>.collapse-btn{
  flex:0 0 auto;
}

.sidebar-scroll{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding:0 0 max(18px, env(safe-area-inset-bottom)) 0;
  scrollbar-width:thin;
  scrollbar-color:#33415e transparent;
}

.sidebar-scroll::-webkit-scrollbar{width:5px}
.sidebar-scroll::-webkit-scrollbar-track{background:transparent}
.sidebar-scroll::-webkit-scrollbar-thumb{
  background:#33415e;
  border-radius:999px;
}

.sidebar-scroll>form{
  margin:0;
}

.sidebar-scroll .side-logout{
  margin-bottom:max(8px, env(safe-area-inset-bottom));
}

.apk-ready-card{
  overflow:hidden;
}

.apk-ready-actions-simple{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:18px;
}

.apk-ready-actions-simple>a,
.apk-ready-actions-simple>button{
  width:100%;
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:14px;
  font-weight:800;
  text-decoration:none;
  transition:transform .16s ease, opacity .16s ease, border-color .16s ease;
}

.apk-ready-actions-simple>a:active,
.apk-ready-actions-simple>button:active{
  transform:scale(.985);
}

.apk-download-btn{
  background:linear-gradient(135deg,#7c3aed,#9333ea);
  color:#fff!important;
  border:1px solid #9d61ff;
}

.apk-copy-btn{
  background:#172238!important;
  color:#e7edf9!important;
  border:1px solid #34496f!important;
}

.apk-public-link{
  display:none!important;
}

@media(max-width:820px){
  .sidebar{
    top:0;
    bottom:auto;
    height:100dvh;
    max-height:100dvh;
    padding:18px 12px 0;
  }

  .sidebar-scroll{
    padding-bottom:max(34px, calc(env(safe-area-inset-bottom) + 22px));
  }

  .sidebar.open{
    box-shadow:18px 0 55px #0009;
  }
}

@media(max-width:520px){
  .apk-ready-card{
    padding:20px 16px;
  }

  .apk-ready-card h2{
    font-size:28px;
    line-height:1.12;
  }

  .apk-ready-actions-simple{
    grid-template-columns:1fr;
  }

  .apk-ready-actions-simple>a,
  .apk-ready-actions-simple>button{
    min-height:54px;
    font-size:15px;
  }
}


/* v63 theme preview recovery */
.webview-device{isolation:isolate}
.theme-preview-state{
  position:absolute;inset:0;z-index:2;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:7px;padding:22px;text-align:center;
  background:linear-gradient(160deg,#08111f,#10182a);color:#e8eefb;
}
.theme-preview-state b{font-size:13px}
.theme-preview-state small{font-size:9px;line-height:1.45;color:#92a2bd;max-width:220px}
.theme-preview-spinner{
  width:30px;height:30px;border-radius:50%;
  border:3px solid #32415c;border-top-color:#8b5cf6;border-right-color:#22d3ee;
  animation:uiSpin .75s linear infinite;margin-bottom:4px
}
.theme-preview-loaded .theme-preview-state{
  opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .2s ease,visibility .2s ease
}
.theme-preview-failed .theme-preview-state{
  background:linear-gradient(160deg,#101827,#151b2c)
}
.theme-preview-failed .theme-preview-state button{
  width:auto!important;min-height:36px;margin-top:5px;padding:7px 12px;font-size:10px
}

/* v64 builder base async upload */
.builder-upload-progress-box{display:block!important;margin-top:12px}.builder-upload-progress-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.builder-upload-progress-head b,.builder-upload-progress-head span{font-size:11px}.builder-upload-progress-head span{font-weight:900}.builder-upload-progress-track{height:8px;margin:9px 0;border-radius:999px;overflow:hidden;background:#0a1427;border:1px solid #2f426c}.builder-upload-progress-track i{display:block;height:100%;width:0;background:linear-gradient(90deg,#7c3aed,#22d3ee);transition:width .2s ease}.builder-upload-progress-box small{display:block;font-size:9px;line-height:1.4;color:#a5b1c8}

/* v65 — progresso do APK sem bloquear o painel */
.client-build-live-card{margin-bottom:18px;border-color:#4056a0;background:linear-gradient(145deg,#0e1830,#0a1328)}
.client-build-live-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.client-build-live-head h2{margin:12px 0 5px}.client-build-live-head>strong{font-size:28px;line-height:1;color:#89b7ff;white-space:nowrap}
.build-live-badge{border-color:#5f55dc;color:#c7c2ff;background:#332a7a55}
.client-build-progress{height:10px;margin:14px 0 9px;border-radius:999px;overflow:hidden;background:#071022;border:1px solid #2b3f69}
.client-build-progress i{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#7c3aed,#3b82f6,#22d3ee);transition:width .45s ease}
.client-build-live-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#98a8c4;font-size:11px}
.client-build-live-foot a{font-weight:800;text-decoration:none}.client-build-live-foot strong{color:#cfe3ff}
@media(max-width:520px){.client-build-live-head>strong{font-size:23px}.client-build-live-head h2{font-size:23px}.client-build-live-foot{font-size:10px}}

/* v68 protocol fields */
.protocol-v68-fields{display:none;margin:14px 0;padding:15px;border:1px solid #38507f;border-radius:18px 8px;background:#0b142a}
.protocol-v68-fields .dnstt-fields,.protocol-v68-fields .bhttp-fields,.protocol-v68-fields .hysteria-fields,.protocol-v68-fields .nova-tcp-fields{display:none}
.protocol-json-advanced{margin-top:13px;padding:11px;border:1px solid #2c4069;border-radius:12px;background:#091226}
.protocol-json-advanced summary{cursor:pointer;font-weight:800;color:#a8c9ff}
.protocol-json-box{min-height:130px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:10px}

/* v79 - Store / Checkout */
.store-page{padding-bottom:80px}.store-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:26px;padding:26px;border:1px solid #283654;border-radius:28px;background:radial-gradient(circle at 15% 0,#17387755,transparent 45%),linear-gradient(145deg,#101a31,#0c1325)}.store-hero h1{margin:4px 0 6px;font-size:42px}.store-hero p{margin:0;color:#9ba9c7}.eyebrow{font-size:12px;font-weight:800;letter-spacing:.16em;color:#7bdcff}.store-cart-button{display:inline-flex;align-items:center;gap:10px;padding:14px 18px;border:1px solid #44557b;border-radius:16px;background:#151f36;color:#fff;text-decoration:none;font-weight:800}.store-cart-button span{display:grid;place-items:center;min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:#7c3aed}.store-product-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}.product-card{overflow:hidden;border:1px solid #2b3a5d;border-radius:24px;background:#10182c;box-shadow:0 16px 40px #0003;transition:.2s ease}.product-card:hover{transform:translateY(-3px);border-color:#53699a}.product-visual{height:230px;display:grid;place-items:center;background:radial-gradient(circle at 50% 35%,#5635d855,transparent 35%),linear-gradient(160deg,#080d1a,#0d1630)}.mini-device{width:122px;height:210px;padding:8px;border-radius:27px;background:#10192f;border:1px solid #394768;box-shadow:0 18px 40px #0008}.mini-speaker{width:42px;height:5px;border-radius:8px;background:#050814;margin:2px auto 8px}.mini-screen{height:183px;border-radius:20px;padding:12px;background:linear-gradient(160deg,#101b3a,#07151e);color:#fff}.mini-screen strong{font-size:9px}.mini-orbit{width:72px;height:72px;margin:28px auto 18px;border:11px solid #783df5;border-radius:50%;display:grid;place-items:center;font-size:25px}.mini-bar{height:24px;border-radius:9px;background:#18223b}.subscription-visual{padding:25px;grid-template-columns:auto 1fr;gap:18px}.subscription-icon{width:82px;height:82px;border-radius:22px;background:linear-gradient(145deg,#7c3aed,#3b82f6);display:grid;place-items:center;font-size:35px}.subscription-lines b{font-size:24px;display:block;margin-bottom:7px}.subscription-lines span{color:#9caccc}.product-body{padding:20px}.product-top{display:flex;justify-content:space-between;gap:12px}.product-type{font-size:11px;letter-spacing:.12em;color:#7bdcff}.product-body h2{font-size:22px;margin:4px 0}.product-body p{color:#93a0bd;min-height:44px}.owned-pill{height:max-content;border:1px solid #2ecb9c;color:#6ee7bd;padding:6px 10px;border-radius:999px;font-size:11px}.product-price{display:flex;align-items:baseline;gap:8px;margin:16px 0}.product-price small{color:#8795b1}.product-price strong{font-size:28px}.product-actions{display:flex;gap:10px}.product-actions>*{flex:1}.product-actions form{margin:0}.product-actions .btn{width:100%}.preview-modal{display:none;position:fixed;inset:0;z-index:1000;align-items:center;justify-content:center;padding:20px}.preview-modal.open{display:flex}.preview-backdrop{position:absolute;inset:0;background:#02050be6;backdrop-filter:blur(8px)}.preview-dialog{position:relative;width:min(470px,100%);max-height:94vh;padding:18px;border:1px solid #3b4d72;border-radius:28px;background:#0d1427;overflow:auto}.preview-modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.preview-modal-head small{display:block;color:#7bdcff}.preview-modal-head b{font-size:18px}.preview-modal-head button{width:42px;height:42px;border:0;border-radius:13px;background:#1b263f;color:#fff;font-size:25px}.phone-preview-shell{position:relative;width:min(330px,82vw);height:min(680px,72vh);margin:auto;border:9px solid #252c3d;border-radius:42px;background:#000;overflow:hidden;box-shadow:0 24px 70px #000a}.phone-preview-notch{position:absolute;z-index:3;top:8px;left:50%;transform:translateX(-50%);width:95px;height:22px;border-radius:999px;background:#02030a}.phone-preview-shell iframe{width:100%;height:100%;border:0;background:#050814}.phone-preview-home{position:absolute;left:50%;bottom:7px;transform:translateX(-50%);width:90px;height:4px;border-radius:9px;background:#ffffff77}.checkout-page,.payment-page{min-height:100vh;max-width:1180px;margin:auto;padding:34px 22px}.back-link{display:inline-block;margin-bottom:22px;color:#a9b9db;text-decoration:none}.checkout-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:22px}.cart-list{display:grid;gap:12px;margin-top:22px}.cart-item{display:flex;justify-content:space-between;gap:18px;padding:18px;border:1px solid #293858;border-radius:19px;background:#10182b}.cart-item span,.cart-item small{display:block;color:#8d9ab7}.cart-item b{display:block;font-size:18px;margin:4px 0}.cart-item>div:last-child{text-align:right}.text-danger{border:0;background:transparent;color:#ff707f;font-weight:700;cursor:pointer;padding:6px}.order-summary{position:sticky;top:22px;height:max-content;padding:22px;border:1px solid #34466f;border-radius:23px;background:#10192e}.order-summary>div{display:flex;justify-content:space-between;padding:9px 0;color:#aeb9d1}.order-summary .total-line{color:#fff}.total-line strong{font-size:27px}.coupon-form{margin:18px 0}.coupon-form label,.pix-card label{display:block;margin:0 0 8px;font-weight:700}.coupon-form>div{display:flex;gap:8px}.coupon-form input{min-width:0;flex:1}.checkout-button{width:100%;padding:15px}.checkout-safe{display:block;text-align:center;color:#8491ac;margin-top:12px}.payment-page{display:grid;place-items:center}.pix-card{width:min(520px,100%);padding:28px;border:1px solid #344970;border-radius:28px;background:#10192d;text-align:center}.payment-state{margin:18px 0;padding:12px;border-radius:14px;background:#1d2943;color:#ffd36f}.payment-state.approved{background:#103c32;color:#77e7b7}.pix-qr{width:230px;max-width:80%;border-radius:18px;background:#fff;padding:12px;margin:8px auto 18px}.pix-card textarea{width:100%;height:95px;resize:none;margin-bottom:12px;font-size:12px}.admin-store-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin:20px 0}.mp-status{padding:10px 12px;border-radius:12px;background:#401b2b;color:#ff829c;margin:12px 0}.mp-status.ok{background:#11392e;color:#6be2b0}.env-box{margin:14px 0;padding:12px;border:1px dashed #40547e;border-radius:14px}.env-box code{display:block;margin-top:7px;word-break:break-all}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.admin-store-grid form>label,.admin-store-grid form>input,.admin-store-grid form>textarea,.admin-store-grid form>select{display:block;width:100%;margin-top:8px}
@media(max-width:760px){.store-hero{align-items:flex-start;flex-direction:column;padding:20px}.store-hero h1{font-size:34px}.store-cart-button{width:100%;justify-content:center}.store-product-grid{grid-template-columns:1fr}.product-visual{height:205px}.checkout-grid{grid-template-columns:1fr}.order-summary{position:static}.product-actions{flex-direction:column}.form-grid{grid-template-columns:1fr}.preview-dialog{padding:14px}.phone-preview-shell{height:68vh}}
