/* Shared application tokens. Form controls always use their own paired colors. */
:root,html[data-theme=light]{color-scheme:light;--background:#fbfbfe;--surface:#fff;--surface-soft:#f4f3f8;--card:#fff;--text:#201b2d;--text-secondary:#625d70;--border:#dedbe8;--input-bg:#fff;--input-text:#201b2d;--placeholder:#726a80;--primary:#6b37d0;--accent:#9b70ec;--link:#6330c2;--hover:#f0ebfa;--button-text:#fff;--ink:var(--text);--muted:var(--text-secondary);--line:var(--border);--wash:var(--surface-soft);--white:var(--surface)}
html[data-theme=dark]{color-scheme:dark;--background:#101014;--surface:#19191f;--surface-soft:#22222b;--card:#19191f;--text:#f5f4f8;--text-secondary:#b9b7c8;--border:#383843;--input-bg:#22222b;--input-text:#f5f4f8;--placeholder:#b4b0c4;--primary:#7948dc;--accent:#b896ff;--link:#cbbbff;--hover:#2c263b;--button-text:#fff;--ink:var(--text);--muted:var(--text-secondary);--line:var(--border);--wash:var(--surface-soft);--white:var(--surface)}
html[data-theme] body{background:var(--background);color:var(--text)}
html[data-theme] :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]),textarea,select){background:var(--input-bg)!important;color:var(--input-text)!important;border-color:var(--border)!important;caret-color:var(--input-text);-webkit-text-fill-color:var(--input-text);color-scheme:inherit}
html[data-theme] :is(input,textarea)::placeholder{color:var(--placeholder)!important;-webkit-text-fill-color:var(--placeholder);opacity:1}
html[data-theme] :is(select option,select optgroup){background:var(--input-bg);color:var(--input-text)}
html[data-theme] :is(input,textarea,select):focus-visible{outline:2px solid var(--accent);outline-offset:2px;box-shadow:0 0 0 4px color-mix(in srgb,var(--accent),transparent 85%)}
html[data-theme] input:-webkit-autofill,html[data-theme] input:-webkit-autofill:focus{-webkit-text-fill-color:var(--input-text)!important;box-shadow:0 0 0 1000px var(--input-bg) inset!important;caret-color:var(--input-text)}
html[data-theme] :is(input,textarea,select):disabled{opacity:.7}input[type=checkbox],input[type=radio]{accent-color:var(--primary)}
html[data-theme] :is(dialog,.form-card,.panel,.surface,.addon-choice,.block-card,.block-content,.product-edit,.image-picker button,.template-choice>span,.palette-choice,.page-buttons button,.device-switch,.error-panel){background:var(--surface);color:var(--text);border-color:var(--border)}
html[data-theme] .addon-choice>span{background:transparent;color:var(--text)}
html[data-theme] :is(.block-header,.editor-bottom,.editor-tabs,.editor-controls,.sidebar,.app-topbar,.editor-topbar,.dialog-head,.panel-head){background:var(--surface);color:var(--text);border-color:var(--border)}
html[data-theme] :is(.block-header button,.editor-tabs button,.page-buttons button,.device-switch button,.palette-choice,.template-choice b){color:var(--text)}
html[data-theme] :is(.block-header,.editor-bottom,.editor-tabs){border-color:var(--border)}
html[data-theme] :is(.editor-preview-wrap,.auth-content,.workspace-main){background:var(--background);color:var(--text)}
html[data-theme] :is(.sidebar-tip,.welcome-banner,.notice,.auth-selection,.contact-selection){background:var(--surface-soft);border-color:var(--border);color:var(--text)}
html[data-theme] :is(.btn-outline,.icon-btn,.guide-option,.coupon-action){background:var(--surface);color:var(--text);border-color:var(--border)}
html[data-theme] :is(.btn-outline,.icon-btn,.guide-option,.coupon-action):hover{background:var(--hover);color:var(--text)}
html[data-theme] .btn-primary{background:var(--primary);color:var(--button-text);border-color:var(--primary)}
html[data-theme] :is(.text-link,.guide-back,.password-help,.auth-switch a){color:var(--link)}
html[data-theme=dark] :is(.form-status.error,.coupon-feedback.error,.btn-danger){color:#ffb9c3}html[data-theme=dark] :is(.form-status.success,.coupon-feedback.success){color:#95e7bc}
html[data-theme=dark] :is(.notice.warning,.trial-banner){background:#26202e;color:#e1d2f1;border-color:#5a456b}
html[data-theme=dark] :is(.btn:disabled,.is-disabled){opacity:.6}
html[data-theme=dark] :is(.strategy-pricing .managed-card.featured){background:linear-gradient(150deg,#25202f,#1d1b25);border-color:#a77adf}
html[data-theme=dark] :is(.strategy-pricing .corporate-card){background:#191b23;border-color:#424350}
html[data-theme=dark] :is(.new-site-templates small,.editor-settings>p,.editor-settings .fine-print,.palette-help,.palette-label,.editor-site-title small){color:var(--text-secondary)}
html[data-theme] .sidebar nav a{color:var(--text-secondary)}html[data-theme] .sidebar nav a.active{background:var(--hover);color:var(--link)}
.identity-page{min-height:100vh;display:grid;place-items:center;padding:80px 22px;background:var(--background)}.identity-card{width:100%;max-width:490px;border:1px solid var(--border);border-radius:22px;padding:36px;background:var(--surface);box-shadow:0 16px 65px #21162f08}.identity-card .brand{margin-bottom:30px;max-width:155px}.identity-card h1{font-size:31px;line-height:1.18;margin-bottom:15px}.identity-card>p{font-size:14px;line-height:1.7;margin-bottom:24px}.identity-card form{display:grid;gap:18px}.identity-card label{display:grid;gap:8px;font-size:13px}.identity-card :is(input,select){min-height:49px;border:1px solid var(--border);border-radius:10px;padding:12px}.identity-card .btn{min-height:48px}.identity-card .back-link{display:block;margin-top:25px}.identity-card .form-status{font-size:13px}.identity-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}.trial-banner{display:flex;gap:20px;justify-content:space-between;align-items:center;padding:19px 22px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft);margin-bottom:25px}.trial-banner strong{display:block;font-size:14px}.trial-banner p{font-size:12px;margin-top:4px}.trial-banner .btn{min-height:44px;white-space:nowrap}.trial-banner .identity-actions{margin:0}.trial-banner .form-status{font-size:12px}
.wizard-dialog{max-width:850px}.wizard-progress{display:flex;gap:8px;margin:20px 0 28px}.wizard-progress span{height:4px;flex:1;border-radius:3px;background:var(--border)}.wizard-progress .done{background:var(--primary)}.wizard-heading{margin-bottom:23px}.wizard-heading small{color:var(--link);font-size:11px;letter-spacing:.1em}.wizard-heading h3{font-size:25px;margin:8px 0 10px}.wizard-heading p{font-size:13px}.wizard-form{display:grid;gap:18px}.wizard-form label{display:grid;gap:7px;font-size:13px}.wizard-form :is(input:not([type=radio]):not([type=color]),select,textarea){width:100%;padding:12px;border:1px solid var(--border);border-radius:10px;min-height:48px}.wizard-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}.wizard-actions{display:flex;gap:12px;justify-content:space-between;margin-top:25px}.wizard-actions .btn{min-height:48px}.wizard-preview{width:100%;max-height:270px;object-fit:cover;object-position:top;border:1px solid var(--border);border-radius:12px}.wizard-summary{display:grid;gap:12px;font-size:13px;margin-top:20px}.wizard-summary>div{display:flex;gap:20px;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid var(--border)}.wizard-address{display:flex;align-items:center;border:1px solid var(--border);border-radius:10px;background:var(--input-bg);overflow:hidden}.wizard-address input{border:0!important;border-radius:0!important;min-width:0}.wizard-address span{padding-right:13px;font-size:12px;color:var(--muted)}.wizard-form .form-status{font-size:12px}.editor-topbar #undo-site{min-width:42px}.preview-theme-switch{display:flex;gap:5px}.preview-theme-switch button{border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:6px;padding:6px 9px;font-size:11px}.editor-lock{margin:0;border-radius:0;padding:12px 22px}.editor-topbar #save-state{max-width:210px;overflow:hidden;text-overflow:ellipsis}.domain-edit{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.domain-edit label{flex:1;min-width:160px}.domain-edit input{width:100%;padding:12px;border:1px solid var(--border);border-radius:8px}.domain-edit .btn{min-height:48px}
@media(max-width:650px){.trial-banner{align-items:flex-start;flex-direction:column;gap:12px}.trial-banner .identity-actions{width:100%}.wizard-dialog{max-width:calc(100% - 24px)}.wizard-fields{grid-template-columns:1fr}.wizard-heading h3{font-size:22px}.wizard-actions .btn{padding-inline:13px}.identity-card{padding:27px 23px}.preview-toolbar{flex-wrap:wrap;gap:10px}.editor-topbar #save-state{max-width:135px}.editor-topbar #undo-site{padding:8px}.wizard-address span{font-size:10px}.trial-banner .btn{white-space:normal}.identity-page{padding:55px 18px}}

.editor-shell:has(.editor-lock){grid-template-rows:auto auto minmax(0,1fr)}

html[data-theme] .device-switch button.active{background:var(--hover);color:var(--link)}
html[data-theme] .preview-toolbar{color:var(--text-secondary)}
html[data-theme] .page-buttons button.active{background:var(--hover);border-color:var(--link);color:var(--link)}
/* Intrinsic widths must never hide editor actions beyond the mobile viewport. */
.editor-shell{grid-template-columns:minmax(0,1fr);width:100%;max-width:100vw}
.editor-body,.editor-controls,.editor-preview-wrap,.editor-settings{min-width:0}
@media(max-width:650px){
 .editor-shell{height:100dvh;grid-template-rows:auto minmax(0,1fr)}
 .editor-topbar{display:grid;grid-template-columns:minmax(0,1fr)44px;grid-template-rows:auto auto;gap:10px;padding:10px 14px;height:auto}
 .editor-topbar>div:first-child{grid-column:1;grid-row:1;min-width:0}
 .editor-topbar .editor-site-title{max-width:none;min-width:0}
 .editor-site-title b{overflow:hidden;text-overflow:ellipsis}
 .editor-topbar>div:nth-child(2){grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr)44px 60px minmax(0,1.3fr);gap:6px;min-width:0}
 .editor-topbar>.theme-switch{grid-column:2;grid-row:1;width:44px;height:44px;justify-self:end}
 .editor-topbar .btn,.editor-topbar #undo-site{min-height:44px;font-size:11px;padding:7px 8px;min-width:0}
 .editor-topbar #editor-back{width:40px;height:42px}
 .editor-body,.editor-controls,.editor-preview-wrap{width:100%;max-width:100%}
 .editor-controls{flex-shrink:0}.editor-settings{overflow:visible}
 .preview-toolbar{flex-wrap:wrap}.preview-toolbar>span{flex-basis:100%}
 .preview-theme-switch button{min-height:40px;min-width:60px}
 .editor-shell:has(.editor-lock){grid-template-rows:auto auto minmax(0,1fr)}
}
html[data-theme] :is(.secure-note,.workspace-label,.sidebar-tip p,.sidebar-user small,.app-topbar small,.welcome-banner p,.stat-card small,.stat-card>div,.site-row small,.breadcrumb,.breadcrumb span){color:var(--text-secondary)}
html[data-theme] .skip{background:var(--surface);color:var(--link)}
html[data-theme=dark] :is([data-remove-service],[data-remove-product]){color:#ffb9c3}
html[data-theme] :is(.user-card small,.template-chrome>span,.app-topbar>div>span){color:var(--text-secondary)}
html[data-theme] :is(.template-summary>span,.footer-statement b){color:var(--link)}
html[data-theme] .template-chrome{background:var(--surface-soft);color:var(--text-secondary);border-color:var(--border)}

html[data-theme] .app-tabs :is(button,a){background:var(--surface);color:var(--text);border-color:var(--border);min-height:40px}
html[data-theme] .app-tabs :is(button,a):hover{background:var(--hover)}
html[data-theme] .app-tabs .active{background:var(--primary);color:var(--button-text);border-color:var(--primary)}
html[data-theme] .data-table td small{color:var(--text-secondary)}
html[data-theme] :is(button,a):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.config-list{margin:0;padding:0 24px}.config-list>div{padding:16px 0;display:grid;grid-template-columns:minmax(130px,1fr) minmax(0,2fr);gap:8px 24px;border-bottom:1px solid var(--border)}
.config-list dt{font-weight:650}.config-list dd{margin:0;font-size:13px;line-height:1.6;overflow-wrap:anywhere}.config-list dd span{display:block;color:var(--text-secondary);margin-bottom:4px}
@media(max-width:650px){.config-list>div{grid-template-columns:1fr}.config-list{padding:0 16px}}

/* WANTY V17 — administração responsiva e estados consistentes. */
.admin-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 22px}
.admin-filters{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 16px}.admin-filters :is(input,select){min-height:42px;min-width:180px;padding:9px 11px;border:1px solid var(--border);border-radius:9px}
.admin-stats{margin-bottom:22px}.launch-grid,.system-grid,.admin-detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.launch-item{display:flex;align-items:flex-start;gap:10px;padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft);color:var(--text)}.launch-item>span{display:grid;place-items:center;flex:0 0 25px;height:25px;border:1px solid var(--border);border-radius:999px;color:var(--text-secondary);font-size:12px}.launch-item.done>span{background:var(--primary);border-color:var(--primary);color:var(--button-text)}.launch-item b{display:block;font-size:13px}.launch-item small{display:block;margin-top:3px;color:var(--text-secondary);line-height:1.45}
.admin-detail-grid>div,.system-grid>article{padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft);min-width:0}.admin-detail-grid small,.system-grid small{display:block;color:var(--text-secondary);margin-bottom:5px}.admin-detail-grid b,.system-grid b{overflow-wrap:anywhere}
.admin-form-grid,.settings-admin{display:grid;gap:18px}.admin-form-grid{grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}.settings-admin fieldset,.admin-form-grid fieldset{min-width:0;border:1px solid var(--border);border-radius:14px;padding:18px;background:var(--surface)}.settings-admin legend,.admin-form-grid legend{padding:0 7px;font-weight:700;color:var(--text)}.settings-admin label,.admin-form-grid label{display:grid;gap:7px;margin:12px 0;font-size:12px;color:var(--text-secondary)}.settings-admin :is(input,select,textarea),.admin-form-grid :is(input,select,textarea){width:100%;min-height:44px;padding:10px 11px;border:1px solid var(--border);border-radius:9px}.settings-admin .secret-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}.settings-admin .integration-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.settings-admin code{font-size:11px;overflow-wrap:anywhere;color:var(--text-secondary)}
.dialog-actions.wrap{flex-wrap:wrap}.ticket-thread{display:grid;gap:10px;max-height:430px;overflow:auto;padding:3px}.ticket-thread article{padding:12px 14px;border:1px solid var(--border);border-radius:11px;background:var(--surface-soft)}.ticket-thread article.admin-reply{background:var(--hover)}.ticket-thread header{display:flex;justify-content:space-between;gap:15px;margin-bottom:6px;font-size:11px;color:var(--text-secondary)}.ticket-thread p{white-space:pre-wrap;overflow-wrap:anywhere}.admin-reply-box{display:grid;gap:10px;margin-top:14px}.admin-reply-box textarea{min-height:100px;resize:vertical}
html[data-theme=dark] :is(.launch-item,.admin-detail-grid>div,.system-grid>article,.settings-admin fieldset,.admin-form-grid fieldset,.ticket-thread article){border-color:var(--border);color:var(--text)}
@media(max-width:700px){.admin-tabs{overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}.admin-tabs button{white-space:nowrap}.admin-filters{display:grid;grid-template-columns:1fr}.admin-filters :is(input,select,.btn){width:100%;min-width:0}.settings-admin .secret-row{grid-template-columns:1fr}.settings-admin .secret-row .btn{width:100%}.data-table-wrap{overflow:auto;-webkit-overflow-scrolling:touch}.data-table{min-width:700px}.admin-detail-grid,.system-grid,.admin-form-grid{grid-template-columns:1fr}.dialog-actions.wrap .btn{flex:1 1 150px}}
.integration-state{margin:12px 0 0;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft);font-size:11px;line-height:1.55;color:var(--text-secondary)}.integration-state b{color:var(--text)}.integration-state small{display:block;margin-top:3px}.system-grid>div{padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft);min-width:0}.system-grid>div span{display:block;color:var(--text-secondary);font-size:11px;margin-bottom:5px}.system-grid>div b{color:var(--text);overflow-wrap:anywhere}

.pix-payment{display:grid;gap:18px}.pix-payment img{width:min(280px,80vw);aspect-ratio:1;object-fit:contain;margin:auto;background:#fff;border-radius:18px;padding:12px}.pix-payment textarea{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;word-break:break-all}.pix-link{border:0;background:none;cursor:pointer;padding:0;margin-left:8px;font:inherit}
