:root { color-scheme: dark; --text:#f0f1f2; --muted:#b2b7b5; --soft:#999fa0; --surface:#202024; --surface-strong:#202024; --line:#35373b; --shadow:0 8px 30px #00000026; }
* { letter-spacing:0 !important; }
body, body.is-auth, body.is-guest { background:#17171a !important; color:var(--text); }
.wallpaper,.wallpaper-filter { display:none; }
.shell { width:100%; max-width:1160px; margin:auto; padding:20px 24px 48px; }
.shell.locked { min-height:100dvh; padding:24px; }
.launchpad { max-width:none; width:100%; margin:0; }
.surface { background:#202024; border:1px solid var(--line); border-radius:8px; box-shadow:none; backdrop-filter:none; }
.login-card { padding:32px; background:#202024 !important; border:1px solid var(--line); border-radius:8px; box-shadow:var(--shadow); }
.login-card h1 { font-size:28px; color:var(--text); }
.login-icon { border-radius:8px; box-shadow:none; }
.login-subtitle,.auth-form label,.form-grid label,.account-form label { color:var(--muted); }
input,select,textarea,.auth-form input,.form-grid input,.form-grid select,.form-grid textarea,.account-form input,.account-form select { color:var(--text) !important; background:#202024 !important; border:1px solid #41454a !important; border-radius:6px !important; font-size:16px; min-height:44px; max-width:100%; }
input:focus,textarea:focus,select:focus { outline:2px solid #38c987; outline-offset:2px; }
input::placeholder { color:#8d9391; }
button,a { -webkit-tap-highlight-color:transparent; }
button:focus-visible,a:focus-visible { outline:2px solid #38c987; outline-offset:3px; }
button:disabled { opacity:.5; cursor:wait; }
.auth-form button[type=submit],.account-form button[type=submit],.form-grid button[type=submit] { background:#38c987; color:#202024; border-radius:6px; min-height:44px; }
.auth-form .text-button { background:transparent; color:#38c987; min-height:44px; }
.topbar { display:flex !important; align-items:center; justify-content:space-between; gap:16px; width:100%; padding:0 0 18px; margin:0 0 24px; border-bottom:1px solid var(--line); }
.brand-lockup { min-width:0; }.brand-lockup h1 { font-size:23px; color:var(--text); text-shadow:none; }.eyebrow {color:#999fa0;opacity:1;}
.top-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.icon-button,.icon-back { color:var(--text); background:#202024; border:1px solid var(--line); border-radius:6px; min-width:44px; min-height:44px; box-shadow:none; }
.header-widgets,#portalSearchWrap,#portalContactButton,#portalAccountButton { display:none !important; }
#portalMenu { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; padding:12px 0 20px; margin-bottom:20px; border-bottom:1px solid var(--line); }
#portalMenu button { display:flex; align-items:center; gap:10px; padding:12px; min-height:44px; color:var(--text); background:#202024; border-radius:6px; text-align:left; }
#portalMenu button:hover {background:#26382f;}#portalMenu svg {width:20px;height:20px;}
.pages,.launch-page,.screen-view,.screen-body {padding:0;width:100%;max-width:none;margin:0;}
.home-greeting {font-size:23px;margin:0 0 20px;}
.owner-strip {margin:0 0 24px;}.client-overview-grid,.admin-overview {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:0 0 28px;border-bottom:1px solid var(--line);}
.client-overview-card,.stat-pill {background:transparent !important;border:0 !important;border-radius:0 !important;box-shadow:none !important;padding:16px !important;min-width:0;color:var(--text) !important;}
.client-overview-card strong {font-size:25px;}.client-overview-card span,.client-overview-card em,.stat-pill span {color:var(--muted);}
.launch-grid,.launch-grid.client-grid,.launch-grid.admin-grid {display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:0 !important;padding:0 !important;max-width:none !important;margin:0 !important;}
.app-tile.portal-app {display:flex !important;flex-direction:row !important;align-items:center;gap:14px;padding:18px 12px !important;min-width:0;width:100%;min-height:76px;border-bottom:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;}
.app-icon,.row-icon {width:40px !important;height:40px !important;border-radius:8px !important;background:#25382f !important;color:#38c987 !important;box-shadow:none !important;flex:0 0 40px;}
.app-icon svg,.row-icon svg {width:23px;height:23px;stroke:currentColor;}.app-name {font-size:15px !important;color:var(--text) !important;text-shadow:none !important;text-align:left !important;white-space:normal !important;}
.screen-head {margin-bottom:20px;gap:16px;}.screen-head h2 {font-size:24px;}.screen-head .eyebrow:empty {display:none;}
.portal-row,.payment-row,.attention-list button {background:#202024;border:1px solid var(--line);border-radius:8px;box-shadow:none;color:var(--text);}
.portal-row>div {min-width:0;}.portal-row h3 {font-size:16px;}.portal-row p,.portal-row small,.meta-line {color:var(--muted);overflow-wrap:anywhere;}
.portal-list {display:grid;gap:10px;}.portal-row {padding:16px;}.portal-row a {overflow-wrap:anywhere;}
.doc-link,.mini-action,.action-bar button {background:#26382f;color:#71e0a9;border-radius:6px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;}
.tag {color:#b2b7b5;background:#282c2e;border:1px solid #35373b;border-radius:5px;}.status-paid,.status-Active,.status-active {color:#71e0a9;background:#23392e;}.status-overdue,.status-Overdue {color:#ffb2b8;background:#44272e;}
.client-alert-banner {background:#393121;color:#efce8d;border:1px solid #685735;border-radius:6px;margin-bottom:20px;}
.client-alert-banner.critical {background:#3c262a;color:#ffb2b8;border-color:#674149;}
.client-popover,.quick-popover,.admin-modal {background:#202024;color:var(--text);box-shadow:var(--shadow);max-width:calc(100vw - 32px);}
.client-list button,.client-order button,.quick-popover button {color:var(--text);background:#2a2d30;}
.account-layout,.account-grid {gap:24px;}.account-card,.account-panel,.contact-card {background:transparent !important;box-shadow:none !important;border:0 !important;border-radius:0 !important;color:var(--text);}
.form-error {color:#ff9fa8 !important;}.form-success {color:#71e0a9 !important;}.form-error:empty,.form-success:empty {display:none;}
.portal-loader {background:#17171a !important;}.empty-state {color:var(--muted);background:transparent;border:1px dashed var(--line);border-radius:8px;padding:24px;}
.security-summary {padding:0 0 24px;line-height:1.6;}.security-summary+h3,#panelBody>.portal-list+h3 {margin:16px 0;}
.client-grid .app-tile:hover,.admin-grid .app-tile:hover {background:#242c29;transform:none;}
.is-auth .brand-lockup {display:block !important;visibility:visible !important;}
.app-name {max-width:none !important;flex:1;}
.client-overview-card svg {color:#71cda0;}
.portal-row:has(>div:only-child) {grid-template-columns:minmax(0,1fr);}
.portal-row h3,.portal-row p {white-space:normal;overflow-wrap:anywhere;}
.surface-lite,.account-hub,.contact-hub {background:transparent;box-shadow:none;border:0;border-radius:0;backdrop-filter:none;}
.account-hub {padding:0;max-width:none;justify-items:start;text-align:left;}
.account-hub>.contact-hero {display:none;}
.account-mini-form {background:transparent;border:0;border-radius:0;padding:16px 0;min-height:0;}
.account-mini-form label,.contact-copy p,.site-health,.service-meta,.domain-meta,.service-kind,.client-next-due em {color:var(--muted);}
.account-mini-form label {display:grid;gap:8px;font-size:14px;}
.account-mini-form button {color:#202024;background:#38c987;border-radius:6px;min-height:44px;padding:10px 16px;}
.account-toggle-row .inline-check {display:flex;align-items:center;}
input[type=checkbox] {width:20px !important;height:20px !important;min-height:20px !important;accent-color:#38c987;}
.site-state {color:#71e0a9;}.password-required {max-width:420px;}.password-required h3 {font-size:18px;}
.contact-hero {background:#25382f !important;color:#38c987 !important;box-shadow:none !important;}
.client-alert-banner {margin:0 0 20px;justify-content:flex-start;}.client-alert-banner span {color:inherit;}
.stat-pill svg {color:#71cda0;}.account-fields label {color:var(--muted);}
@media(max-width:640px) {.attention-list button {grid-template-columns:minmax(0,1fr);gap:5px;}.account-hub-grid {grid-template-columns:minmax(0,1fr);}.client-alert-banner {flex-wrap:wrap;}}
@media(max-width:640px) {
 .shell {padding:16px 16px 32px;}.login-card {padding:24px;}.topbar {gap:8px;align-items:center;}.brand-lockup h1 {font-size:21px;}.top-actions {gap:6px;}.client-picker-button span {display:none;}.client-picker-button {min-width:44px;}.client-picker-button svg:last-child {display:none;}
 #portalMenu {grid-template-columns:repeat(2,minmax(0,1fr));}.client-overview-grid,.admin-overview {grid-template-columns:repeat(2,minmax(0,1fr));}.client-overview-card,.stat-pill {padding:12px 8px !important;}.client-overview-card strong {font-size:23px;}
 .launch-grid,.launch-grid.client-grid,.launch-grid.admin-grid {grid-template-columns:1fr !important;}.app-tile.portal-app {min-height:68px;padding:12px 4px !important;}.screen-head {align-items:center;}.screen-head h2 {font-size:21px;}
 .portal-row {padding:14px;gap:12px;}.form-grid,.account-layout,.account-grid,.contact-grid {grid-template-columns:minmax(0,1fr) !important;}.account-layout>* {min-width:0;}.meta-line {flex-wrap:wrap;}.screen-body {overflow-wrap:anywhere;}.admin-modal {inset:12px;max-height:calc(100dvh - 24px);overflow:auto;}.client-popover {left:0;right:0;width:auto;}
}
@media(prefers-reduced-motion:reduce) {* {scroll-behavior:auto !important;animation:none !important;transition:none !important;}}

/* A single centered content axis for desktop and mobile. */
body.is-auth .shell { max-width:1120px; margin-inline:auto; }
body.is-auth .topbar { height:auto; min-height:64px; margin:0 0 32px; padding:0 0 18px; opacity:1; }
body.is-auth .pages { padding-top:0; min-height:0; }
body.is-auth .pages, body.is-auth .screen-view, #portalMenu { width:100%; max-width:880px; margin-inline:auto; }
.screen-head { margin:0 0 26px; }
.home-greeting { margin-bottom:24px; }
.account-hub { max-width:760px; margin-inline:auto; }
.account-hub-grid { gap:40px; }
.password-required { width:100%; margin-inline:auto; }
.client-overview-grid,.admin-overview { width:100%; max-width:none; margin:0 0 28px; }
.client-overview-card,.stat-pill { padding:20px 16px !important; }
.client-overview-card + .client-overview-card,.stat-pill + .stat-pill { border-left:1px solid var(--line) !important; }
.launch-grid,.launch-grid.client-grid,.launch-grid.admin-grid { column-gap:28px !important; }
.app-tile.portal-app { padding:18px 16px !important; }
.login-panel { width:min(420px,100%); }
.login-icon { background:#fff; }
.auth-form button[type=submit],.account-form button[type=submit],.form-grid button[type=submit],.account-mini-form button { color:#10251b; font-weight:650; }
.auth-form button[type=submit]:hover,.account-mini-form button:hover { background:#63dba0; }
select option { background:#202024;color:var(--text); }
input[type=checkbox] { accent-color:#38c987; }
.client-card,.client-card.has-alert { background:#202024; border:1px solid var(--line); border-radius:8px; }
.client-card.has-alert { border-color:#685735; }
.client-order button.active { background:#38c987; color:#10251b; }
.icon-invoices,.icon-admin-invoices { background:#303044 !important;color:#c1b7f1 !important; }
.icon-payments,.icon-admin-payments { background:#393121 !important;color:#efce8d !important; }
.site-state {background:#23392e;color:#71e0a9;}
.portal-row {backdrop-filter:none;}
.account-hub .contact-copy h3 {display:none;}
@media(min-width:900px) {
 .home-greeting {font-size:26px;}
 .attention-list {margin:0 0 28px;}
 .attention-list button {grid-template-columns:150px minmax(0,1fr) 140px;}
 .attention-list button em {text-align:right;}
}
@media(max-width:640px) {
 body.is-auth .topbar {margin-bottom:24px;min-height:58px;}
 .client-overview-card,.stat-pill {padding:16px 10px !important;}
 .client-overview-card:nth-child(3),.stat-pill:nth-child(3) {border-left:0 !important;}
 .client-overview-card:nth-child(n+3),.stat-pill:nth-child(n+3) {border-top:1px solid var(--line) !important;}
 .app-tile.portal-app {padding:16px 8px !important;}
 .account-hub-grid {gap:20px;}
}
.record-actions { display:flex; flex-shrink:0; gap:4px; }
.record-management .doc-link { display:inline-flex; align-items:center; gap:6px; }
.record-management svg { width:16px; height:16px; }
#recordList .portal-row { display:flex; justify-content:space-between; align-items:center; gap:12px; }
#recordList .portal-row > div:first-child { min-width:0; overflow-wrap:anywhere; }
#crudModal .modal-head h3 { overflow-wrap:anywhere; min-width:0; }
#crudModal { max-height:calc(100dvh - 32px); overflow-y:auto; animation:none; }
#crudModal .modal-head { position:sticky; top:-18px; padding:8px 0; background:#202024; z-index:1; }
@media(max-width:640px) {
 #crudModal { inset:12px; width:auto; max-width:none; transform:none; max-height:calc(100dvh - 24px); }
}
.hub-section { padding:20px 0; border-bottom:1px solid var(--line); }
.hub-section h3,.hub-client-results h3 { font-size:15px; margin:0 0 12px; }
.hub-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.hub-heading h3 { margin:0; }
.hub-rows { display:grid; }
.hub-rows button,.hub-rows a { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; padding:14px 0; background:transparent; border:0; border-bottom:1px solid var(--line); color:var(--text); text-align:left; text-decoration:none; border-radius:0; }
.hub-rows button:hover,.hub-rows a:hover { color:var(--accent); }
.hub-rows span { min-width:0; overflow-wrap:anywhere; }
.hub-rows strong,.hub-rows small { display:block; }
.hub-rows small { margin-top:5px; color:var(--soft); font-size:13px; line-height:1.5; }
.hub-rows em { font-style:normal; font-size:12px; color:var(--soft); flex-shrink:0; max-width:35%; }
.hub-rows svg,.hub-clear svg { width:18px; height:18px; flex-shrink:0; }
.hub-clear { display:flex; align-items:center; gap:8px; color:var(--accent); }
.hub-update { padding:12px 0; }
.hub-update time { display:block; font-size:12px; color:var(--soft); margin-bottom:5px; }
.hub-update strong { display:block; font-size:15px; }
.hub-update p { margin:6px 0 0; line-height:1.5; font-size:14px; white-space:pre-wrap; overflow-wrap:anywhere; }
#portalMenu details { border-top:1px solid var(--line); padding:8px 0; }
#portalMenu summary { cursor:pointer; padding:10px; }
.account-toggle-row, .crud-form label:has(input[name="emailNotify"]), .crud-form label:has(input[name="pushNotify"]) { display:none; }
.metrics-sync { color:var(--soft); font-size:12px; }
