@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700&display=swap');
:root{--bg:#0c1014;--sidebar:#10151a;--surface:#141a20;--surface-2:#182027;--surface-3:#202931;--line:#26313a;--text:#eef3f0;--muted:#8f9c96;--green:#55d98b;--green-2:#31b96c;--brand-ink:#092014;--blue:#5c9cf5;--violet:#a47af4;--amber:#f2b84b;--red:#f06b72;--radius:14px;--shadow:0 18px 60px rgba(0,0,0,.28)}
*{box-sizing:border-box}html{font-size:16px;background:var(--bg)}body{margin:0;background:var(--bg);color:var(--text);font-family:'DM Sans',system-ui,sans-serif;line-height:1.5}button,input,select,textarea{font:inherit}button{color:inherit}a{color:inherit;text-decoration:none}h1,h2,h3,p{margin-top:0}h1,h2,h3,.brand{font-family:Manrope,system-ui,sans-serif}h1{font-size:clamp(1.8rem,3vw,2.5rem);letter-spacing:-.045em;line-height:1.15;margin-bottom:.45rem}h2{font-size:1.05rem;letter-spacing:-.02em;margin-bottom:.25rem}small{font-size:.78rem}.muted,.page-heading p,.panel-heading p{color:var(--muted)}.eyebrow{font-size:.72rem;font-weight:700;letter-spacing:.13em;color:var(--green);margin-bottom:.75rem}.button{height:42px;border:1px solid var(--line);border-radius:9px;padding:0 16px;display:inline-flex;align-items:center;justify-content:center;gap:10px;font-weight:600;cursor:pointer;background:var(--surface-2);transition:.2s ease}.button:hover{transform:translateY(-1px);border-color:#40505b}.button.primary{background:var(--green);border-color:var(--green);color:#092014}.button.primary:hover{background:#68e29a}.button.secondary{background:transparent}.button.wide{width:100%}.button:disabled{opacity:.55;cursor:wait;transform:none}.text-button{background:none;border:0;color:var(--green);cursor:pointer;padding:6px;font-size:.85rem}.icon-button,.menu-button{width:40px;height:40px;border:1px solid var(--line);background:var(--surface);border-radius:9px;cursor:pointer}.menu-button{display:none}.app-shell{display:grid;grid-template-columns:244px minmax(0,1fr);min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:244px;background:var(--sidebar);border-right:1px solid var(--line);padding:24px 14px 18px;display:flex;flex-direction:column;z-index:20}.brand{display:flex;align-items:center;gap:10px;font-size:1.12rem;font-weight:700;padding:0 10px 30px}.brand-mark{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:var(--green);color:#0a2014;font-weight:800;font-size:.83rem;box-shadow:0 0 0 5px rgba(85,217,139,.08)}nav{display:flex;flex-direction:column;gap:4px}.nav-item{display:flex;align-items:center;gap:12px;width:100%;min-height:44px;padding:0 12px;border:0;background:transparent;border-radius:9px;color:#9ba7a1;cursor:pointer;text-align:left;font-weight:500}.nav-item:hover{color:var(--text);background:#161d23}.nav-item.active{color:var(--text);background:#1b242b}.nav-item.active:before{content:"";position:absolute;left:14px;width:3px;height:20px;border-radius:3px;background:var(--green)}.nav-item .icon{font-family:monospace;font-size:1.05rem;width:20px;color:#77847e}.nav-item.active .icon{color:var(--green)}.nav-count{margin-left:auto;padding:1px 7px;background:#273139;border-radius:10px;font-size:.72rem}.nav-label{font-size:.65rem;color:#5e6b65;letter-spacing:.12em;font-weight:700;margin:26px 12px 8px}.sidebar-foot{margin-top:auto}.health{margin:0 5px 16px;padding:12px;background:#131c1a;border:1px solid #20362a;border-radius:10px;display:flex;gap:10px;align-items:center}.health b,.health small{display:block}.health b{font-size:.74rem}.health small{font-size:.65rem;color:var(--muted)}.pulse{width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 0 5px rgba(85,217,139,.1)}.account{width:100%;display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;text-align:left;background:transparent;border:0;border-top:1px solid var(--line);padding:16px 8px 0;cursor:pointer}.account b,.account small{display:block}.account b{font-size:.78rem}.account small{color:var(--muted);text-transform:capitalize}.avatar{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:#27342e;color:var(--green);font-size:.72rem;font-weight:700}.workspace{grid-column:2;min-width:0}.topbar{height:72px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 32px;position:sticky;top:0;background:rgba(12,16,20,.88);backdrop-filter:blur(16px);z-index:10}.crumb{color:var(--muted)}.slash{margin:0 9px;color:#455149}.top-actions{display:flex;align-items:center;gap:10px}.live-clock{color:var(--muted);font-size:.8rem;margin-right:6px}.content{padding:34px;max-width:1600px;margin:0 auto}.view{display:none}.view.active{display:block;animation:fade .18s ease}@keyframes fade{from{opacity:.4;transform:translateY(3px)}}.page-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:28px}.page-heading p:last-child{margin-bottom:0}.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:14px}.metric-card{min-height:170px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px;position:relative;overflow:hidden}.metric-card.accent{background:linear-gradient(145deg,#14241d,#141a20)}.metric-card strong{font-family:Manrope,sans-serif;font-size:2rem;letter-spacing:-.05em;display:block;margin:18px 0 0}.metric-card small{color:var(--muted)}.metric-head{display:flex;align-items:center;justify-content:space-between;font-size:.84rem;color:#b1bcb7}.metric-icon{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;background:rgba(85,217,139,.12);color:var(--green)}.metric-icon.blue{background:rgba(92,156,245,.12);color:var(--blue)}.metric-icon.violet{background:rgba(164,122,244,.12);color:var(--violet)}.metric-icon.amber{background:rgba(242,184,75,.12);color:var(--amber)}.spark-bars{position:absolute;right:18px;bottom:20px;height:38px;width:100px;display:flex;align-items:end;gap:4px}.spark-bars i{flex:1;background:rgba(85,217,139,.26);border-radius:2px 2px 0 0}.spark-bars i:last-child{background:var(--green)}.spark-bars.blue i{background:rgba(92,156,245,.25)}.spark-bars.blue i:last-child{background:var(--blue)}.status-track{height:4px;background:#283139;border-radius:6px;position:absolute;left:20px;right:20px;bottom:22px}.status-track i{display:block;height:100%;border-radius:6px;background:var(--violet);width:0;transition:width .5s ease}.health-track i{background:var(--amber)}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,.8fr);gap:14px;margin-bottom:14px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px}.panel-heading{display:flex;align-items:start;justify-content:space-between;gap:15px;margin-bottom:20px}.panel-heading p{font-size:.8rem;margin-bottom:0}.legend{display:flex;gap:14px;color:var(--muted);font-size:.75rem}.legend i{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px}.legend .green{background:var(--green)}.legend .blue{background:var(--blue)}.chart{height:220px;display:flex;gap:10px;align-items:end;padding-top:12px;border-bottom:1px solid var(--line);background:repeating-linear-gradient(to bottom,transparent,transparent 53px,rgba(255,255,255,.035) 54px)}.chart-day{flex:1;display:flex;gap:3px;height:100%;align-items:end;position:relative}.chart-day i{flex:1;min-width:4px;border-radius:3px 3px 0 0;transition:height .4s ease}.chart-day .sent{background:var(--green)}.chart-day .received{background:var(--blue);opacity:.75}.chart-day label{position:absolute;bottom:-24px;left:50%;transform:translateX(-50%);font-size:.62rem;color:#69756f}.empty-inline{margin:auto;color:var(--muted);font-size:.85rem}.instance-health{display:flex;flex-direction:column;gap:3px}.health-row{display:grid;grid-template-columns:38px 1fr auto;gap:10px;align-items:center;padding:11px 0;border-bottom:1px solid #202930}.health-row:last-child{border:0}.instance-avatar{width:36px;height:36px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:#1d2a24;color:var(--green);font-weight:700}.health-row b,.health-row small{display:block}.health-row b{font-size:.82rem}.health-row small{color:var(--muted)}.status{display:inline-flex;align-items:center;gap:6px;text-transform:capitalize;font-size:.74rem;padding:4px 8px;border-radius:20px;background:#202a27;color:#9ce5ba}.status:before{content:"";width:6px;height:6px;background:currentColor;border-radius:50%}.status.disconnected,.status.failed,.status.suspended{background:#2a2022;color:#ee8b91}.status.qr,.status.retrying,.status.connecting,.status.queued{background:#2c281e;color:#edc56f}.status.received{background:#1e2832;color:#83b5f5}.skeleton{height:58px;border-radius:8px;background:linear-gradient(90deg,#182027,#202930,#182027);background-size:200%;animation:shimmer 1.3s linear infinite}@keyframes shimmer{to{background-position:-200%}}.table-wrap{overflow:auto;margin:0 -4px}table{width:100%;border-collapse:collapse;white-space:nowrap}th{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);font-size:.69rem;letter-spacing:.07em;text-transform:uppercase;color:#66736d}td{padding:14px 12px;border-bottom:1px solid #202930;font-size:.8rem;color:#c2cbc7}tbody tr:last-child td{border-bottom:0}.direction{width:28px;height:28px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;background:#1e3027;color:var(--green)}.direction.inbound{background:#1d2936;color:var(--blue)}.message-preview{max-width:260px;overflow:hidden;text-overflow:ellipsis}.instance-grid{display:grid;grid-template-columns:repeat(2,minmax(320px,1fr));gap:14px}.instance-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px}.instance-card-top{display:flex;justify-content:space-between;gap:10px}.instance-title{display:flex;gap:12px;align-items:center}.instance-title h2{margin-bottom:2px}.instance-title small{color:var(--muted)}.instance-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:22px 0}.instance-meta div{padding:11px;background:var(--surface-2);border-radius:8px}.instance-meta span,.instance-meta b{display:block}.instance-meta span{font-size:.68rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}.instance-meta b{font-size:.8rem;margin-top:3px}.card-actions{display:flex;gap:8px}.card-actions .button{height:36px;font-size:.76rem;flex:1}.toolbar{display:flex;gap:10px;margin-bottom:12px}.search,input,select,textarea{width:100%;color:var(--text);background:#10161b;border:1px solid var(--line);border-radius:9px;padding:10px 12px;outline:none}.search{max-width:340px}input:focus,select:focus,textarea:focus{border-color:#49805f;box-shadow:0 0 0 3px rgba(85,217,139,.08)}label{display:flex;flex-direction:column;gap:7px;font-size:.8rem;font-weight:600;color:#b6c0bb}.stack{display:flex;flex-direction:column;gap:16px}.api-layout{display:grid;grid-template-columns:minmax(300px,.72fr) minmax(380px,1.28fr);gap:14px}.form-panel{display:flex;flex-direction:column;gap:16px}.code-panel{padding:0;overflow:hidden}.code-head{height:50px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;border-bottom:1px solid var(--line);background:#10161b}.code-panel pre{margin:0;padding:22px;height:280px;overflow:auto;background:#0f1418;color:#b8e4c9;font-size:.78rem;white-space:pre-wrap}.api-response{padding:16px 20px;border-top:1px solid var(--line);color:var(--muted);font-size:.8rem}.alert{padding:12px 14px;border-radius:8px;font-size:.8rem}.alert.info{background:#17231e;color:#9dc8ae;border:1px solid #254232}.alert.error{background:#2a1b1e;color:#f5a6aa;border:1px solid #583037}.webhook-panel{display:grid;grid-template-columns:.7fr 1.2fr;gap:30px}.settings-form{display:flex;flex-direction:column;gap:16px}.field-group{display:grid;gap:9px}.field-group>span{font-size:.8rem;font-weight:600;color:#b6c0bb}.check{flex-direction:row;align-items:center;font-weight:400}.check input{width:auto;accent-color:var(--green)}.signature-note{grid-column:1/-1;display:flex;gap:14px;background:#111a17;border:1px solid #22372c;border-radius:10px;padding:16px}.signature-note>span{height:30px;padding:5px 8px;border-radius:6px;background:#203429;color:var(--green);font-family:monospace}.signature-note p{margin:2px 0 0;color:var(--muted);font-size:.8rem}.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.72);backdrop-filter:blur(4px);z-index:50;display:grid;place-items:center;padding:20px}.modal-backdrop[hidden]{display:none}.modal{width:min(480px,100%);background:var(--surface);border:1px solid #35413b;border-radius:16px;box-shadow:var(--shadow);padding:28px;position:relative}.modal h2{font-size:1.35rem}.modal-close{position:absolute;right:16px;top:16px;width:34px;height:34px;border:0;border-radius:8px;background:var(--surface-3);cursor:pointer;font-size:1.2rem}.credentials{margin-top:18px;background:#10161b;border:1px solid var(--line);border-radius:10px;padding:14px}.credentials code{display:block;word-break:break-all;color:#b8e4c9;font-size:.76rem;margin:4px 0 12px}.credential-rotate{margin-top:8px}.toast-region{position:fixed;right:20px;bottom:20px;z-index:80;display:flex;flex-direction:column;gap:8px}.toast{background:#1d2923;border:1px solid #31543f;color:#c6f2d7;padding:12px 16px;border-radius:9px;box-shadow:var(--shadow);font-size:.82rem}.toast.error{background:#291c1f;border-color:#553138;color:#f4b0b4}.auth-page{min-height:100vh;background:radial-gradient(circle at 18% 32%,rgba(85,217,139,.08),transparent 28%),var(--bg);display:grid;place-items:center;padding:30px}.auth-shell{width:min(1050px,100%);display:grid;grid-template-columns:1.15fr .85fr;gap:70px;align-items:center}.auth-brand .brand{padding:0 0 70px}.auth-brand h1{font-size:clamp(2.3rem,5vw,4rem);max-width:700px}.auth-brand>p{font-size:1.05rem;color:var(--muted);max-width:560px}.auth-points{display:flex;gap:18px;flex-wrap:wrap;color:#b8c3be;font-size:.8rem}.auth-points i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green);margin-right:6px}.auth-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:34px;box-shadow:var(--shadow)}.auth-card h2{font-size:1.45rem}.fine-print{font-size:.75rem;color:var(--muted);margin:18px 0 0;text-align:center}.signal-orbit{width:130px;height:130px;border:1px solid #263b31;border-radius:50%;position:absolute;left:42%;top:20%;opacity:.35;display:grid;place-items:center}.signal-orbit:before,.signal-orbit:after{content:"";position:absolute;border:1px solid #2d5a40;border-radius:50%;inset:16px}.signal-orbit:after{inset:34px}.signal-orbit b{color:var(--green)}.signal-orbit span{position:absolute;width:7px;height:7px;border-radius:50%;background:var(--green)}.signal-orbit span:nth-child(1){top:8px}.signal-orbit span:nth-child(2){right:4px;bottom:32px}.signal-orbit span:nth-child(3){left:10px;bottom:15px}.not-found{text-align:center}.not-found .brand-mark{margin-bottom:24px}.not-found .button{margin-top:18px}
@media(max-width:1100px){.metric-grid{grid-template-columns:repeat(2,1fr)}.instance-grid{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr}.auth-shell{gap:35px}.signal-orbit{display:none}}
@media(max-width:760px){.app-shell{display:block}.sidebar{transform:translateX(-100%);transition:transform .2s ease;box-shadow:var(--shadow)}body.menu-open .sidebar{transform:translateX(0)}.workspace{display:block}.topbar{padding:0 16px}.menu-button{display:block}.topbar>div:first-of-type{display:none}.top-actions .icon-button,.live-clock{display:none}.content{padding:22px 16px}.page-heading{align-items:start}.page-heading>.button.secondary{display:none}.metric-grid,.instance-grid,.api-layout,.webhook-panel,.auth-shell{grid-template-columns:1fr}.metric-card{min-height:150px}.top-actions .button{font-size:.76rem;padding:0 12px}.auth-brand{display:none}.auth-card{padding:26px}.chart{gap:4px}.chart-day label{display:none}.toolbar{flex-direction:column}.search{max-width:none}}
@media(max-width:460px){.metric-grid{grid-template-columns:1fr}.page-heading{display:block}.page-heading>.button.primary{margin-top:14px}.content{padding:18px 12px}.panel{padding:16px}.modal{padding:24px 18px}}
.qr-view{text-align:center}.qr-view img{width:min(300px,100%);height:auto;background:#fff;border-radius:12px;padding:8px;margin:6px auto 18px}.qr-view h3{margin-bottom:4px}
.instance-connection-error{margin-top:16px}.card-actions{flex-wrap:wrap}.card-actions .danger{color:var(--red)}[hidden]{display:none!important}
.trial-expiry{white-space:nowrap}.ticket-account-links{margin:18px 0}.admin-user-layout{grid-template-columns:minmax(300px,.75fr) minmax(480px,1.25fr)}@media(max-width:980px){.admin-user-layout{grid-template-columns:1fr}}
.brand-logo{width:36px;height:36px;object-fit:contain;border-radius:8px}.white-label-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.toggle-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-bottom:18px;border-bottom:1px solid var(--line)}.toggle-row p{margin:2px 0 0;color:var(--muted);font-size:.8rem}.switch{display:block;position:relative}.switch input{position:absolute;opacity:0}.switch span{display:block;width:48px;height:27px;border-radius:30px;background:#2a343c;cursor:pointer;transition:.2s}.switch span:after{content:"";display:block;width:21px;height:21px;margin:3px;border-radius:50%;background:#8d9993;transition:.2s}.switch input:checked+span{background:var(--green)}.switch input:checked+span:after{transform:translateX(21px);background:var(--brand-ink)}.theme-picker{border:0;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}.theme-picker legend{font-size:.8rem;font-weight:600;color:#b6c0bb;margin-bottom:8px}.theme-picker label{flex-direction:row;align-items:center;border:1px solid var(--line);border-radius:9px;padding:10px;cursor:pointer}.theme-picker input{width:auto;accent-color:var(--green)}.theme-swatch{width:17px;height:17px;border-radius:50%;background:#55d98b}.theme-swatch.ocean{background:#5c9cf5}.theme-swatch.violet{background:#a47af4}.theme-swatch.sunset{background:#f29a5c}.dns-card{margin-top:22px;padding:16px;border:1px solid var(--line);border-radius:10px;background:#10161b}.dns-card:empty{display:none}.dns-record{display:grid;grid-template-columns:80px 1fr;gap:8px;margin:12px 0;font-size:.8rem}.dns-record span{color:var(--muted)}.dns-record code{word-break:break-all;color:#c9e7d4}.resource-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}.resource-item{padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.resource-item strong,.resource-item span{display:block}.resource-item strong{font:700 1.35rem Manrope}.resource-item span{font-size:.75rem;color:var(--muted)}
@media(max-width:760px){.white-label-grid,.resource-strip{grid-template-columns:1fr}}
.button.primary,.brand-mark{color:var(--brand-ink)}.button.primary:hover{background:color-mix(in srgb,var(--green) 86%,white)}

.sidebar-foot{position:relative}.account-menu{position:relative}.account-menu-panel{position:absolute;left:4px;right:4px;bottom:calc(100% + 9px);z-index:35;padding:7px;background:var(--surface);border:1px solid var(--line);border-radius:11px;box-shadow:var(--shadow)}.account-menu-panel[hidden]{display:none}.account-menu-panel button{width:100%;display:grid;grid-template-columns:24px 1fr;gap:9px;align-items:center;text-align:left;padding:10px;border:0;border-radius:8px;color:var(--text);background:transparent;cursor:pointer}.account-menu-panel button:hover{background:var(--surface-2)}.account-menu-panel button>span:first-child{color:var(--green);text-align:center}.account-menu-panel b,.account-menu-panel small{display:block}.account-menu-panel b{font-size:.78rem}.account-menu-panel small{font-size:.65rem;color:var(--muted);margin-top:1px}.account-menu-panel form{border-top:1px solid var(--line);margin-top:4px;padding-top:4px}.account-chevron{transition:transform .18s ease}.account[aria-expanded="true"] .account-chevron{transform:rotate(180deg)}.profile-summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}.profile-settings-grid{grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr)}.profile-appearance-panel{margin-top:14px}.profile-theme-choices{border:0;padding:0;margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:900px}.profile-theme-choices legend{width:100%;margin-bottom:8px;font-size:.78rem;font-weight:700;color:var(--text)}.theme-choice{display:block;position:relative;min-width:0;cursor:pointer}.theme-choice input{position:absolute;opacity:0;pointer-events:none}.theme-choice .theme-preview{position:relative;width:100%;min-height:78px;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;gap:2px;cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}.theme-choice .theme-preview b,.theme-choice .theme-preview small{display:block}.theme-choice .theme-preview small{color:inherit;opacity:.78;font-weight:500}.theme-choice:hover .theme-preview{transform:translateY(-1px);border-color:color-mix(in srgb,var(--green) 65%,var(--line))}.theme-choice input:focus-visible+.theme-preview{outline:3px solid color-mix(in srgb,var(--green) 40%,transparent);outline-offset:2px}.theme-choice input:checked+.theme-preview{border-color:var(--green);box-shadow:0 0 0 3px color-mix(in srgb,var(--green) 26%,transparent)}.theme-choice input:checked+.theme-preview:after{content:"✓";position:absolute;top:9px;right:9px;width:27px;height:27px;display:grid;place-items:center;border-radius:50%;background:var(--green);color:var(--brand-ink);font-size:.9rem;font-weight:900;box-shadow:0 3px 12px rgba(0,0,0,.22)}
@media(max-width:900px){.profile-summary-grid,.profile-settings-grid{grid-template-columns:1fr}}@media(max-width:640px){.profile-theme-choices{grid-template-columns:1fr}}

/* Strong chromatic dashboard treatment: solid blocks and decisive status capsules. */
:root{--card-green:#176447;--card-blue:#2d559c;--card-violet:#6042a1;--card-amber:#805a1d;--capsule-red:#8b3348;--capsule-blue:#315f9f;--capsule-green:#176447;--capsule-amber:#8a601a}
.nav-item.active{background:var(--green);color:var(--brand-ink);box-shadow:0 8px 22px color-mix(in srgb,var(--green) 24%,transparent)}
.nav-item.active:before{display:none}.nav-item.active .icon{color:var(--brand-ink)}
.ticket-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,.5fr);gap:14px}.ticket-conversation{display:flex;flex-direction:column;gap:12px;margin-bottom:24px}.ticket-message{background:var(--surface-2);border:1px solid var(--line);border-radius:12px;padding:16px}.ticket-message.admin{border-left:4px solid var(--green)}.ticket-message header{display:flex;justify-content:space-between;gap:12px}.ticket-message header span{color:var(--muted);font-size:.75rem}.ticket-message p{white-space:normal;margin:12px 0}.ticket-attachment{display:inline-flex;padding:8px 10px;border-radius:8px;background:#10161b;color:var(--green);font-size:.78rem}.ticket-attachment-image{display:inline-flex;flex-direction:column;align-items:flex-start;gap:7px;padding:7px}.ticket-attachment-image img{display:block;width:180px;height:112px;max-width:100%;object-fit:cover;border-radius:6px;background:var(--surface-3)}.ticket-attachment-image span{padding:0 3px 2px}.ticket-sidebar{align-self:start;position:sticky;top:90px}.form-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:800px){.ticket-layout{grid-template-columns:1fr}.ticket-sidebar{position:static}.form-columns{grid-template-columns:1fr}}
.button.primary{box-shadow:0 7px 18px color-mix(in srgb,var(--green) 20%,transparent)}
.icon-button{background:var(--card-violet);border-color:transparent;color:#fff}
.health{background:var(--card-green);border-color:transparent;color:#fff}.health small{color:rgba(255,255,255,.72)}.pulse{background:#b8ffd5;box-shadow:0 0 0 5px rgba(255,255,255,.13)}
.metric-card{border:0;box-shadow:0 12px 30px rgba(0,0,0,.22)}
.metric-card:nth-child(1),.metric-card.accent{background:var(--card-green)}
.metric-card:nth-child(2){background:var(--card-blue)}
.metric-card:nth-child(3){background:var(--card-violet)}
.metric-card:nth-child(4){background:var(--card-amber)}
.metric-card .metric-head,.metric-card small{color:rgba(255,255,255,.78)}.metric-card strong{color:#fff}
.metric-card .metric-icon,.metric-card .metric-icon.blue,.metric-card .metric-icon.violet,.metric-card .metric-icon.amber{background:rgba(255,255,255,.16);color:#fff}
.metric-card .spark-bars i,.metric-card .spark-bars.blue i{background:rgba(255,255,255,.56)}
.metric-card .status-track{background:rgba(5,10,16,.28)}.metric-card .status-track i{background:rgba(255,255,255,.76)}
.panel{border-color:#2d3943;box-shadow:0 10px 26px rgba(0,0,0,.16)}
.chart-panel{border-top:4px solid var(--card-blue)}.dashboard-grid>.panel:not(.chart-panel){border-top:4px solid var(--card-green)}.recent-panel{border-top:4px solid var(--card-violet)}
.instance-card{border:0;border-left:5px solid var(--card-blue);box-shadow:0 10px 25px rgba(0,0,0,.18)}
.instance-card:nth-child(4n+2){border-left-color:var(--card-violet)}.instance-card:nth-child(4n+3){border-left-color:var(--card-amber)}.instance-card:nth-child(4n+4){border-left-color:var(--card-green)}
.status{background:var(--capsule-green);color:#fff;padding:5px 10px;font-weight:700;letter-spacing:.01em}
.status.sent,.status.delivered,.status.received{background:var(--capsule-blue);color:#fff}
.status.read,.status.authenticated,.status.active{background:var(--capsule-green);color:#fff}
.status.disconnected,.status.failed,.status.suspended{background:var(--capsule-red);color:#fff}
.status.qr,.status.retrying,.status.reconnecting,.status.connecting,.status.queued,.status.pending{background:var(--capsule-amber);color:#fff}
.direction{background:var(--capsule-green);color:#fff;border-radius:20px}.direction.inbound{background:var(--capsule-blue);color:#fff}
.nav-count{background:var(--card-blue);color:#fff}.nav-item.active .nav-count{background:rgba(0,0,0,.22);color:var(--brand-ink)}
.alert.info{background:var(--card-blue);border-color:transparent;color:#fff}.alert.error{background:var(--capsule-red);border-color:transparent;color:#fff}
.dns-card{border-left:5px solid var(--card-blue)}
.resource-item:nth-child(1){border-color:var(--card-blue);background:color-mix(in srgb,var(--card-blue) 26%,var(--surface))}.resource-item:nth-child(2){border-color:var(--card-violet);background:color-mix(in srgb,var(--card-violet) 26%,var(--surface))}.resource-item:nth-child(3){border-color:var(--card-green);background:color-mix(in srgb,var(--card-green) 26%,var(--surface))}
.update-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,.8fr);gap:14px}.update-status-panel{border-top:4px solid var(--card-violet)}.version-block{padding:22px;border-radius:12px;background:var(--card-violet);margin-bottom:16px}.version-block span,.version-block strong{display:block}.version-block span{font-size:.74rem;text-transform:uppercase;letter-spacing:.1em;color:rgba(255,255,255,.72)}.version-block strong{font:700 2rem Manrope;color:#fff;margin-top:5px}.update-detail{padding:16px;border-radius:10px;background:var(--surface-2)}.update-detail b,.update-detail p,.update-detail small{display:block}.update-detail p{color:var(--muted);margin:.35rem 0}.update-detail small{color:#69766f}.update-drop{padding:18px;border:2px dashed #40505b;border-radius:12px;background:var(--surface-2)}.update-drop input{margin-top:10px}.status.processing,.status.installing,.status.backing-up{background:var(--capsule-blue);color:#fff}.status.complete{background:var(--capsule-green);color:#fff}.status.queued{background:var(--capsule-amber);color:#fff}
@media(max-width:980px){.update-layout{grid-template-columns:1fr}}
.detail-actions{display:flex;flex-direction:column;gap:10px}.detail-actions .button{width:100%}.button.danger{border-color:#6b3439;color:#f5a6aa}.button.danger:hover{background:#2a1b1e}.detail-list{display:grid;grid-template-columns:minmax(130px,.55fr) 1fr;gap:12px 18px;align-items:center}.detail-list span{color:var(--muted);font-size:.78rem}.detail-list code{word-break:break-all;color:#b8e4c9}.instance-detail-metrics .metric-card{min-height:145px}.instance-log-link{padding:0;text-align:left}.toolbar select{max-width:240px}@media(max-width:760px){.detail-list{grid-template-columns:1fr;gap:4px}.detail-list b,.detail-list code{margin-bottom:10px}.toolbar select{max-width:none}.card-actions{flex-wrap:wrap}.card-actions .button{min-width:30%}}
.message-center-layout{display:grid;grid-template-columns:minmax(280px,340px) minmax(0,1fr);gap:14px;height:min(720px,calc(100vh - 190px));min-height:560px}.conversation-panel,.thread-panel{padding:0;overflow:hidden}.conversation-panel{display:flex;flex-direction:column;border-top:4px solid var(--card-blue)}.conversation-tabs{display:grid;grid-template-columns:1fr 1fr;padding:14px 14px 10px;gap:8px}.conversation-tabs button{height:38px;border:0;border-radius:9px;background:var(--surface-2);color:var(--muted);font-weight:700;cursor:pointer}.conversation-tabs button.active{background:var(--card-blue);color:#fff}.conversation-panel>.search{width:auto;max-width:none;margin:0 14px 12px}.conversation-list{overflow:auto;padding:0 8px 12px}.conversation-item{width:100%;display:grid;grid-template-columns:38px minmax(0,1fr);gap:11px;align-items:center;text-align:left;border:0;border-radius:10px;background:transparent;padding:11px 10px;cursor:pointer}.conversation-item:hover{background:var(--surface-2)}.conversation-item.active{background:color-mix(in srgb,var(--card-blue) 48%,var(--surface));box-shadow:inset 3px 0 var(--blue)}.conversation-item b,.conversation-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-item b{font-size:.84rem}.conversation-item small{color:var(--muted);font-size:.72rem}.thread-panel{display:flex;flex-direction:column;border-top:4px solid var(--card-green)}.thread-header{min-height:74px;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 20px;border-bottom:1px solid var(--line)}.thread-header h2{margin:0}.thread-header p{margin:3px 0 0;color:var(--muted);font-size:.76rem}.thread-messages{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:9px;padding:22px;background:linear-gradient(rgba(12,16,20,.77),rgba(12,16,20,.77)),radial-gradient(circle at 15% 20%,var(--card-blue),transparent 38%),radial-gradient(circle at 85% 80%,var(--card-green),transparent 42%)}.message-bubble{width:fit-content;max-width:min(72%,620px);padding:10px 12px;border-radius:13px 13px 13px 4px;background:var(--surface-3);box-shadow:0 5px 14px rgba(0,0,0,.18)}.message-bubble.outbound{align-self:flex-end;border-radius:13px 13px 4px 13px;background:var(--card-green)}.message-bubble p{margin:0 0 5px;white-space:pre-wrap;overflow-wrap:anywhere}.message-bubble>small{display:block;color:rgba(255,255,255,.65);font-size:.65rem}.message-bubble img{display:block;max-width:320px;width:100%;max-height:320px;object-fit:cover;border-radius:9px;margin-bottom:8px}.message-bubble .message-error{color:#ffd1d4;margin-top:4px}.message-composer{padding:15px 18px;border-top:1px solid var(--line);background:var(--surface);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}.message-composer>.composer-kind,.message-composer>#centerImageFields{grid-column:1/-1}.message-composer textarea{resize:vertical;min-height:72px}.composer-kind{display:flex;gap:8px}.composer-kind label{flex-direction:row;align-items:center;padding:6px 10px;border-radius:20px;background:var(--surface-2);cursor:pointer}.composer-kind input{width:auto;accent-color:var(--green)}
@media(max-width:900px){.message-center-layout{grid-template-columns:280px minmax(0,1fr)}}
@media(max-width:760px){.message-center-layout{display:flex;flex-direction:column;height:auto;min-height:0}.conversation-panel{height:300px}.thread-panel{height:650px}.message-bubble{max-width:88%}.message-composer{grid-template-columns:1fr}.message-composer>.button{width:100%}}
.system-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}.system-summary>div{min-height:76px;padding:14px 16px;border-radius:12px;background:var(--surface);border:1px solid var(--line);display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.system-summary span{color:var(--muted);font-size:.72rem;text-transform:uppercase;letter-spacing:.06em}.system-summary strong:not(.status){margin-top:5px}.system-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(320px,.7fr);gap:14px;margin-bottom:14px}.system-grid>.panel:first-child{border-top:4px solid var(--card-blue)}.system-grid>.panel:last-child{border-top:4px solid var(--card-amber)}.lag-grid{display:grid;gap:10px}.lag-grid>div{padding:14px;border-radius:10px;background:var(--surface-2);display:flex;align-items:center;justify-content:space-between;gap:14px}.lag-grid span{color:var(--muted);font-size:.78rem}.lag-grid strong{font:700 1.25rem Manrope}.database-health{border-top:4px solid var(--card-green)}.database-metrics{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin-bottom:16px}.database-metrics>div{padding:14px;border-radius:10px;background:var(--surface-2);min-width:0}.database-metrics span,.database-metrics strong,.database-metrics small{display:block}.database-metrics span{min-height:34px;color:var(--muted);font-size:.72rem}.database-metrics strong{font:700 1.2rem Manrope;margin:5px 0;overflow:hidden;text-overflow:ellipsis}.database-metrics small{color:var(--muted)}.health-warnings{display:grid;gap:8px;margin-bottom:14px}.system-metrics .metric-card{min-height:150px}.status.healthy,.status.running,.status.not-configured{background:var(--capsule-green);color:#fff}.status.warning,.status.restarting{background:var(--capsule-amber);color:#fff}.status.critical,.status.unhealthy,.status.exited,.status.dead{background:var(--capsule-red);color:#fff}
.system-operations{display:none}.view#view-system.active+.system-operations{display:block;animation:fade .18s ease}.operations-grid,.governance-grid{grid-template-columns:minmax(0,1.25fr) minmax(340px,.75fr);margin-top:14px}.operations-grid>.backup-panel{border-top-color:var(--card-violet)}.operations-grid>.settings-form,.governance-grid>.panel:last-child{border-top:4px solid var(--card-green)}.compact-form{display:grid;grid-template-columns:minmax(220px,1fr) auto;align-items:end;margin:16px 0}.compact-form .button{min-width:190px}.backup-note{margin:0 0 16px}.compact-button{height:32px;padding:0 11px;font-size:.74rem}.report-meta{min-height:46px;padding:12px 14px;border-radius:9px;background:var(--surface-2);color:var(--muted);font-size:.78rem}.report-error{color:#f5a6aa}.backup-panel code{word-break:break-all}.admin-account-fields{border:1px solid var(--line);border-radius:10px;padding:14px;display:grid;gap:12px}.admin-account-fields legend{padding:0 7px;color:var(--green);font-weight:700;font-size:.78rem}.modal{max-height:92vh;overflow:auto}.status.comfortable{background:#1d3026;color:#8fe4b0}.status.watch,.status.near-suggestion{background:#2c281e;color:#edc56f}.status.above-suggestion,.status.past_due,.status.cancelled{background:#2a2022;color:#ee8b91}.button.danger{border-color:#6a3438;color:#f0a0a5}
@media(max-width:1200px){.database-metrics{grid-template-columns:repeat(3,1fr)}}
@media(max-width:900px){.system-grid,.operations-grid{grid-template-columns:1fr}.compact-form{grid-template-columns:1fr}}
@media(max-width:760px){.system-summary,.database-metrics{grid-template-columns:1fr}.system-summary>div{min-height:64px}}

/* Optional "Funded" dashboard theme. The classic rules above remain unchanged. */
.theme-preview-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.theme-preview{min-height:64px;border:1px solid var(--line);border-radius:9px;padding:12px;display:flex;align-items:end;font-weight:700}.classic-preview{background:linear-gradient(135deg,#141a20 60%,#176447 60%);color:#eef3f0}.funded-preview{background:linear-gradient(135deg,#242332 60%,#63ce75 60%);color:#f5f5f8}
body[data-ui-theme="funded"]{--bg:#343346;--sidebar:#22212f;--surface:#242332;--surface-2:#2b2a3b;--surface-3:#353348;--line:#3d3b50;--text:#f5f5f8;--muted:#aaa9b8;--green:#63ce75;--green-2:#4dbb62;--brand-ink:#152219;--blue:#6d8fd3;--violet:#8b7dcc;--amber:#c4a765;--red:#e27782;--radius:9px;--shadow:0 16px 42px rgba(15,14,25,.3);--card-green:#285f3a;--card-blue:#34486f;--card-violet:#4b416f;--card-amber:#665530;--capsule-green:#397c49;--capsule-blue:#3e5683;--capsule-amber:#735f2d;--capsule-red:#713945;background:#343346}
body[data-ui-theme="funded"] .workspace,body[data-ui-theme="funded"] .content{background:#343346}
body[data-ui-theme="funded"] .sidebar{background:#22212f;border-right-color:#302f40}
body[data-ui-theme="funded"] .topbar{background:rgba(34,33,47,.95);border-bottom-color:#363448;backdrop-filter:blur(14px)}
body[data-ui-theme="funded"] .nav-item{color:#b9b8c5;border-radius:7px}
body[data-ui-theme="funded"] .nav-item:hover{background:#2b2a3a;color:#fff}
body[data-ui-theme="funded"] .nav-item.active{background:#343246;color:#fff;box-shadow:none}
body[data-ui-theme="funded"] .nav-item.active .icon{color:#63ce75}
body[data-ui-theme="funded"] .nav-item.active:before{display:block;background:#63ce75;left:14px}
body[data-ui-theme="funded"] .brand-mark{border-radius:7px;box-shadow:none}
body[data-ui-theme="funded"] .health{background:#2b2a3a;border:1px solid #3d3b50;color:#fff}
body[data-ui-theme="funded"] .health small{color:#aaa9b8}
body[data-ui-theme="funded"] .panel,body[data-ui-theme="funded"] .metric-card,body[data-ui-theme="funded"] .instance-card,body[data-ui-theme="funded"] .system-summary>div{background:#242332;border:1px solid #3a394d;box-shadow:none}
body[data-ui-theme="funded"] .metric-card:nth-child(1),body[data-ui-theme="funded"] .metric-card:nth-child(2),body[data-ui-theme="funded"] .metric-card:nth-child(3),body[data-ui-theme="funded"] .metric-card:nth-child(4),body[data-ui-theme="funded"] .metric-card.accent{background:#242332}
body[data-ui-theme="funded"] .metric-card:nth-child(1){border-top:3px solid #63ce75}body[data-ui-theme="funded"] .metric-card:nth-child(2){border-top:3px solid #6d8fd3}body[data-ui-theme="funded"] .metric-card:nth-child(3){border-top:3px solid #8b7dcc}body[data-ui-theme="funded"] .metric-card:nth-child(4){border-top:3px solid #c4a765}
body[data-ui-theme="funded"] .metric-head,body[data-ui-theme="funded"] label{color:#d2d1da}
body[data-ui-theme="funded"] .chart-panel,body[data-ui-theme="funded"] .dashboard-grid>.panel:not(.chart-panel),body[data-ui-theme="funded"] .recent-panel,body[data-ui-theme="funded"] .database-health,body[data-ui-theme="funded"] .system-grid>.panel{border-top-color:#3d3b50}
body[data-ui-theme="funded"] .instance-card{border-left:4px solid #63ce75}
body[data-ui-theme="funded"] .instance-card:nth-child(n){border-left-color:#63ce75}
body[data-ui-theme="funded"] .instance-meta div,body[data-ui-theme="funded"] .lag-grid>div,body[data-ui-theme="funded"] .database-metrics>div{background:#2b2a3b}
body[data-ui-theme="funded"] input,body[data-ui-theme="funded"] select,body[data-ui-theme="funded"] textarea,body[data-ui-theme="funded"] .search{background:#201f2c;border-color:#444257}
body[data-ui-theme="funded"] input:focus,body[data-ui-theme="funded"] select:focus,body[data-ui-theme="funded"] textarea:focus{border-color:#63ce75;box-shadow:0 0 0 3px rgba(99,206,117,.12)}
body[data-ui-theme="funded"] .button{border-radius:7px}body[data-ui-theme="funded"] .button.primary{background:#63ce75;border-color:#63ce75;color:#152219}body[data-ui-theme="funded"] .button.primary:hover{background:#75da86}
body[data-ui-theme="funded"] th{color:#8f8ea0}body[data-ui-theme="funded"] td,body[data-ui-theme="funded"] .health-row{border-bottom-color:#343247;color:#d7d6df}
body[data-ui-theme="funded"] .modal{background:#242332;border-color:#464459}body[data-ui-theme="funded"] .modal-close{background:#343247}
body[data-ui-theme="funded"] .alert.info{background:#34486f;color:#fff}body[data-ui-theme="funded"] .eyebrow,body[data-ui-theme="funded"] .text-button{color:#63ce75}
body[data-ui-theme="funded"] .conversation-tabs button.active,body[data-ui-theme="funded"] .message-bubble.outbound{background:#397c49}
.sidebar{overflow:hidden}.sidebar>.brand{flex:0 0 auto}.sidebar nav{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding-right:4px;scrollbar-width:thin;scrollbar-color:var(--line) transparent}.sidebar nav::-webkit-scrollbar{width:6px}.sidebar nav::-webkit-scrollbar-track{background:transparent}.sidebar nav::-webkit-scrollbar-thumb{background:var(--line);border-radius:8px}.sidebar nav::-webkit-scrollbar-thumb:hover{background:var(--muted)}.sidebar-foot{flex:0 0 auto;padding-top:12px}
/* Desktop dashboard density mirrors the preferred 80% browser view. Public and mobile pages retain their native scale. */
@media(min-width:761px){body[data-role]{zoom:80%}body[data-role] .app-shell{min-height:125vh}}
/* A roomier navigation rail keeps long destinations readable without exposing its scrollbar. */
.app-shell{grid-template-columns:280px minmax(0,1fr)}.sidebar{width:280px}.sidebar nav{scrollbar-width:none;-ms-overflow-style:none}.sidebar nav::-webkit-scrollbar{display:none;width:0;height:0}.nav-item{white-space:nowrap}

/* Cadmus and Pivot are additive light dashboard themes; Classic and Funded remain unchanged. */
body[data-ui-theme="cadmus"],body[data-ui-theme="pivot"]{--bg:#f1f3f5;--surface:#fff;--surface-2:#f5f6f8;--surface-3:#e9edf2;--line:#d9dde3;--text:#30343a;--muted:#7c858f;--radius:7px;--shadow:0 8px 24px rgba(28,35,45,.1);background:var(--bg);color:var(--text)}
body[data-ui-theme="cadmus"]{--sidebar:#050505;--green:#4e69c2;--green-2:#3d57aa;--brand-ink:#fff;--blue:#4e69c2;--violet:#7b68b8;--amber:#efc541;--red:#df382f;--card-green:#55aa50;--card-blue:#4e69c2;--card-violet:#7767b1;--card-amber:#d8ad2f;--capsule-green:#55aa50;--capsule-blue:#4e69c2;--capsule-amber:#cda62e;--capsule-red:#cf514e}
body[data-ui-theme="pivot"]{--sidebar:#fff;--green:#5753b8;--green-2:#4642a3;--brand-ink:#fff;--blue:#6294d2;--violet:#5753b8;--amber:#d4a83e;--red:#d65e68;--card-green:#548fcb;--card-blue:#5753b8;--card-violet:#7773cf;--card-amber:#d4a83e;--capsule-green:#4f8e80;--capsule-blue:#5753b8;--capsule-amber:#b88d28;--capsule-red:#c95661}
body[data-ui-theme="cadmus"] .workspace,body[data-ui-theme="cadmus"] .content,body[data-ui-theme="pivot"] .workspace,body[data-ui-theme="pivot"] .content{background:var(--bg)}
body[data-ui-theme="cadmus"] .sidebar{background:#050505;border-right-color:#252525}body[data-ui-theme="cadmus"] .brand{color:#fff}body[data-ui-theme="cadmus"] .brand-mark{background:#df382f;color:#fff;box-shadow:none;border-radius:4px}body[data-ui-theme="cadmus"] .nav-item{color:#d5d5d5;border-radius:0}body[data-ui-theme="cadmus"] .nav-item:hover{background:#171717;color:#fff}body[data-ui-theme="cadmus"] .nav-item.active{background:#df382f;color:#fff}body[data-ui-theme="cadmus"] .nav-item.active:before{display:none}body[data-ui-theme="cadmus"] .nav-item .icon,body[data-ui-theme="cadmus"] .nav-item.active .icon{color:#fff}body[data-ui-theme="cadmus"] .nav-label{color:#898989}body[data-ui-theme="cadmus"] .account{border-color:#292929;color:#fff}body[data-ui-theme="cadmus"] .health{background:#151515;border-color:#333;color:#fff}
body[data-ui-theme="pivot"] .sidebar{background:#fff;border-right-color:#dfe3e8}body[data-ui-theme="pivot"] .brand{color:#2b2c35}body[data-ui-theme="pivot"] .brand-mark{background:#5753b8;color:#fff;box-shadow:none;border-radius:50%}body[data-ui-theme="pivot"] .nav-item{color:#32343a}body[data-ui-theme="pivot"] .nav-item:hover{background:#f0f0fb;color:#5753b8}body[data-ui-theme="pivot"] .nav-item.active{background:#ececfa;color:#5753b8}body[data-ui-theme="pivot"] .nav-item.active:before{background:#5753b8;left:0}body[data-ui-theme="pivot"] .nav-item .icon,body[data-ui-theme="pivot"] .nav-item.active .icon{color:#5753b8}body[data-ui-theme="pivot"] .nav-label{color:#8a8f98}body[data-ui-theme="pivot"] .account{border-color:#e1e3e8;color:#30343a}body[data-ui-theme="pivot"] .health{background:#f3f3fb;border-color:#dddcef;color:#30343a}
body[data-ui-theme="cadmus"] .topbar{background:rgba(255,255,255,.96);border-bottom-color:#d5d8dc;color:#30343a;backdrop-filter:blur(12px)}body[data-ui-theme="pivot"] .topbar{background:rgba(87,83,184,.97);border-bottom-color:#4b48a4;color:#fff;backdrop-filter:blur(12px)}body[data-ui-theme="pivot"] .topbar .crumb,body[data-ui-theme="pivot"] .topbar .live-clock{color:#e2e1f5}body[data-ui-theme="pivot"] .topbar .slash{color:#c3c1ea}
body[data-ui-theme="cadmus"] .panel,body[data-ui-theme="cadmus"] .metric-card,body[data-ui-theme="cadmus"] .instance-card,body[data-ui-theme="cadmus"] .system-summary>div,body[data-ui-theme="pivot"] .panel,body[data-ui-theme="pivot"] .metric-card,body[data-ui-theme="pivot"] .instance-card,body[data-ui-theme="pivot"] .system-summary>div{background:#fff;border-color:var(--line);box-shadow:var(--shadow)}
body[data-ui-theme="cadmus"] .metric-grid>.metric-card:nth-child(-n+3){background:#4e69c2;border-color:#4e69c2;color:#fff}body[data-ui-theme="cadmus"] .metric-grid>.metric-card:nth-child(-n+3) .metric-head,body[data-ui-theme="cadmus"] .metric-grid>.metric-card:nth-child(-n+3) small{color:#f1f4ff}body[data-ui-theme="cadmus"] .metric-grid>.metric-card:nth-child(-n+3) .metric-icon{background:rgba(255,255,255,.18);color:#fff}body[data-ui-theme="cadmus"] .metric-grid>.metric-card:nth-child(-n+3) .status-track{background:rgba(255,255,255,.22)}body[data-ui-theme="cadmus"] .metric-grid>.metric-card:nth-child(-n+3) .status-track i{background:#efc541}
body[data-ui-theme="pivot"] .metric-card{border-top:3px solid #5753b8}body[data-ui-theme="pivot"] .metric-card:nth-child(2){border-top-color:#6294d2}body[data-ui-theme="pivot"] .metric-card:nth-child(3){border-top-color:#7773cf}body[data-ui-theme="pivot"] .metric-card:nth-child(4){border-top-color:#d4a83e}
body[data-ui-theme="cadmus"] input,body[data-ui-theme="cadmus"] select,body[data-ui-theme="cadmus"] textarea,body[data-ui-theme="cadmus"] .search,body[data-ui-theme="pivot"] input,body[data-ui-theme="pivot"] select,body[data-ui-theme="pivot"] textarea,body[data-ui-theme="pivot"] .search{background:#fff;border-color:#cfd4da;color:#30343a}body[data-ui-theme="cadmus"] input:focus,body[data-ui-theme="cadmus"] select:focus,body[data-ui-theme="cadmus"] textarea:focus{border-color:#4e69c2;box-shadow:0 0 0 3px rgba(78,105,194,.14)}body[data-ui-theme="pivot"] input:focus,body[data-ui-theme="pivot"] select:focus,body[data-ui-theme="pivot"] textarea:focus{border-color:#5753b8;box-shadow:0 0 0 3px rgba(87,83,184,.14)}
body[data-ui-theme="cadmus"] label,body[data-ui-theme="pivot"] label{color:#4d535a}body[data-ui-theme="cadmus"] th,body[data-ui-theme="pivot"] th{color:#717a84}body[data-ui-theme="cadmus"] td,body[data-ui-theme="pivot"] td{color:#444a51;border-bottom-color:#e4e7ea}body[data-ui-theme="cadmus"] .health-row,body[data-ui-theme="pivot"] .health-row{border-bottom-color:#e4e7ea}
body[data-ui-theme="cadmus"] .instance-meta div,body[data-ui-theme="cadmus"] .lag-grid>div,body[data-ui-theme="cadmus"] .database-metrics>div,body[data-ui-theme="pivot"] .instance-meta div,body[data-ui-theme="pivot"] .lag-grid>div,body[data-ui-theme="pivot"] .database-metrics>div{background:#f4f6f8}body[data-ui-theme="cadmus"] .instance-card{border-left:4px solid #4e69c2}body[data-ui-theme="pivot"] .instance-card{border-left:4px solid #5753b8}
body[data-ui-theme="cadmus"] .button.primary{background:#4e69c2;border-color:#4e69c2;color:#fff}body[data-ui-theme="cadmus"] .button.primary:hover{background:#5b76cc}body[data-ui-theme="pivot"] .button.primary{background:#5753b8;border-color:#5753b8;color:#fff}body[data-ui-theme="pivot"] .button.primary:hover{background:#6864c6}body[data-ui-theme="cadmus"] .button.secondary,body[data-ui-theme="pivot"] .button.secondary{background:#fff;color:#3d434a}
body[data-ui-theme="cadmus"] .modal,body[data-ui-theme="pivot"] .modal{background:#fff;border-color:#d9dde3}body[data-ui-theme="cadmus"] .modal-close,body[data-ui-theme="pivot"] .modal-close{background:#edf0f3;color:#30343a}body[data-ui-theme="cadmus"] .alert.info,body[data-ui-theme="pivot"] .alert.info{background:#eaf0ff;border-color:#c8d5f2;color:#3d568f}
body[data-ui-theme="cadmus"] .status,body[data-ui-theme="pivot"] .status{background:#e8f4eb;color:#39724a}body[data-ui-theme="cadmus"] .status.disconnected,body[data-ui-theme="cadmus"] .status.failed,body[data-ui-theme="cadmus"] .status.suspended,body[data-ui-theme="pivot"] .status.disconnected,body[data-ui-theme="pivot"] .status.failed,body[data-ui-theme="pivot"] .status.suspended{background:#fbe8ea;color:#a44149}body[data-ui-theme="cadmus"] .status.qr,body[data-ui-theme="cadmus"] .status.retrying,body[data-ui-theme="cadmus"] .status.connecting,body[data-ui-theme="cadmus"] .status.queued,body[data-ui-theme="pivot"] .status.qr,body[data-ui-theme="pivot"] .status.retrying,body[data-ui-theme="pivot"] .status.connecting,body[data-ui-theme="pivot"] .status.queued{background:#fff2d6;color:#8a6500}body[data-ui-theme="cadmus"] .status.received,body[data-ui-theme="pivot"] .status.received{background:#e6edfb;color:#46649e}
body[data-ui-theme="cadmus"] .thread-messages,body[data-ui-theme="pivot"] .thread-messages{background:linear-gradient(rgba(246,247,249,.9),rgba(246,247,249,.9)),radial-gradient(circle at 15% 20%,var(--card-blue),transparent 38%),radial-gradient(circle at 85% 80%,var(--card-green),transparent 42%)}body[data-ui-theme="cadmus"] .message-bubble,body[data-ui-theme="pivot"] .message-bubble{background:#fff;color:#30343a;box-shadow:0 4px 12px rgba(35,42,52,.12)}body[data-ui-theme="cadmus"] .message-bubble.outbound{background:#4e69c2;color:#fff}body[data-ui-theme="pivot"] .message-bubble.outbound{background:#5753b8;color:#fff}body[data-ui-theme="cadmus"] .conversation-item.active,body[data-ui-theme="pivot"] .conversation-item.active{background:#e9ecf8}
body[data-ui-theme="cadmus"] .ticket-attachment,body[data-ui-theme="cadmus"] .credentials,body[data-ui-theme="pivot"] .ticket-attachment,body[data-ui-theme="pivot"] .credentials{background:#eef1f5;color:var(--green)}body[data-ui-theme="cadmus"] .signature-note,body[data-ui-theme="pivot"] .signature-note{background:#f5f7f9;border-color:#dbe0e5}body[data-ui-theme="cadmus"] .chart,body[data-ui-theme="pivot"] .chart{background:repeating-linear-gradient(to bottom,transparent,transparent 53px,rgba(0,0,0,.055) 54px)}
.cadmus-preview{background:linear-gradient(135deg,#050505 34%,#df382f 34% 52%,#4e69c2 52%);color:#fff}.pivot-preview{background:linear-gradient(135deg,#fff 42%,#eef1f5 42% 68%,#5753b8 68%);color:#292a33}

/* Pivot 1.5.1 contrast pass. These overrides intentionally do not alter Cadmus. */
body[data-ui-theme="pivot"] .metric-card .metric-head{color:#555c66}body[data-ui-theme="pivot"] .metric-card strong{color:#252932}body[data-ui-theme="pivot"] .metric-card small{color:#68717c}body[data-ui-theme="pivot"] .metric-card .metric-icon,body[data-ui-theme="pivot"] .metric-card .metric-icon.blue,body[data-ui-theme="pivot"] .metric-card .metric-icon.violet,body[data-ui-theme="pivot"] .metric-card .metric-icon.amber{background:#ecebfa;color:#5753b8}body[data-ui-theme="pivot"] .metric-card .spark-bars i,body[data-ui-theme="pivot"] .metric-card .spark-bars.blue i{background:#aaa8dc}body[data-ui-theme="pivot"] .metric-card .spark-bars i:last-child{background:#5753b8}body[data-ui-theme="pivot"] .metric-card .spark-bars.blue i:last-child{background:#6294d2}body[data-ui-theme="pivot"] .metric-card .status-track{background:#e3e5e9}body[data-ui-theme="pivot"] .metric-card .status-track i{background:#5753b8}body[data-ui-theme="pivot"] .metric-card .health-track i{background:#c39b32}
body[data-ui-theme="pivot"] .health b{color:#30343a}body[data-ui-theme="pivot"] .health small{color:#646d77}body[data-ui-theme="pivot"] .pulse{background:#5abf78;box-shadow:0 0 0 5px rgba(90,191,120,.14)}body[data-ui-theme="pivot"] .account b{color:#30343a}body[data-ui-theme="pivot"] .account small{color:#68717c}body[data-ui-theme="pivot"] .avatar{background:#e9e8f8;color:#514daf}
body[data-ui-theme="pivot"] .topbar .button.primary{background:#fff;border-color:#fff;color:#4d49a9;box-shadow:0 5px 16px rgba(40,37,112,.18)}body[data-ui-theme="pivot"] .topbar .button.primary:hover{background:#f1f0ff;border-color:#f1f0ff}
body[data-ui-theme="pivot"] .instance-avatar{background:#ecebfa;color:#4e4aa8}body[data-ui-theme="pivot"] .direction{background:#e6f1ec;color:#39735a}body[data-ui-theme="pivot"] .direction.inbound{background:#e7edfb;color:#4c69a7}body[data-ui-theme="pivot"] .detail-list code,body[data-ui-theme="pivot"] .credentials code{color:#4d49a9}body[data-ui-theme="pivot"] .signature-note>span{background:#e9e8f8;color:#4d49a9}body[data-ui-theme="pivot"] .skeleton{background:linear-gradient(90deg,#eef0f3,#e1e4e9,#eef0f3);background-size:200%}
body[data-ui-theme="pivot"] .conversation-tabs button.active{background:#5753b8;color:#fff}body[data-ui-theme="pivot"] .message-bubble>small{color:#6f7781}body[data-ui-theme="pivot"] .message-bubble.outbound>small{color:rgba(255,255,255,.78)}

/* The page root remains visible below CSS-scaled dashboards; light themes must color it explicitly. */
html[data-ui-theme="cadmus"],html[data-ui-theme="pivot"]{background:#f1f3f5}

/* Cadmus 1.5.2 contrast pass. */
body[data-ui-theme="cadmus"] .metric-grid>.metric-card:nth-child(4){background:#fff;border-color:#d9dde3;color:#252932}body[data-ui-theme="cadmus"] .metric-grid>.metric-card:nth-child(4) .metric-head{color:#555c66}body[data-ui-theme="cadmus"] .metric-grid>.metric-card:nth-child(4) strong{color:#252932}body[data-ui-theme="cadmus"] .metric-grid>.metric-card:nth-child(4) small{color:#68717c}body[data-ui-theme="cadmus"] .metric-grid>.metric-card:nth-child(4) .metric-icon{background:#fff5d7;color:#a57a00}body[data-ui-theme="cadmus"] .metric-grid>.metric-card:nth-child(4) .status-track{background:#e3e5e9}body[data-ui-theme="cadmus"] .metric-grid>.metric-card:nth-child(4) .status-track i{background:#d0a62d}
body[data-ui-theme="cadmus"] .instance-avatar{background:#e8edfb;color:#405cae}body[data-ui-theme="cadmus"] .detail-list code,body[data-ui-theme="cadmus"] .credentials code{color:#405cae}body[data-ui-theme="cadmus"] .signature-note>span{background:#e8edfb;color:#405cae}body[data-ui-theme="cadmus"] .skeleton{background:linear-gradient(90deg,#eef0f3,#e1e4e9,#eef0f3);background-size:200%}body[data-ui-theme="cadmus"] .message-bubble>small{color:#6f7781}body[data-ui-theme="cadmus"] .message-bubble.outbound>small{color:rgba(255,255,255,.78)}

/* Keep switches centred in panel headings and centre their thumb mechanically. */
.switch{display:inline-flex;position:relative;align-items:center;width:48px;height:27px;min-width:48px;flex:0 0 48px;margin:0;padding:0;line-height:1}.switch input{position:absolute;inset:0;width:48px;height:27px;margin:0;padding:0;opacity:0;cursor:pointer}.switch span{position:absolute;inset:0;display:block;width:48px;height:27px;margin:0}.switch span:after{position:absolute;top:3px;left:3px;margin:0}.email-template-form .panel-heading{align-items:center}

/* Dedicated administrator delivery diagnostics. */
.failure-reason{min-width:260px;max-width:520px;white-space:normal;overflow-wrap:anywhere;color:var(--red);font-weight:650}.failure-message{min-width:190px;max-width:360px;white-space:normal;overflow-wrap:anywhere}.failure-pagination{display:flex;align-items:center;justify-content:flex-end;gap:14px;padding:18px 20px 4px;color:var(--muted)}
@media(max-width:760px){.failure-pagination{justify-content:space-between;flex-wrap:wrap}.failure-pagination span{order:-1;width:100%}}

/* Administrator account and instance audit timeline. */
.history-panel{margin-top:20px}.history-list{display:grid;gap:0}.history-entry{position:relative;display:grid;grid-template-columns:18px minmax(0,1fr);gap:12px;padding:16px 0;border-bottom:1px solid var(--line)}.history-entry:last-child{border-bottom:0}.history-dot{width:10px;height:10px;margin-top:6px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px color-mix(in srgb,var(--green) 16%,transparent)}.history-entry header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.history-entry header time{color:var(--muted);font-size:.82rem;white-space:nowrap}.history-entry p{margin:6px 0;color:var(--text)}.history-entry small{color:var(--muted)}
@media(max-width:760px){.history-entry header{display:block}.history-entry header time{display:block;margin-top:4px}}
