@font-face{font-family:Poppins;src:url('/fx/fonts/Poppins-Regular.ttf') format('truetype');font-weight:400;font-display:swap}

@font-face{font-family:Poppins;src:url('/fx/fonts/Poppins-Medium.ttf') format('truetype');font-weight:500;font-display:swap}

@font-face{font-family:Poppins;src:url('/fx/fonts/Poppins-SemiBold.ttf') format('truetype');font-weight:600;font-display:swap}

:root{font-family:Poppins,Segoe UI,sans-serif;color:#172b49;background:#f4f7fd;font-synthesis:none;--blue:#006bff;--border:#e2e8f1;--muted:#617087}*{box-sizing:border-box}body{margin:0;display:flex;min-height:100vh;font-size:15px}a{color:var(--blue);text-decoration:none}button,input,select,textarea{font:inherit}button,.button{cursor:pointer;border:1px solid #c6d9fb;border-radius:7px;background:white;color:var(--blue);padding:10px 14px}button:hover,.button:hover{background:#edf4ff}button:disabled{opacity:.5;cursor:not-allowed}.primary{background:var(--blue);color:#fff}.primary:hover{background:#0054cb}aside{width:224px;flex-shrink:0;background:white;border-right:1px solid var(--border);padding:28px 22px;display:flex;flex-direction:column;min-height:100vh}.brand{display:flex;align-items:center;gap:12px;color:#172b49;font-weight:600;margin-bottom:38px}.brandmark{display:grid;place-items:center;width:42px;height:42px;background:#fff1f1;border-radius:10px;color:#c9324a;font-weight:800}.eyebrow{font-size:11px;letter-spacing:.09em;color:var(--muted)}nav{display:grid;gap:7px}nav button{text-align:left;color:#172b49}nav button.active{background:#edf4ff;color:var(--blue);border-color:#c4d8ff}.aside-bottom{margin-top:auto;padding-top:36px;display:grid;gap:16px;font-size:13px}#identity{color:var(--muted);line-height:1.6;overflow-wrap:anywhere}.workspace{flex:1;min-width:0}header{margin:0 5%;padding:22px 0;display:flex;gap:32px;align-items:center;border-bottom:1px solid var(--border);background:white}header:before{content:'';position:absolute;z-index:-1;background:white;left:224px;right:0;top:0;height:92px}.products{display:flex;gap:12px}.products a{padding:12px 24px;border:1px solid var(--border);border-radius:7px;color:var(--muted)}.products .selected{background:#edf4ff;border-color:#bcd4ff;color:var(--blue);font-weight:600}.account{margin-left:auto;font-size:13px}main{padding:36px 5%}h1{font-size:30px;margin:8px 0 10px}h2{font-size:21px;margin:0 0 8px}h3{font-size:16px}.description{color:var(--muted);line-height:1.6;margin:0 0 28px}.card{border:1px solid var(--border);border-radius:12px;background:white;overflow:hidden;margin-bottom:20px}.card-head{padding:24px;border-bottom:1px solid var(--border)}.card-body{padding:24px}.toolbar{display:flex;gap:12px;padding:18px 24px;flex-wrap:wrap}input,select,textarea{border:1px solid #cad9ef;border-radius:6px;padding:10px 12px;background:white;color:#172b49;max-width:100%}input[type=search]{min-width:280px}input[type=checkbox]{width:18px;height:18px;accent-color:var(--blue)}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;text-align:left}th{background:#edf4ff;color:#43648d;font-size:12px;font-weight:600;padding:15px 22px}td{padding:18px 22px;border-top:1px solid var(--border);font-size:14px}.muted{color:var(--muted);font-size:12px;display:block;margin-top:5px}.badge{display:inline-block;padding:5px 9px;border-radius:5px;background:#f0f3f8;color:#6a7890;font-size:12px;margin:2px}.badge.good{background:#eaf8f1;color:#087a54}.badge.blue{background:#edf4ff;color:#006bff}.badge.warn{background:#fff5e7;color:#9a6100}.actions{display:flex;gap:7px}.empty{text-align:center;padding:40px;color:var(--muted)}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.metric strong{font-size:30px;display:block;margin-bottom:8px}#notice:not(:empty){padding:12px 16px;background:#fff5e7;color:#775019;border-radius:8px;margin-bottom:20px}dialog{border:1px solid var(--border);border-radius:14px;padding:0;max-width:760px;width:calc(100% - 32px);max-height:90vh}dialog::backdrop{background:#172b4966}.dialog-head{padding:22px 26px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border)}#policy-fields{padding:20px 26px;display:grid;gap:20px}fieldset{border:1px solid var(--border);border-radius:9px;padding:18px}legend{font-weight:600;padding:0 7px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.field{display:grid;gap:7px;font-size:13px}.check{display:flex;align-items:center;gap:10px;margin:8px 0}footer{padding:18px 26px;display:flex;align-items:center;justify-content:space-between;background:#f8faff;border-top:1px solid var(--border);position:sticky;bottom:0}footer span{font-size:12px;color:var(--muted)}#save-error{color:#c9324a;margin:0 26px 16px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;font-size:13px;line-height:1.6}.stack{display:grid;gap:12px}.connect{max-width:680px}.code{font-size:36px;letter-spacing:.15em;font-weight:700;color:var(--blue);padding:20px 0}.note{font-size:13px;line-height:1.6;color:var(--muted)}@media(max-width:950px){aside{width:180px;padding:20px 14px}header{gap:12px;flex-wrap:wrap}.products a{padding:10px 12px}.account{display:none}header:before{left:180px}.metrics{grid-template-columns:1fr}}@media(max-width:650px){body{display:block}aside{width:auto;min-height:0;padding:16px}.brand{margin-bottom:8px}aside>.eyebrow,.aside-bottom{display:none}nav{display:flex;overflow-x:auto}nav button{white-space:nowrap}header{margin:0;padding:16px;display:block}header>span{display:none}.products{justify-content:center}header:before{display:none}main{padding:22px 16px}.grid{grid-template-columns:1fr}footer{gap:12px}.toolbar input[type=search]{min-width:0;width:100%}}



/* Match the existing PolyMaria admin/customer typography and palette. */

body{font-size:15px;line-height:1.6}h1{font-size:32px;font-weight:600;line-height:1.35}h2{font-size:22px;font-weight:600;line-height:1.4}h3,strong,b{font-weight:600}button,.button,label,th{font-weight:500}button,.button,input,select,textarea,td{font-size:15px;line-height:1.5}th,.eyebrow,.badge,.note{font-size:13px}.eyebrow{letter-spacing:0}td{padding:20px 22px}th{color:#172b49}tbody tr:hover td{background:#f4f7fd}.badge{border:1px solid #e2e8f1}.badge.good{background:#eaf7f1;color:#087a54;border-color:#bde5d4}.badge.blue{background:#edf4ff;color:#006bff;border-color:#c8d9f1}.badge.warn{background:#fff6e5;color:#825400;border-color:#ead5aa}.brandmark{object-fit:contain;padding:4px;border:5px solid #dce9f0;background:white;width:52px;height:52px}.brand{font-size:13px;font-weight:500}.products a{min-width:160px;text-align:center}nav button{min-height:49px;border-color:#dce5f2}nav button:before{content:'◇';font-size:17px;color:#274569;margin-right:13px}.description{font-size:15px}.muted{font-size:13px}.card-head{padding:24px}.person{display:flex;align-items:center;gap:12px}.avatar{display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;background:#edf4ff;border-radius:9px;color:#006bff;font-size:12px}.customer-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:24px}.customer-metrics .card-body{padding:22px}.customer-metrics strong{display:block;font-size:24px;margin:8px 0}.account-intro{display:flex;align-items:center;justify-content:space-between;gap:18px}.plan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}.price{font-size:30px;font-weight:600;color:#172b49}.customer-pill{display:inline-block;background:#edf4ff;color:#006bff;padding:6px 12px;border-radius:20px;font-size:13px}@media(max-width:650px){.products a{min-width:0;flex:1}.customer-metrics{grid-template-columns:1fr}.eyebrow{font-size:11px}nav button{min-height:42px}nav button:before{display:none}}



/* Sidebar account controls match the PolyMaria navigation. */

.aside-bottom{gap:8px}.sidebar-action{display:flex;align-items:center;gap:12px;border:1px solid var(--border);border-radius:7px;padding:13px 12px;min-height:48px;color:#172b49;font-size:13px;line-height:1.45}.sidebar-action:hover{background:#edf4ff;border-color:#c4d8ff;color:#006bff}.sidebar-action:focus-visible{outline:2px solid #006bff;outline-offset:2px}.sidebar-action svg{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.sidebar-profile{display:flex;align-items:flex-start;gap:10px;padding:18px 2px 0;margin-top:8px;border-top:1px solid var(--border)}.profile-avatar{width:34px;height:34px;flex-shrink:0;border-radius:8px;background:#edf4ff;color:#006bff;display:grid;place-items:center;font-size:11px}.profile-details{display:grid;gap:5px;min-width:0}.profile-details strong{font-size:12px;line-height:1.65;color:#172b49;font-weight:600}.profile-details span{font-size:11px;color:var(--muted);overflow-wrap:anywhere}#profile-role{font-size:12px}



#nav button:before{content:none;display:none}#nav button{display:flex;align-items:center;gap:12px}#nav button span{min-width:0;text-align:left}.menu-icon{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}



/* GodFather header preferences. */

.workspace-top{gap:18px;flex-wrap:wrap}.header-tools{display:flex;align-items:center;gap:10px;margin-left:auto}.header-tools button{padding:9px 12px;min-height:40px;font-size:13px}.workspace-status{font-size:10px;padding:7px 9px;background:#edf4ff;color:#006bff;border:1px solid #c6d9fb;border-radius:4px;white-space:nowrap}.header-home{font-size:21px;color:var(--muted);padding:4px}#site-preferences{display:flex;gap:8px;align-items:center}#site-preferences button{display:grid;place-items:center;width:42px;height:40px;padding:7px}#site-preferences svg{display:block}.theme-label{display:none}.preference-theme>span:first-child{font-size:19px}#site-preferences button:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

:root[data-theme="dark"]{color-scheme:dark;--blue:#8bbcff;--border:#344257;--muted:#a6b5ca;background:#101722;color:#e6edf7}

:root[data-theme="dark"] :is(body,.workspace){background:#101722;color:#e6edf7}

:root[data-theme="dark"] :is(aside,header,header:before,.card,dialog,footer,button,.button,input,select,textarea){background:#172231;color:#e6edf7;border-color:#344257}

:root[data-theme="dark"] :is(.brand,.profile-details strong,th,nav button){color:#e6edf7}

:root[data-theme="dark"] :is(th,nav button.active,.products .selected,.workspace-status,.profile-avatar,.avatar,.badge.blue){background:#202f46;color:#bcd7ff;border-color:#486184}

:root[data-theme="dark"] :is(button:hover,.button:hover,.sidebar-action:hover,tbody tr:hover td){background:#243952;color:#e6edf7}

:root[data-theme="dark"] .sidebar-action{color:#e6edf7}:root[data-theme="dark"] .products a{color:#bcd7ff}

:root[data-theme="dark"] .primary{background:#006bff;color:#fff;border-color:#006bff}:root[data-theme="dark"] .primary:hover{background:#0054cb}

:root[data-theme="dark"] .badge{background:#263345;color:#c0cede;border-color:#405572}:root[data-theme="dark"] .badge.good{background:#17382f;color:#7dddb5;border-color:#35644f}:root[data-theme="dark"] :is(.badge.warn,#notice:not(:empty)){background:#352c1c;color:#f1cd8b}

@media(max-width:650px){.header-tools{margin:14px 0 0;justify-content:center;flex-wrap:wrap}.header-tools .workspace-status{font-size:9px}}



.info-toolbar{display:flex;gap:12px;margin-bottom:20px}.telemetry-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:20px}.telemetry-meta>div{display:flex;flex-direction:column;gap:8px}.telemetry-meta strong{font-size:14px;overflow-wrap:anywhere}



.telemetry-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.telemetry-metrics .card{margin-bottom:0}@media(max-width:1100px){.telemetry-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.telemetry-metrics{grid-template-columns:1fr}}



.user-info-dialog{width:min(1200px,96vw);max-width:1200px;padding:0;border:1px solid var(--border);border-radius:14px;max-height:92vh;background:var(--surface,#fff);color:var(--text,#172b49)}.user-info-dialog::backdrop{background:#050b16aa;backdrop-filter:blur(3px)}.user-info-dialog .dialog-head{padding:18px;border-bottom:1px solid var(--border)}.user-info-dialog h2{font-size:21px;margin:0}.user-info-body{padding:18px;overflow:auto;max-height:calc(92vh - 80px)}.user-info-body .info-toolbar{justify-content:space-between;align-items:center}.info-choices{display:flex;gap:10px;flex-wrap:wrap}.user-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}.user-info-section{border:1px solid var(--border);border-radius:8px;padding:13px}.user-info-section h3{font-size:17px;margin:0 0 10px}.user-info-section dl{margin:0}.info-row{display:grid;grid-template-columns:1fr 1.25fr;gap:12px;padding:9px 0;border-bottom:1px solid var(--border);font-size:12px}.info-row:last-child{border:0}.info-row dt{color:var(--muted)}.info-row dd{margin:0;text-align:right;overflow-wrap:anywhere}.info-source{padding-left:10px;border-left:2px solid var(--border);font-size:12px;line-height:1.7;color:var(--muted);margin:0 0 16px}[data-theme="dark"] .user-info-dialog{background:#172332;color:#e2ecff}@media(max-width:900px){.user-info-grid{grid-template-columns:1fr}.user-info-body .info-toolbar{align-items:flex-start;flex-direction:column}}



.card-head:has(.fresh-access-button){position:relative;padding-right:300px}.fresh-access-button{position:absolute;right:24px;top:24px}@media(max-width:700px){.card-head:has(.fresh-access-button){padding-right:24px}.fresh-access-button{position:static;margin-top:16px}}



.user-filters{flex-wrap:wrap}.user-filters input{flex:2;min-width:220px}.user-filters select{flex:1;min-width:150px}.user-count{padding:0 24px}.actions{flex-wrap:wrap}



/* Compact permission editor: only the fields scroll; actions remain visible. */

#editor{width:min(740px,calc(100vw - 24px));max-width:740px;max-height:90dvh;overflow:hidden;font-size:13px}

#editor #policy-form{display:flex;flex-direction:column;max-height:90dvh}

#editor .dialog-head{padding:14px 18px;flex-shrink:0}#editor .dialog-head .eyebrow{margin:0 0 4px;font-size:10px}#editor h2{font-size:18px;margin:0}#editor #close-editor{width:32px;height:32px;padding:0}

#editor #policy-fields{padding:14px 18px;gap:12px;overflow-y:auto;min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}

#editor #policy-fields>fieldset:first-of-type{grid-column:1/-1}#editor #policy-fields>.note{grid-column:1/-1;margin:0}

#editor fieldset{padding:10px 12px;margin:0;min-width:0;border-radius:8px}#editor legend{font-size:12px;padding:0 5px}

#editor .grid{gap:9px 12px;align-items:start}#editor .field{gap:5px;font-size:12px;align-content:start;min-width:0}

#editor input:not([type=checkbox]),#editor select{height:35px;padding:6px 9px;width:100%;min-width:0;font-size:12px}

#editor .check{margin:2px 0;gap:7px;font-size:12px;min-height:26px}#editor input[type=checkbox]{width:16px;height:16px;flex-shrink:0}

#editor .note{font-size:11px;line-height:1.5;margin:4px 0;grid-column:1/-1}

#editor fieldset:first-of-type>.grid{grid-template-columns:repeat(3,minmax(0,1fr))}

#editor .expiry-control{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:6px 12px;padding-top:9px;border-top:1px solid var(--border)}

#editor .expiry-control>.field{grid-row:1/3}#editor .expiry-control .toolbar{padding:0;gap:6px;flex-wrap:wrap}#editor .expiry-control button{padding:5px 9px;font-size:11px;min-height:30px}

#editor fieldset:nth-of-type(2)>.grid,#editor fieldset:nth-of-type(3)>.grid{grid-template-columns:1fr}

#editor footer{position:static;padding:12px 18px;gap:12px;flex-shrink:0}#editor footer button{padding:8px 12px;font-size:12px}#editor footer span{font-size:11px}#editor #save-error:empty{display:none}

@media(max-width:560px){#editor #policy-fields{grid-template-columns:1fr;padding:12px;gap:10px}#editor fieldset:first-of-type>.grid{grid-template-columns:1fr 1fr}#editor .expiry-control{grid-row:auto;grid-template-columns:1fr}#editor .expiry-control>.field{grid-row:auto}#editor footer{padding:10px 12px}#editor footer span{max-width:110px}#editor .dialog-head{padding:12px}}



#editor fieldset:first-of-type>.grid>.field:has(input[name=maxDevices]){grid-column:3;grid-row:1}#editor .access-advanced{grid-column:1/-1;border-top:1px solid var(--border);padding-top:9px}#editor .access-advanced>summary{cursor:pointer;font-size:12px;color:var(--muted);padding:4px 0}#editor .access-advanced>fieldset{margin-top:8px}#editor .access-advanced>fieldset>legend{display:none}#editor .access-advanced .grid{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:560px){#editor fieldset:first-of-type>.grid>.field:has(input[name=maxDevices]){grid-column:auto;grid-row:auto}#editor .access-advanced .grid{grid-template-columns:1fr 1fr}}


#editor .access-left-column{display:grid;gap:12px;min-width:0;align-content:start}#editor .access-left-column>fieldset{grid-column:auto}#editor .access-left-column>fieldset:first-child>.grid{grid-template-columns:1fr}#editor .access-left-column>fieldset:last-child>.grid{grid-template-columns:1fr 1fr}#editor #policy-fields>.access-workspaces>.grid{grid-template-columns:1fr}#editor #policy-fields>.access-workspaces{grid-column:2;grid-row:2}#editor #policy-fields:has(>.note)>.access-workspaces{grid-row:3}@media(max-width:560px){#editor #policy-fields>.access-workspaces,#editor #policy-fields:has(>.note)>.access-workspaces{grid-column:auto;grid-row:auto}}

#editor fieldset:first-of-type>.grid{grid-template-columns:repeat(4,minmax(0,1fr))}#editor fieldset:first-of-type>.grid>.field:has(input[name=maxSavedAccounts]){grid-column:4;grid-row:1}@media(max-width:560px){#editor fieldset:first-of-type>.grid{grid-template-columns:1fr 1fr}#editor fieldset:first-of-type>.grid>.field:has(input[name=maxSavedAccounts]){grid-column:auto;grid-row:auto}}

.admin-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.admin-metrics .metric{padding:12px;border:1px solid var(--border);border-radius:8px}.admin-metrics .metric strong{font-size:25px}.table-wrap code{display:block;max-width:240px;overflow-wrap:anywhere;font-size:11px}.table-wrap details{min-width:140px;max-width:440px}.table-wrap summary{cursor:pointer}.preset-bar{grid-column:1/-1;display:flex;gap:12px;align-items:center}.preset-bar select{flex:1}.preset-bar .note{flex:1}#editor #policy-fields:has(>.preset-bar)>.access-workspaces{grid-row:3}@media(max-width:850px){.admin-metrics{grid-template-columns:1fr 1fr}}@media(max-width:560px){.preset-bar{display:grid}#editor #policy-fields:has(>.preset-bar)>.access-workspaces{grid-row:auto}.admin-metrics{gap:8px}}

/* Keep modal content crisp while fading the page behind it. */
#editor::backdrop,.user-info-dialog::backdrop{background:rgba(5,11,22,.62);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
#editor,.user-info-dialog{box-shadow:0 24px 80px rgba(0,0,0,.32)}

.product-plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:24px 0}.product-plan{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:14px;padding:24px;background:white;min-width:0}.product-plan.featured{border:2px solid var(--blue)}.plan-name{font-size:14px;font-weight:600;color:var(--blue);margin:0 0 12px}.plan-price{font-size:36px;margin:0}.product-plan ul{padding-left:18px;font-size:13px;line-height:1.8;flex:1}.plan-checkout{display:grid;gap:10px;margin-top:16px}.plan-error{color:#df6577;font-size:12px;margin:0}#premium-editor{max-height:90vh;overflow:auto}:root[data-theme="dark"] .product-plan{background:#172231}@media(max-width:900px){.product-plan-grid{grid-template-columns:1fr}.product-plan{padding:20px}}

#premium-editor::backdrop{background:rgba(5,11,22,.62);backdrop-filter:blur(4px)}

/* Premium customer account */
:root.premium-account{--blue:#896a32;--border:#d8cebc;--muted:#726b60;--panel:#fffdf7;--ink:#302b24;--base:#f2eee5;--hover:#eae2d2;background:var(--base);color:var(--ink)}
:root.premium-account[data-theme="dark"]{--blue:#d8bd82;--border:#433d31;--muted:#b6afa1;--panel:#1c1c19;--ink:#f1ebdd;--base:#121310;--hover:#302e26;color-scheme:dark}
:root.premium-account[data-theme] body,:root.premium-account[data-theme] .workspace{background:var(--base);color:var(--ink)}
:root.premium-account[data-theme] .workspace{background-image:radial-gradient(ellipse at 90% 0%,#b79a4c14,transparent 55%)}
:root.premium-account[data-theme] aside{background:var(--panel);border-color:var(--border);width:244px;padding:34px 22px;position:sticky;top:0;height:100dvh;min-height:0}
:root.premium-account[data-theme] .brand{font-family:Georgia,serif;font-size:25px;font-weight:400;letter-spacing:.03em;color:var(--ink);gap:10px;margin-bottom:42px}
:root.premium-account[data-theme] .brandmark{width:38px;height:38px;border:1px solid var(--border);border-radius:50%;padding:3px;background:#fff}
:root.premium-account[data-theme] aside>.eyebrow{font-size:10px;letter-spacing:.18em;margin-bottom:18px}
:root.premium-account[data-theme] nav{gap:9px}
:root.premium-account[data-theme] :is(button,.button,input,select,textarea,.sidebar-action){background:var(--panel);color:var(--ink);border-color:var(--border);border-radius:8px;min-height:44px}
:root.premium-account[data-theme] :is(button:hover,.button:hover,.sidebar-action:hover){background:var(--hover);color:var(--blue);border-color:var(--blue)}
:root.premium-account[data-theme] nav button{border-color:transparent;padding:13px 15px;color:var(--muted)}
:root.premium-account[data-theme] nav button.active{background:var(--hover);color:var(--blue);border-color:var(--border);box-shadow:inset 3px 0 var(--blue)}
:root.premium-account[data-theme] :is(.profile-details strong,.price){color:var(--ink)}
:root.premium-account[data-theme] :is(.avatar,.profile-avatar,.customer-pill,.workspace-status,.products .selected){background:var(--hover);color:var(--blue);border-color:var(--border)}
:root.premium-account[data-theme] header{background:transparent;padding:24px 0;gap:18px;margin:0 4%;border-color:var(--border)}
:root.premium-account[data-theme] header:before{display:none}
:root.premium-account[data-theme] header>span{font-size:11px;color:var(--muted)}
:root.premium-account[data-theme] .products{gap:8px}
:root.premium-account[data-theme] .products a{min-width:0;padding:9px 13px;font-size:11px;color:var(--muted);border-color:var(--border)}
:root.premium-account[data-theme] .products .selected{color:var(--blue)}
:root.premium-account[data-theme] main{padding:40px 4%;max-width:1600px;margin:auto}
:root.premium-account[data-theme] h1{font-family:'Baskerville Old Face',Palatino,Georgia,serif;font-size:clamp(32px,3.3vw,48px);font-weight:400;letter-spacing:-.025em;line-height:1.18}
:root.premium-account[data-theme] h2{font-family:Georgia,serif;font-size:23px;font-weight:400;color:var(--ink)}
:root.premium-account[data-theme] .description{max-width:650px;font-size:13px;margin-bottom:32px}
:root.premium-account[data-theme] :is(.card,.product-plan,dialog,footer){background:var(--panel);color:var(--ink);border-color:var(--border);box-shadow:0 8px 28px #00000008}
:root.premium-account[data-theme] .card{border-radius:14px}
:root.premium-account[data-theme] .customer-metrics{gap:16px}
:root.premium-account[data-theme] .customer-metrics .card{border-top:2px solid var(--blue);margin-bottom:0}
:root.premium-account[data-theme] .customer-metrics strong{font-family:Georgia,serif;font-size:30px;font-weight:400;line-height:1.3;margin:15px 0}
:root.premium-account[data-theme] #content:has(.customer-metrics){position:relative;isolation:isolate}
:root.premium-account[data-theme] #content:has(.customer-metrics):before{content:'';position:absolute;z-index:-1;right:0;top:-24px;width:58%;height:180px;background:linear-gradient(90deg,var(--base),transparent),url('/fx/angel-desktop.webp') center 30%/cover;opacity:.16;pointer-events:none;mask-image:linear-gradient(#000,transparent)}
:root.premium-account[data-theme] .primary{background:#d8bd82;color:#211e17;border-color:#d8bd82;font-weight:600}
:root.premium-account[data-theme] .primary:hover{background:#eed6a0;color:#211e17;border-color:#eed6a0}
:root.premium-account[data-theme] .product-plan{padding:28px;border-radius:14px}
:root.premium-account[data-theme] .product-plan.featured{border:1px solid var(--blue);box-shadow:0 0 0 3px #b69b5720,0 16px 40px #00000012;background:linear-gradient(150deg,#bfa36516,transparent 60%),var(--panel)}
:root.premium-account[data-theme] .plan-name{color:var(--blue);letter-spacing:.13em;text-transform:uppercase;font-size:11px}
:root.premium-account[data-theme] .plan-price{font-family:Georgia,serif;font-size:44px;font-weight:400}
:root.premium-account[data-theme] .product-plan li{padding:5px 0;color:var(--muted)}
:root.premium-account[data-theme] :is(th,tbody tr:hover td){background:var(--hover);color:var(--ink)}
:root.premium-account[data-theme] .badge{background:var(--hover);color:var(--muted);border-color:var(--border);padding:6px 10px}
:root.premium-account[data-theme] .badge.blue{background:var(--hover);color:var(--blue);border-color:var(--border)}
:root.premium-account[data-theme] .badge.good{background:#1e392d;color:#a4dbb6;border-color:#3f6550}
:root.premium-account[data-theme] :is(.badge.warn,#notice:not(:empty)){background:#3c3020;color:#efd39d;border-color:#735c35}
:root.premium-account[data-theme] :is(input,select,textarea):focus-visible,:root.premium-account[data-theme] :is(a,button):focus-visible{outline:2px solid var(--blue);outline-offset:3px}
:root.premium-account[data-theme] textarea{min-height:150px;resize:vertical}
:root.premium-account[data-theme] dialog::backdrop{background:#090a08b8}
@media(max-width:1100px){:root.premium-account[data-theme] aside{width:210px;padding:26px 16px}:root.premium-account[data-theme] header>span{display:none}}
@media(max-width:650px){:root.premium-account[data-theme] aside{position:static;height:auto;width:100%;padding:18px 16px;border-right:0;border-bottom:1px solid var(--border)}:root.premium-account[data-theme] .brand{margin-bottom:16px;font-size:23px}:root.premium-account[data-theme] nav{gap:5px;padding-bottom:4px}:root.premium-account[data-theme] nav button{padding:10px 13px;font-size:12px;flex-shrink:0}:root.premium-account[data-theme] header{margin:0;padding:16px}:root.premium-account[data-theme] main{padding:28px 16px}:root.premium-account[data-theme] .header-tools{justify-content:space-between;gap:7px}:root.premium-account[data-theme] .customer-metrics{gap:10px}:root.premium-account[data-theme] .customer-metrics .card-body{padding:16px 20px}:root.premium-account[data-theme] .customer-metrics strong{margin:6px 0;font-size:25px}:root.premium-account[data-theme] .card-body,:root.premium-account[data-theme] .card-head{padding:20px}:root.premium-account[data-theme] #content:has(.customer-metrics):before{display:none}:root.premium-account[data-theme] .product-plan{padding:22px}:root.premium-account[data-theme] .workspace-status{font-size:8px}}

/* Customer header uses product navigation without a duplicate breadcrumb. */
:root.premium-account[data-theme] .workspace-top>span:first-child{display:none}

/* Admin density and editing surfaces within the shared premium design. */
:root.premium-admin[data-theme] aside{overflow-y:auto}
:root.premium-admin[data-theme] nav{gap:5px}
:root.premium-admin[data-theme] nav button{padding:10px 12px;min-height:44px;font-size:13px}
:root.premium-admin[data-theme] .brand{margin-bottom:24px}
:root.premium-admin[data-theme] .admin-metrics .metric{background:var(--panel);border-top:2px solid var(--blue);padding:18px}
:root.premium-admin[data-theme] .metric strong{font-family:Georgia,serif;font-weight:400;color:var(--ink)}
:root.premium-admin[data-theme] :is(.user-info-dialog,#editor,#premium-editor){background:var(--panel);color:var(--ink)}
:root.premium-admin[data-theme] #editor :is(input,select){min-height:35px}
:root.premium-admin[data-theme] .table-wrap th button{font-size:12px;padding:5px 8px;min-height:34px;background:transparent}
:root.premium-admin[data-theme] .table-wrap td{font-size:13px}
:root.premium-admin[data-theme] .danger{color:#ee9f9f;border-color:#855050}
@media(max-width:650px){:root.premium-admin[data-theme] aside{overflow-y:visible}:root.premium-admin[data-theme] nav{overflow-x:auto}:root.premium-admin[data-theme] .admin-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}:root.premium-admin[data-theme] .toolbar{padding:16px;gap:8px}}

:root.premium-account[data-theme] .brandmark{background:transparent;border:0;border-radius:0;padding:0;width:48px;height:48px;object-fit:contain}

body.auth-page>aside{display:none}body.auth-page .workspace{margin-left:0;max-width:1440px;margin-inline:auto}.auth-layout{display:grid;grid-template-columns:1.2fr 1fr;gap:clamp(32px,6vw,100px);align-items:center;max-width:1140px;margin:60px auto}.auth-art{min-height:440px;border-radius:16px;padding:40px;display:flex;flex-direction:column;justify-content:flex-end;background:linear-gradient(0deg,#171711cc,#17171110),url('/fx/angel-desktop.webp') center/cover;color:#fff8e9}.auth-art h1{font:400 38px/1.15 Georgia,serif;max-width:370px;margin:8px 0 20px}.auth-art p{max-width:390px}.auth-art .eyebrow{color:#e1ca98}.auth-panel{padding:32px;border:1px solid #b89b6555;border-radius:15px;background:var(--panel,#fffdf7)}.auth-panel h2{font:400 36px/1.2 Georgia,serif;margin:0 0 16px}.auth-panel>.button,.auth-panel>button{display:flex;width:100%;justify-content:center;margin-top:14px}.auth-google{gap:10px;margin-top:26px!important}.google-mark{font:bold 21px Arial;color:#4285f4}.auth-form{display:grid;gap:18px;margin-top:28px}.auth-form label{display:grid;gap:8px}.auth-form input{width:100%;min-height:46px}.auth-form .auth-terms{display:flex;align-items:center;flex-wrap:wrap;font-size:12px}.auth-terms input{width:16px;min-height:16px}.auth-error{color:#c44343;margin:0}.auth-error:empty{display:none}.auth-form button{min-height:48px}.auth-panel>.note{font-size:13px}@media(max-width:760px){.auth-layout{grid-template-columns:1fr;margin:24px auto;gap:24px}.auth-art{min-height:240px;padding:24px}.auth-art h1{font-size:30px}.auth-panel{padding:24px}.auth-page .workspace{width:100%}}

:root.premium-admin[data-theme] .card:has(.user-filters) td{padding:9px 12px;font-size:12px;line-height:1.35;vertical-align:middle}
:root.premium-admin[data-theme] .card:has(.user-filters) th{padding:9px 12px;white-space:nowrap}
:root.premium-admin[data-theme] .card:has(.user-filters) th button{padding:3px 5px;min-height:28px;font-size:11px}
:root.premium-admin[data-theme] .card:has(.user-filters) td button{padding:5px 9px;min-height:30px;font-size:12px;white-space:nowrap}
:root.premium-admin[data-theme] .card:has(.user-filters) .actions{flex-wrap:nowrap;gap:5px}
:root.premium-admin[data-theme] .card:has(.user-filters) .badge{padding:3px 6px;font-size:11px;margin:1px;white-space:nowrap}
:root.premium-admin[data-theme] .card:has(.user-filters) .person{gap:9px}
:root.premium-admin[data-theme] .card:has(.user-filters) .avatar{width:28px;height:28px;font-size:10px;border-radius:6px}
:root.premium-admin[data-theme] .card:has(.user-filters) .muted{font-size:11px;margin-top:2px}
:root.premium-admin[data-theme] .card:has(.user-filters) td:first-child{min-width:220px}
:root.premium-admin[data-theme] .card:has(.user-filters) td:nth-child(4){white-space:nowrap}
:root.premium-admin[data-theme] .card:has(.user-filters) .table-wrap{max-height:65vh;overflow:auto}
:root.premium-admin[data-theme] .card:has(.user-filters) thead{position:sticky;top:0;z-index:1}

:root.premium-admin[data-theme] .card:has(.user-filters) td .client-info-icon{width:22px;height:22px;min-height:22px;padding:0;flex-shrink:0;border-radius:50%;font:600 12px Georgia,serif;display:grid;place-items:center;margin-left:2px}

.products a{display:inline-flex;align-items:center;gap:9px}.products .product-tab-icon{width:18px;height:18px;flex:0 0 18px}

/* Semantic colors for the shared customer directory in GodFather admin. */
:root.premium-admin[data-theme] .cm-directory .cm-manage{background:#245caa;color:#fff;border-color:#245caa}
:root.premium-admin[data-theme] .cm-directory .cm-manage:hover{background:#194984;border-color:#194984}
:root.premium-admin[data-theme] .cm-directory .cm-delete{background:#a93646;color:#fff;border-color:#a93646}
:root.premium-admin[data-theme] .cm-directory .cm-delete:hover{background:#892939;border-color:#892939}
:root.premium-admin[data-theme] .cm-directory .cm-status-active{background:#e9f2d5;color:#355d1c;border-color:#adc681}
:root.premium-admin[data-theme] .cm-directory .cm-access-demo{background:#e8effb;color:#244f92;border-color:#b3c8e8}
:root.premium-admin[data-theme] .cm-directory .cm-access-real{background:#e9f2d5;color:#355d1c;border-color:#adc681}
:root.premium-admin[data-theme] .cm-directory .cm-access-ai{background:#eee9fa;color:#634392;border-color:#c9b8e5}
:root.premium-admin[data-theme] .cm-directory :is(.cm-status-expired,.cm-status-suspended,.cm-status-banned,.cm-status-inactive){background:#fae7e9;color:#912f40;border-color:#deb0b8}
:root.premium-admin[data-theme=dark] .cm-directory :is(.cm-status-active,.cm-access-real){background:#293923;color:#c5e89c;border-color:#536b3d}
:root.premium-admin[data-theme=dark] .cm-directory .cm-access-demo{background:#23344e;color:#b4d0fc;border-color:#46648c}
:root.premium-admin[data-theme=dark] .cm-directory .cm-access-ai{background:#362b49;color:#d8c0ff;border-color:#685082}
:root.premium-admin[data-theme=dark] .cm-directory :is(.cm-status-expired,.cm-status-suspended,.cm-status-banned,.cm-status-inactive){background:#48292f;color:#ffbec9;border-color:#80505b}

/* Compact customer wallet below the brand. */
aside>.sidebar-wallet{display:flex;flex-direction:column;gap:4px;margin:16px 0 0;padding:10px 12px;border:1px solid currentColor;border-radius:9px;text-decoration:none;color:inherit;line-height:1.4}
aside>.sidebar-wallet span{font-size:11px;opacity:.75}
aside>.sidebar-wallet strong{font-size:16px;font-variant-numeric:tabular-nums}
aside>.sidebar-wallet:hover{background:rgba(180,145,65,.12)}
aside>.sidebar-wallet:focus-visible{outline:2px solid currentColor;outline-offset:3px}
aside>.sidebar-wallet+.eyebrow{margin-top:18px}

.wallet-body{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(0,1.7fr);gap:28px;padding:24px}
.wallet-summary{padding:22px;border-radius:12px;background:rgba(180,145,65,.10);align-self:stretch;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}
.wallet-eyebrow{font-size:10px;letter-spacing:.12em;opacity:.7}
.wallet-summary h2{margin:10px 0 0;font-size:32px;font-variant-numeric:tabular-nums;line-height:1.3}
.wallet-summary .note{margin:8px 0 20px}
.wallet-funding h3{margin:0 0 6px;font-size:17px}
.wallet-funding>.note{margin:0 0 18px}
.wallet-card .wallet-topup{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.wallet-topup label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:500;min-width:0}
.wallet-topup input,.wallet-topup select{width:100%;min-width:0;box-sizing:border-box}
.wallet-topup>.primary,.wallet-topup>.plan-error{grid-column:1/-1}
.wallet-topup>.plan-error:empty{display:none}
.wallet-funding .wallet-topup+.note{margin:14px 0 0;font-size:11px;line-height:1.7}
.wallet-terms{padding:14px 24px;margin:0;border-top:1px solid rgba(150,130,90,.2);font-size:11px}
.wallet-plan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;padding:22px}
.wallet-plan-grid .wallet-plan{border:1px solid rgba(150,130,90,.3);border-radius:12px;padding:20px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}
.wallet-plan>strong{font-size:16px}.wallet-plan>.note{margin:0;font-size:12px}
.wallet-plan-price{font-size:23px;font-weight:600;margin:8px 0 10px;font-variant-numeric:tabular-nums}
.wallet-plan>button{width:100%;margin-top:auto}.wallet-plan>button:disabled{opacity:.65}
@media(max-width:760px){.wallet-body{grid-template-columns:1fr;padding:16px;gap:20px}.wallet-summary{padding:18px}.wallet-summary h2{font-size:28px}.wallet-plan-grid{grid-template-columns:1fr;padding:16px}.wallet-terms{padding:14px 16px}}

.admin-wallet-credit{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:12px}.admin-wallet-credit>strong,.admin-wallet-credit>.note{grid-column:1/-1}.admin-wallet-credit>label{display:flex;flex-direction:column;gap:6px}.admin-wallet-credit>button{align-self:end}@media(max-width:600px){.admin-wallet-credit{grid-template-columns:1fr}}

#editor .dialog-head{gap:16px;flex-wrap:wrap}#editor .customer-header-balance{margin-left:auto;display:flex;flex-direction:column;gap:3px;border:1px solid rgba(150,130,90,.35);border-radius:9px;padding:8px 14px;background:rgba(180,145,65,.08)}.customer-header-balance span{font-size:10px;opacity:.75}.customer-header-balance strong{font-size:15px;font-variant-numeric:tabular-nums}@media(max-width:500px){#editor .customer-header-balance{padding:6px 10px}.customer-header-balance strong{font-size:13px}}

.referral-body{padding:24px;display:grid;gap:22px}.referral-stats{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:20px 24px;border-radius:12px;background:rgba(180,145,65,.1)}.referral-stats>div{display:flex;flex-direction:column;gap:6px}.referral-stats span{font-size:12px;opacity:.75}.referral-stats strong{font-size:28px;font-variant-numeric:tabular-nums}.referral-rewards{display:grid;grid-template-columns:1fr 1fr;gap:16px}.referral-reward{border:1px solid rgba(150,130,90,.3);border-radius:12px;padding:18px}.referral-reward-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.referral-reward-head strong{font-size:14px}.referral-status{font-size:10px;border-radius:20px;padding:4px 10px;background:rgba(130,130,130,.12)}.referral-status.enabled{background:rgba(100,160,85,.15);color:#568044}.referral-reward-value{font-size:22px;font-weight:600;margin:14px 0 5px}.referral-reward .note{margin:0;font-size:12px}.referral-share>label{font-size:12px;font-weight:600;display:block;margin-bottom:8px}.referral-link-row{display:flex;gap:10px}.referral-link-row input{flex:1;min-width:0;font-size:13px}.referral-link-row button{flex-shrink:0}.referral-share>.note{font-size:11px;margin:10px 0 0}.referral-share>.note:empty{display:none}.referral-empty{padding:30px 24px;text-align:center}.referral-empty strong{font-size:15px}.referral-empty .note{margin:8px 0 0}.referral-details{padding:0 4px}.referral-details summary{font-size:12px;cursor:pointer}.referral-details .note{max-width:850px}@media(max-width:650px){.referral-body{padding:16px;gap:16px}.referral-stats{padding:16px;gap:12px}.referral-stats strong{font-size:20px}.referral-rewards{grid-template-columns:1fr}.referral-link-row{flex-direction:column}}

.cm-wallet-balance{white-space:nowrap;font-variant-numeric:tabular-nums;font-size:12px}

/* Payment invoice popup */
.payment-invoice-dialog{max-width:480px;box-shadow:0 24px 80px #0005;color:inherit}.payment-invoice-dialog::backdrop{background:#090a08b8;backdrop-filter:blur(4px)}.payment-invoice-dialog .dialog-head{padding:18px 22px;gap:14px}.payment-invoice-dialog h2{font-size:20px;margin:0}.payment-invoice-body{padding:22px;gap:10px}.payment-invoice-body p{margin:0}.payment-invoice-body .badge{justify-self:start;text-transform:capitalize}.payment-invoice-total{font-size:30px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.payment-invoice-qr{width:224px;max-width:100%;justify-self:center;background:#fff;padding:8px;border-radius:12px;margin:4px 0}.payment-invoice-qr svg{display:block;width:100%;height:auto}.payment-invoice-address{margin:0;padding:12px;border:1px solid var(--border);border-radius:8px;user-select:all;overflow-wrap:anywhere}.payment-invoice-actions{display:flex;gap:10px;flex-wrap:wrap}.payment-invoice-actions button{flex:1}.payment-invoice-body [role=status]:empty{display:none}@media(max-width:480px){.payment-invoice-dialog .dialog-head{padding:16px}.payment-invoice-body{padding:16px}.payment-invoice-total{font-size:26px}}
.payment-invoice-dialog .dialog-head{position:sticky;top:0;z-index:1;background:inherit}

/* Telegram support shortcut */
.telegram-bubble{position:fixed;right:24px;bottom:24px;z-index:40;display:grid;place-items:center;width:54px;height:54px;border-radius:50%;background:#159bd0;color:#fff;box-shadow:0 5px 20px #0003;transition:transform .15s,background .15s}.telegram-bubble svg{width:29px;height:29px}.telegram-bubble:hover{background:#0887ba;transform:translateY(-2px)}.telegram-bubble:focus-visible{outline:3px solid #159bd0;outline-offset:4px}@media(max-width:650px){.telegram-bubble{right:16px;bottom:calc(16px + env(safe-area-inset-bottom));width:50px;height:50px}}@media(prefers-reduced-motion:reduce){.telegram-bubble{transition:none}}

/* Referral admin reward form */
.referral-admin-form{gap:22px}.referral-reward-group{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;padding:22px;min-width:0}.referral-reward-group legend{padding:0 8px;font-size:15px}.referral-reward-group .referral-enable{grid-column:1/-1;display:flex;align-items:center;gap:10px;font-size:14px;cursor:pointer;margin:0}.referral-enable input[type=checkbox]{margin:0;flex:0 0 18px}.referral-reward-group .field{gap:9px;align-content:start;min-width:0;font-size:13px}.referral-reward-group .field :is(input,select){width:100%;min-width:0;max-width:none}.referral-reward-group .note{grid-column:1/-1;margin:0}.referral-admin-form>button{justify-self:end;min-width:220px}.referral-admin-form>.note:empty{display:none}@media(max-width:800px){.referral-reward-group{grid-template-columns:1fr;padding:18px;gap:18px}.referral-admin-form>button{width:100%;min-width:0}}

.manual-receipt-upload{border-top:1px solid var(--border);padding-top:16px;margin-top:6px}.manual-receipt-upload summary{cursor:pointer;font-weight:600;font-size:14px}.manual-receipt-upload form{margin-top:14px}.manual-receipt-upload input{min-width:0;width:100%}.manual-telegram{padding-top:10px}.manual-telegram a{text-align:center}.manual-review-dialog{max-width:720px}.manual-proof-image{display:block;max-width:100%;max-height:50vh;object-fit:contain;margin:auto;border:1px solid var(--border);border-radius:8px}.manual-review-actions{display:flex;gap:10px;flex-wrap:wrap}.manual-review-dialog .check{align-items:flex-start}.manual-review-dialog .check input{flex-shrink:0}.manual-review-dialog pre{margin:0}.manual-review-dialog textarea{width:100%;min-height:80px}@media(max-width:600px){.manual-review-actions button{width:100%}.manual-review-dialog .dialog-head{padding:16px;gap:12px}.manual-review-dialog .card-body{padding:16px}}

/* Compact administration: scoped away from customer and public pages. */
:root.premium-admin[data-theme] {--admin-blue:#356cb0;--admin-green:#26734d;--admin-purple:#7755ad;--admin-amber:#946922;font-size:13px}
:root.premium-admin[data-theme] h1{font-size:30px!important;margin:0 0 8px!important;line-height:1.2}
:root.premium-admin[data-theme] h2{font-size:20px!important;margin:0 0 6px}
:root.premium-admin[data-theme] h3{font-size:16px}
:root.premium-admin[data-theme] :is(.card,.panel){margin-bottom:14px;border-radius:10px}
:root.premium-admin[data-theme] :is(.card-head,.panel-head){padding:12px 16px!important;background:color-mix(in srgb,var(--admin-blue) 5%,transparent);border-bottom:1px solid var(--border,#d8cebc)}
:root.premium-admin[data-theme] :is(.card-body,.panel-body){padding:16px!important}
:root.premium-admin[data-theme] :is(.toolbar,.settings-section){padding:12px 16px!important}
:root.premium-admin[data-theme] :is(.grid,.metrics,.two-col){gap:12px}
:root.premium-admin[data-theme] .stack{gap:10px}
:root.premium-admin[data-theme] :is(button,input,select,textarea){font-size:13px}
:root.premium-admin[data-theme] :is(button,input:not([type=checkbox]):not([type=radio]),select){min-height:36px;padding:7px 10px}
:root.premium-admin[data-theme] :is(td,th){padding:8px 10px;font-size:12px}
:root.premium-admin[data-theme] :is(.workspace-head,.section-heading){margin-bottom:16px;gap:12px}
:root.premium-admin[data-theme] :is(.metrics,.customer-metrics) > :nth-child(4n+1){border-top:3px solid var(--admin-blue)}
:root.premium-admin[data-theme] :is(.metrics,.customer-metrics) > :nth-child(4n+2){border-top:3px solid var(--admin-green)}
:root.premium-admin[data-theme] :is(.metrics,.customer-metrics) > :nth-child(4n+3){border-top:3px solid var(--admin-purple)}
:root.premium-admin[data-theme] :is(.metrics,.customer-metrics) > :nth-child(4n+4){border-top:3px solid var(--admin-amber)}
:root.premium-admin[data-theme] .referral-admin-form :is(.referral-reward-group,.referral-field-grid){gap:12px;padding:12px}
@media(max-width:700px){:root.premium-admin[data-theme] h1{font-size:26px!important}:root.premium-admin[data-theme] :is(button,input:not([type=checkbox]):not([type=radio]),select){min-height:44px}:root.premium-admin[data-theme] :is(.card-body,.panel-body){padding:12px!important}}

:root.premium-admin[data-theme] main{padding:22px 3%;width:100%;max-width:none}
:root.premium-admin[data-theme] header{padding:12px 0;margin:0 3%;gap:16px}
:root.premium-admin[data-theme] aside{padding:20px 16px}
:root.premium-admin[data-theme] nav button{padding:8px 10px;min-height:36px;font-size:13px}
:root.premium-admin[data-theme] .brand{font-size:25px;margin-bottom:24px}
:root.premium-admin[data-theme] #content > .eyebrow{margin:0 0 8px}
:root.premium-admin[data-theme] #content > p{margin:6px 0 18px}

:root.premium-admin[data-theme] .managed-ai{--ai-surface:#fffdf7;--ai-line:#d8cebc;--ai-muted:#746b60;--ai-blue:#356cb0;--ai-green:#26734d;--ai-red:#b13c39;--ai-purple:#7755ad;--ai-amber:#946922}
:root.premium-admin[data-theme=dark] .managed-ai{--ai-surface:#20231f;--ai-line:#494c42;--ai-muted:#b9b7ac;--ai-blue:#8cb8ff;--ai-green:#83d3a5;--ai-red:#ffa5a0;--ai-purple:#c5afff;--ai-amber:#e6bf76}
:root.premium-admin[data-theme] .managed-ai :is(.ai-heading,.ai-key-head,.ai-key-actions,.ai-savebar){display:flex;align-items:center;justify-content:space-between;gap:10px}
:root.premium-admin[data-theme] .managed-ai .ai-heading{margin-bottom:16px}
:root.premium-admin[data-theme] .managed-ai p{margin:4px 0;font-size:13px;line-height:1.5}
:root.premium-admin[data-theme] .managed-ai .ai-section-head{padding:12px 16px;border-bottom:1px solid var(--ai-line);background:color-mix(in srgb,var(--ai-blue) 5%,var(--ai-surface))}
:root.premium-admin[data-theme] .managed-ai .ai-section-body{padding:14px 16px}
:root.premium-admin[data-theme] .managed-ai :is(.ai-key-grid,.ai-editor-grid,.ai-fields,.ai-budget-grid){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
:root.premium-admin[data-theme] .managed-ai :is(.ai-key-card,.ai-editor-card){min-width:0;margin:0;padding:12px;border:1px solid var(--ai-line);border-radius:8px;background:var(--ai-surface)}
:root.premium-admin[data-theme] .managed-ai .ai-key-card{border-top:3px solid var(--ai-purple)}
:root.premium-admin[data-theme] .managed-ai .ai-provider-deepseek{border-top-color:var(--ai-blue)}
:root.premium-admin[data-theme] .managed-ai .ai-key-head{margin-bottom:10px}
:root.premium-admin[data-theme] .managed-ai .ai-provider-openai strong{color:var(--ai-purple)}
:root.premium-admin[data-theme] .managed-ai .ai-provider-deepseek strong{color:var(--ai-blue)}
:root.premium-admin[data-theme] .managed-ai .ai-field{display:flex;flex-direction:column;align-items:stretch;gap:5px;min-width:0;font-size:12px;margin:0;font-weight:500}
:root.premium-admin[data-theme] .managed-ai .ai-field :is(input,select){width:100%;min-width:0;max-width:none;box-sizing:border-box;margin:0}
:root.premium-admin[data-theme] .managed-ai .ai-check{display:flex;align-items:center;gap:8px;margin:12px 0;font-size:13px}
:root.premium-admin[data-theme] .managed-ai .ai-check input{width:17px;height:17px;min-height:17px;margin:0;accent-color:var(--ai-green)}
:root.premium-admin[data-theme] .managed-ai :is(small,.ai-help,.ai-feedback){color:var(--ai-muted);font-size:12px;font-weight:400}
:root.premium-admin[data-theme] .managed-ai .ai-key-actions{justify-content:flex-start;margin-top:10px}
:root.premium-admin[data-theme] .managed-ai .ai-feedback:empty{display:none}
:root.premium-admin[data-theme] .managed-ai .ai-status{padding:4px 8px;border-radius:20px;font:600 11px/1.4 Arial,sans-serif;white-space:nowrap;background:color-mix(in srgb,var(--ai-muted) 12%,transparent);color:var(--ai-muted)}
:root.premium-admin[data-theme] .managed-ai .ai-status.is-ready{color:var(--ai-green);background:color-mix(in srgb,var(--ai-green) 12%,transparent)}
:root.premium-admin[data-theme] .managed-ai .ai-remove{color:var(--ai-red)!important;background:transparent!important;border-color:color-mix(in srgb,var(--ai-red) 35%,var(--ai-line))!important}
:root.premium-admin[data-theme] .managed-ai .is-error{color:var(--ai-red)}
:root.premium-admin[data-theme] .managed-ai .ai-advanced{margin:12px 0 8px;border-top:1px solid var(--ai-line);padding-top:8px}
:root.premium-admin[data-theme] .managed-ai summary{cursor:pointer;font-size:12px;font-weight:600;padding:5px 0;color:var(--ai-blue)}
:root.premium-admin[data-theme] .managed-ai .ai-advanced[open] > :nth-child(2){margin-top:10px}
:root.premium-admin[data-theme] .managed-ai .ai-budget-usage{padding:12px 14px;border-radius:8px;border-left:3px solid var(--ai-amber);background:color-mix(in srgb,var(--ai-amber) 8%,var(--ai-surface));display:flex;flex-direction:column;gap:4px}
:root.premium-admin[data-theme] .managed-ai .ai-budget-usage > span{font-size:10px;letter-spacing:.06em;color:var(--ai-amber)}
:root.premium-admin[data-theme] .managed-ai .ai-budget-usage strong{font-size:24px;color:var(--ai-amber)}
:root.premium-admin[data-theme] .managed-ai .ai-add{margin-top:12px;width:auto;color:var(--ai-blue)!important}
:root.premium-admin[data-theme] .managed-ai .ai-savebar{position:sticky;bottom:12px;background:var(--ai-surface);border:1px solid var(--ai-line);box-shadow:0 3px 16px #0001;padding:10px 14px;border-radius:8px;margin:0 0 14px;z-index:2}
:root.premium-admin[data-theme] .managed-ai .table-scroll{overflow-x:auto}
@media(max-width:850px){:root.premium-admin[data-theme] .managed-ai :is(.ai-key-grid,.ai-editor-grid){grid-template-columns:1fr}}
@media(max-width:700px){:root.premium-admin[data-theme] main{padding:18px 12px}:root.premium-admin[data-theme] .managed-ai .ai-budget-grid{grid-template-columns:1fr}:root.premium-admin[data-theme] .managed-ai .ai-savebar{flex-wrap:wrap;bottom:6px}:root.premium-admin[data-theme] .managed-ai .ai-savebar button{width:100%}:root.premium-admin[data-theme] nav button,html[data-theme] body.admin-regular .side-link{min-height:44px}}
@media(max-width:400px){:root.premium-admin[data-theme] .managed-ai .ai-fields{grid-template-columns:1fr}}

/* Native checkbox behavior with a compact ON/OFF switch presentation. */
:root.premium-admin[data-theme] input[type="checkbox"]{appearance:none!important;-webkit-appearance:none!important;position:relative;display:inline-block;box-sizing:border-box;width:60px!important;min-width:60px!important;max-width:60px!important;height:28px!important;min-height:28px!important;flex:0 0 60px!important;padding:0!important;margin:0;vertical-align:middle;border:1px solid #777d83!important;border-radius:99px!important;background:#656c74!important;cursor:pointer;transition:background-color .16s,border-color .16s}
:root.premium-admin[data-theme] input[type="checkbox"]::before{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:transform .16s}
:root.premium-admin[data-theme] input[type="checkbox"]::after{content:"OFF";position:absolute;right:5px;top:0;font:700 9px/26px Arial,sans-serif;color:#fff;letter-spacing:0}
:root.premium-admin[data-theme] input[type="checkbox"]:checked{background:#24764d!important;border-color:#24764d!important}
:root.premium-admin[data-theme] input[type="checkbox"]:checked::before{transform:translateX(32px)}
:root.premium-admin[data-theme] input[type="checkbox"]:checked::after{content:"ON";right:auto;left:7px}
:root.premium-admin[data-theme] input[type="checkbox"]:focus-visible{outline:3px solid #438bdd!important;outline-offset:3px}
:root.premium-admin[data-theme] input[type="checkbox"]:disabled{opacity:.5;cursor:not-allowed}
@media(prefers-reduced-motion:reduce){:root.premium-admin[data-theme] input[type="checkbox"],:root.premium-admin[data-theme] input[type="checkbox"]::before{transition:none}}
@media(forced-colors:active){:root.premium-admin[data-theme] input[type="checkbox"]{appearance:auto!important;-webkit-appearance:auto!important}:root.premium-admin[data-theme] input[type="checkbox"]::before,:root.premium-admin[data-theme] input[type="checkbox"]::after{display:none}}

/* Compact customer workspace, isolated from administration and public pages. */
:root.premium-account:not(.premium-admin)[data-theme]{--user-blue:#356cb0;--user-green:#26734d;--user-purple:#7755ad;--user-amber:#946922}
:root.premium-account:not(.premium-admin)[data-theme=dark]{--user-blue:#8cb8ff;--user-green:#83d3a5;--user-purple:#c5afff;--user-amber:#e6bf76}
:root.premium-account:not(.premium-admin)[data-theme] h1{font-size:30px!important;line-height:1.2!important;margin:0 0 8px!important}
:root.premium-account:not(.premium-admin)[data-theme] h2{font-size:20px!important;line-height:1.3;margin:0 0 8px}
:root.premium-account:not(.premium-admin)[data-theme] h3{font-size:15px}
:root.premium-account:not(.premium-admin)[data-theme] p{font-size:14px!important;line-height:1.5!important}
:root.premium-account:not(.premium-admin)[data-theme] :is(.card,.panel){margin-bottom:14px;border-radius:10px}
:root.premium-account:not(.premium-admin)[data-theme] :is(.card-head,.panel-head){padding:12px 16px!important;background:color-mix(in srgb,var(--user-blue) 6%,transparent)}
:root.premium-account:not(.premium-admin)[data-theme] :is(.card-body,.panel-body){padding:16px!important}
:root.premium-account:not(.premium-admin)[data-theme] :is(.grid,.metrics,.two-col,.account-grid,.account-summary){gap:12px}
:root.premium-account:not(.premium-admin)[data-theme] .stack{gap:10px}
:root.premium-account:not(.premium-admin)[data-theme] :is(button,.btn,.button,input,select,textarea){font-size:14px!important}
:root.premium-account:not(.premium-admin)[data-theme] :is(button,.btn,.button,input:not([type=checkbox]):not([type=radio]),select){min-height:38px;padding:8px 12px}
:root.premium-account:not(.premium-admin)[data-theme] :is(td,th){padding:9px 12px;font-size:13px}
:root.premium-account:not(.premium-admin)[data-theme] :is(.stat,.metric,.account-summary .account-panel,.customer-metrics .card){border-top:3px solid var(--user-blue)}
:root.premium-account:not(.premium-admin)[data-theme] :is(.stat,.metric,.account-summary .account-panel,.customer-metrics .card):nth-child(4n+2){border-top-color:var(--user-green)}
:root.premium-account:not(.premium-admin)[data-theme] :is(.stat,.metric,.account-summary .account-panel,.customer-metrics .card):nth-child(4n+3){border-top-color:var(--user-purple)}
:root.premium-account:not(.premium-admin)[data-theme] :is(.stat,.metric,.account-summary .account-panel,.customer-metrics .card):nth-child(4n+4){border-top-color:var(--user-amber)}
:root.premium-account:not(.premium-admin)[data-theme] :is(.stat,.metric){padding:16px}
:root.premium-account:not(.premium-admin)[data-theme] :is(.stat,.metric) strong{font-size:26px!important;line-height:1.3}
:root.premium-account:not(.premium-admin)[data-theme] .account-overview{gap:12px;margin-top:16px}
:root.premium-account:not(.premium-admin)[data-theme] .account-overview .account-panel{padding:16px;border-radius:10px}
:root.premium-account:not(.premium-admin)[data-theme] .account-value{font-size:23px;margin:6px 0}
:root.premium-account:not(.premium-admin)[data-theme] .account-alert{border-left-color:var(--user-blue);padding:12px 14px;background:color-mix(in srgb,var(--user-blue) 5%,var(--panel,#fffdf7))}
:root.premium-account:not(.premium-admin)[data-theme] .account-enabled{color:var(--user-green)}
:root.premium-account:not(.premium-admin)[data-theme] .account-panel :is(button,.button){margin-top:12px}
:root.premium-account:not(.premium-admin)[data-theme] :is(.product-plan,.settings-section){padding:16px}
:root.premium-account:not(.premium-admin)[data-theme] .mobile-menu-bar{padding:8px 14px}
:root.premium-account:not(.premium-admin)[data-theme] .mobile-menu-brand{font-size:23px}
@media(max-width:700px){:root.premium-account:not(.premium-admin)[data-theme] h1{font-size:26px!important}:root.premium-account:not(.premium-admin)[data-theme] :is(button,.btn,.button,input:not([type=checkbox]):not([type=radio]),select){min-height:44px}:root.premium-account:not(.premium-admin)[data-theme] :is(.card-body,.panel-body){padding:14px!important}:root.premium-account:not(.premium-admin)[data-theme] .account-overview .account-panel{padding:14px}:root.premium-account:not(.premium-admin)[data-theme] .account-value{font-size:21px}}

:root.premium-account:not(.premium-admin)[data-theme] main{padding:22px 3%;margin:0 auto;width:100%}
:root.premium-account:not(.premium-admin)[data-theme] header{padding:12px 0;margin:0 3%;gap:14px}
:root.premium-account:not(.premium-admin)[data-theme] aside{padding:22px 16px}
:root.premium-account:not(.premium-admin)[data-theme] nav button{padding:9px 12px;font-size:13px}
:root.premium-account:not(.premium-admin)[data-theme] .description{margin-bottom:16px}
@media(max-width:700px){:root.premium-account:not(.premium-admin)[data-theme] main{padding:18px 14px}}

/* Let asynchronously inserted wallet/referral sections flow without fixed grid rows. */
#editor #policy-fields{align-content:start;gap:10px}
#editor #policy-fields>.access-workspaces,
#editor #policy-fields:has(>.note)>.access-workspaces,
#editor #policy-fields:has(>.preset-bar)>.access-workspaces{grid-column:auto;grid-row:auto}
#editor #policy-fields>fieldset:has([name=status]){grid-column:1/-1}
#editor #policy-fields>fieldset:has([name=status])>.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}
#editor #policy-fields>fieldset:has([name=status]) .field:has(input[name=maxDevices]){grid-column:auto;grid-row:auto}
#editor #policy-fields .expiry-control{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding-top:8px}
#editor #policy-fields .expiry-control .toolbar{padding:0!important;gap:5px}
#editor #policy-fields .check{min-height:32px;margin:0;padding:2px 0;gap:8px}
#editor #policy-fields :is(.access-left-column,.grid){gap:8px;align-content:start;align-items:start}
#editor #policy-fields .access-workspaces .grid{grid-template-columns:1fr}
#editor #policy-fields .admin-wallet-credit{gap:8px 12px;padding:10px 12px}
#editor #policy-fields .admin-wallet-credit>.note{margin:0;font-size:11px}
#editor #policy-fields .admin-wallet-credit>.note:empty{display:none}
#editor #policy-fields .admin-wallet-credit>button{justify-self:start;min-width:160px;width:auto}
#editor #policy-fields .admin-wallet-credit>label:has(input[type=checkbox]){flex-direction:row;align-items:center;grid-column:1/-1}
#editor #policy-fields .preset-bar{gap:10px}
#editor #policy-fields .access-advanced{margin:0;padding-top:8px}
#editor .dialog-head{padding:12px 18px;gap:12px}
#editor .dialog-head h2{margin:0;font-size:20px}
#editor .dialog-head .eyebrow{margin:0 0 4px}
#editor #policy-fields :is(input:not([type=checkbox]),select){font-size:12px}
@media(max-width:560px){#editor #policy-fields{grid-template-columns:1fr;padding:12px}#editor #policy-fields>fieldset:has([name=status])>.grid{grid-template-columns:1fr}#editor #policy-fields .expiry-control{grid-template-columns:1fr}#editor #policy-fields .expiry-control>.field{grid-row:auto}#editor #policy-fields :is(button,input:not([type=checkbox]),select){min-height:44px}#editor #policy-fields .check{min-height:44px}#editor footer{flex-wrap:wrap}#editor footer button{width:100%}}

/* Row selection uses native checkboxes, including the mixed select-all state. */
:root.premium-admin[data-theme] .cm-table input[type=checkbox]{appearance:auto!important;-webkit-appearance:auto!important;display:inline-block;width:18px!important;min-width:18px!important;max-width:18px!important;height:18px!important;min-height:18px!important;flex:0 0 18px!important;padding:0!important;margin:0;position:static;border:initial!important;border-radius:initial!important;background:initial!important;accent-color:#896a32;vertical-align:middle;transition:none}
:root.premium-admin[data-theme] .cm-table input[type=checkbox]::before,:root.premium-admin[data-theme] .cm-table input[type=checkbox]::after{content:none!important;display:none!important}
