/* Mosaic Lite visual language, adapted to the portal's existing components.
   Reference: https://github.com/cruip/tailwind-dashboard-template
   The interface keeps its own structure and Heroicons pictograms. */
@font-face{font-family:PortalInter;src:url('/fonts/inter-regular.woff2') format('woff2');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:PortalInter;src:url('/fonts/inter-medium.woff2') format('woff2');font-style:normal;font-weight:500;font-display:swap}
@font-face{font-family:PortalInter;src:url('/fonts/inter-semibold.woff2') format('woff2');font-style:normal;font-weight:600;font-display:swap}
@font-face{font-family:PortalInter;src:url('/fonts/inter-bold.woff2') format('woff2');font-style:normal;font-weight:700;font-display:swap}

:root{
  font-family:PortalInter,Inter,ui-sans-serif,system-ui,sans-serif;
  font-size:14px;
  color:#1f2937;
  background:#f3f4f6;
  --blue:#654de8;
  --muted:#5f6b7b;
  --line:#e5e7eb;
  --violet-soft:#f1eeff;
  --violet-line:#e6e1ff;
}
body{background:#f3f4f6;-webkit-font-smoothing:antialiased}
button,input,textarea,select{font-family:inherit}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #9c8cff;outline-offset:2px}
a{color:#5d47de}
p{color:var(--muted)}

/* Left navigation follows the template's light, grouped sidebar. */
.sidebar{width:252px;background:#fff;color:#4b5563;border-right:1px solid var(--line);padding:0 13px 14px;overflow-y:auto;z-index:25;box-shadow:1px 0 3px #11182708}
.brand{color:#111827;font-size:17px;font-weight:700;letter-spacing:-.45px;gap:11px;min-height:73px;padding:0 10px;border-bottom:1px solid #f0f1f3}
.brand:hover{color:#111827}
.brand-icon{width:34px;height:34px;flex:none;border-radius:10px;background:#755ff8;color:#fff;font-size:21px}
.brand-icon .hi{width:21px;height:21px}
.workspace-label{color:#9ca3af;margin:19px 8px 23px;font-size:10px;letter-spacing:1.35px;font-weight:700}
.workspace-label span{border-color:#e5e7eb;background:#f9fafb;color:#9ca3af;border-radius:5px;font-size:9px;padding:3px 5px}
.section-label{color:#9ca3af;font-weight:700;letter-spacing:1.25px;padding:0 10px 9px;font-size:10px}
.section-label button{color:#9ca3af;width:26px;height:26px;border-radius:6px}
.section-label button:hover{background:var(--violet-soft);color:#5d47de}
#projects{gap:3px}
.project-item{color:#4b5563;border-radius:8px;padding:10px 12px;min-height:42px;gap:11px;font-size:12px;font-weight:500;line-height:1.35}
.project-item:hover{background:#f9fafb;color:#1f2937}
.project-item.active{background:var(--violet-soft);color:#5d47de;font-weight:650}
.project-item .glyph{background:transparent;color:#9ca3af;width:20px;height:20px;font-size:19px}
.project-item.active .glyph{color:#755ff8}
.sidebar-section-title{margin-top:31px}
.sidebar .tabs{display:grid;gap:3px;overflow:visible;border:0;margin:0;padding:0}
.sidebar .tabs button{display:flex;align-items:center;gap:12px;width:100%;min-height:42px;text-align:left;border:0;border-radius:8px;padding:10px 13px;color:#4b5563;font-size:12px;font-weight:500}
.sidebar .tabs button:hover{background:#f9fafb;color:#1f2937}
.sidebar .tabs button.active{background:var(--violet-soft);color:#5d47de;font-weight:650}
.sidebar .tabs button>[data-hero-icon]{display:grid;place-items:center;flex:none;width:19px;height:19px;padding:0;margin:0;background:transparent;color:#9ca3af;border-radius:0;font-size:18px}
.sidebar .tabs button>[data-hero-icon] .hi{width:18px;height:18px}
.sidebar .tabs button.active>[data-hero-icon]{color:#755ff8}
.sidebar .tabs .nav-beta{margin-left:auto;background:#f3f4f6;color:#9ca3af;border-radius:4px;padding:2px 5px;font-size:10px}
.sidebar-tools{gap:1px;padding:21px 0 13px;margin-top:auto;border-bottom:1px solid #f0f1f3}
.sidebar-tools button{display:flex;align-items:center;gap:10px;color:#6b7280;padding:8px 12px;border-radius:7px;font-size:11px;font-weight:500}
.sidebar-tools button>[data-hero-icon]{display:grid;place-items:center;width:17px;height:17px;font-size:16px;color:#9ca3af}
.sidebar-tools button .hi{width:16px;height:16px}
.sidebar-tools button:hover{background:#f9fafb;color:#5d47de}
.sidebar-bottom{margin-top:0;padding:17px 8px 2px;gap:10px;color:#374151;font-size:12px;font-weight:600}
.sidebar-bottom small{color:#9ca3af;font-weight:400}
.avatar{background:#ece8ff;color:#755ff8;width:36px;height:36px;border-radius:50%;font-size:18px}
main{margin-left:252px;width:calc(100% - 252px);min-width:0}

/* A compact operations bar stays pinned above the light utility header. */
.status-strip{background:#1f2333;border-bottom:1px solid #34394b;box-shadow:none}
.status-strip .portal-chip,.status-strip .portal-chip.ok,.status-strip .portal-status-right .portal-chip{background:#303548;border-color:#464b5f;color:#d6d9e5}
.status-strip .portal-chip:hover,.status-strip .portal-chip.ok:hover{background:#3d4359;border-color:#7771aa}
.status-strip .portal-chip.warn{background:#4b353e;border-color:#80515d}
.status-strip .portal-chip.caution{background:#4d4436;border-color:#7b6847}
.status-strip .portal-chip.unknown{background:#353a4b;border-color:#52576a}
.status-strip .portal-chip-caption,.status-strip .portal-chip-dual,.status-strip .portal-gpt-row,.status-strip .portal-quota-line span,.status-strip .portal-metric-label,.status-strip .portal-backup-caption{color:#b9becf}
.status-strip .portal-mini-track,.status-strip .portal-gpt-track{background:#555b6d}
.status-strip .portal-statusbar{padding-left:30px;padding-right:30px}
.status-strip+header{background:#fff;min-height:63px;padding:10px 32px;border-bottom:1px solid var(--line)}
.breadcrumb{font-size:12px;color:#9ca3af;gap:10px;font-weight:500}
.breadcrumb span:last-child{color:#374151;font-weight:600}
.local-badge{color:#6b7280;background:#f9fafb;border-color:#e5e7eb;border-radius:7px;padding:7px 10px;font-size:11px}
.local-badge::before{color:#52a77b}

/* Heading and dashboard grid use the template's spacing rhythm. */
.content{max-width:1760px;margin:0 auto;padding:32px 36px 22px}
.project-heading{align-items:flex-start;margin:0 0 28px}
.project-heading .eyebrow{color:#9ca3af;font-size:10px;font-weight:700;letter-spacing:1.25px}
.project-title-row{margin:7px 0 5px;gap:10px}
h1{font-size:30px;line-height:1.2;font-weight:700;letter-spacing:-.9px;margin:0;color:#1f2937}
.project-heading p{font-size:12px;margin:5px 0 0;color:#6b7280}
.project-icon{display:none}
#rename-project{width:31px;height:31px;border-color:#e5e7eb;border-radius:7px;color:#9ca3af;background:#fff;box-shadow:0 1px 2px #1118270a}
#rename-project:hover{background:var(--violet-soft);border-color:var(--violet-line);color:#5d47de}
.grid{grid-template-columns:minmax(0,1.28fr) minmax(0,1fr);gap:20px}
.card,.usage-card,.vpn-summary>div,.usage-day-details,.client-table-wrap{background:#fff;border:1px solid #e7e9ed;border-radius:11px;box-shadow:0 1px 3px #11182708}
.card{padding:22px 24px}
.card+.card{margin-top:18px}
.grid .card{margin-top:0}
.card-header{margin-bottom:18px}
h2{font-size:16px;font-weight:650;letter-spacing:-.2px;color:#1f2937}
h3{font-size:13px;font-weight:600;color:#374151}
.pill{background:#f3f4f6;color:#6b7280;border-radius:5px;font-size:10px;font-weight:600;padding:5px 8px}
.pill.blue{background:var(--violet-soft);color:#5d47de}
.pill.green{background:#eaf7ef;color:#28714d}
.pill.amber{background:#fff5e5;color:#9a6b1f}
.note,.connection{background:#f9fafb;border:1px solid #f0f1f3;color:#6b7280;border-radius:7px}
.node{border-color:#e5e7eb;border-radius:8px}
.node-icon,.row-icon{background:var(--violet-soft);color:#755ff8}
.features{padding:15px 0;margin:17px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.features strong{color:#1f2937;font-weight:700;font-size:24px;letter-spacing:-.5px}
.features small{font-size:11px;color:#9ca3af}
.row{border-color:#f0f1f3}
.row-text h3{color:#374151}
.ai-card{background:#fff;border-color:#e7e9ed}
.agent-tags span{background:#f9fafb;border-color:#e5e7eb;color:#6b7280}
.link-button{color:#5d47de;font-weight:600}
.link-button:hover{color:#4634b1;text-decoration:underline}
.primary,.secondary,.usage-toggle{border-radius:7px;font-size:12px;font-weight:600;min-height:37px;box-shadow:0 1px 2px #1118270b}
.primary{background:#755ff8;color:#fff}
.primary:hover{background:#654de8}
.secondary,.usage-toggle{background:#fff;color:#4b5563;border:1px solid #e5e7eb}
.secondary:hover,.usage-toggle:hover{background:#f9fafb;color:#5d47de;border-color:#cfc7ff}
.primary:disabled,.secondary:disabled{box-shadow:none}
input,textarea,select{border-color:#dfe2e8;border-radius:7px;color:#374151;padding:10px 12px}
input:focus,textarea:focus,select:focus{outline:2px solid #e6e1ff;border-color:#8470ff}
input[type=checkbox]{accent-color:#755ff8}
label{color:#4b5563;font-weight:500}
footer{color:#9ca3af;border-top:1px solid #e5e7eb;margin-top:30px;padding-top:18px}

/* Project pages: tables, monitoring cards, VPN charts, and conversation. */
.monitor-toolbar{margin-bottom:18px}
.server-live progress{accent-color:#755ff8}
.client-table-wrap{overflow-x:auto}
.client-table th,.usage-detail-scroll th{background:#f9fafb;color:#9ca3af;font-size:10px;font-weight:700;letter-spacing:.045em;text-transform:uppercase;border-bottom:1px solid #e5e7eb}
.client-table td{border-color:#eceef1;color:#374151}
.client-table tbody tr:hover{background:#faf9ff}
.client-table .client-name-button{color:#1f2937;font-weight:650}
.client-table .client-name-button:hover,.client-inline-button:hover{color:#5d47de}
.client-table th[aria-sort=ascending] .client-sort,.client-table th[aria-sort=descending] .client-sort{color:#5d47de}
.recipient-row th{background:#f3f1ff!important}
.recipient-row button{color:#5d47de}
.clients-heading h2{font-size:21px}
.vpn-summary{gap:16px;margin-bottom:20px}
.vpn-summary>div{padding:17px 20px}
.vpn-summary span{font-size:11px;color:#9ca3af;margin-bottom:8px}
.vpn-summary strong{font-size:25px;font-weight:700;letter-spacing:-.5px;color:#1f2937}
.clients-controls input,.clients-controls select{border-color:#dfe2e8;border-radius:7px}
.usage-card{--chart-color:#755ff8;padding:19px 20px 14px}
.usage-clients{--chart-color:#67bfff}
.usage-card h3{font-size:13px;color:#1f2937}
.usage-total strong{font-weight:700;font-size:24px;color:#1f2937}
.usage-grid i{border-color:#edf0f3}
.usage-before{background:#f3f4f6;color:#9ca3af}
.usage-period{background:#e9eaee;border-radius:7px}
.usage-period button[aria-pressed=true]{color:#5d47de}
.usage-point.is-selected{background:#755ff80d}
.traffic-bar{background:#9c8cff}
.traffic-day:last-child .traffic-bar{background:#755ff8}
.client-drawer#vpn-access-dialog{border-left:1px solid #e5e7eb;background:#fff;box-shadow:-12px 0 35px #1118271c}
.vpn-platform-chip,.vpn-usage-metrics>div{background:#f9fafb;color:#4b5563}
.vpn-fold>summary{color:#4b5563}
.vpn-history li:before{background:#8470ff}
.chat-layout{grid-template-columns:minmax(0,1fr) minmax(235px,270px)}
.chat-layout>.card{align-self:start}
.chat-symbol{background:var(--violet-soft);color:#755ff8}
.user-message{background:#f3f1ff}
.assistant-message{border-color:#e5e7eb}
.message-label{color:#6b7280}
.chat-attachment{background:#f3f1ff;color:#5d47de}
.run-state.running{background:#f1eeff;color:#5d47de}
.pulse{background:#755ff8}
.context-item{color:#6b7280}
.context-item strong{color:#374151}

/* Shared overlays and the sign-in screen. */
dialog{border-color:#e5e7eb;border-radius:12px;color:#374151;box-shadow:0 24px 60px #11182730}
dialog::backdrop{background:#11182780;backdrop-filter:blur(2px)}
dialog h2{color:#1f2937}
#portal-status-dialog{border-color:#e5e7eb;border-radius:12px}
.portal-detail-heading{border-color:#e5e7eb}
.portal-provider-head{background:#f9fafb}
.portal-limit,.portal-provider-card,.portal-models>div{border-color:#e5e7eb}
.portal-limit progress{accent-color:#755ff8}
.portal-models>div{background:#fff}
.login-page{background:#f3f4f6}
.login-brand{color:#1f2937}
.login-brand .brand-icon{color:#fff}
.login-card{border-color:#e5e7eb;border-radius:12px;box-shadow:0 10px 32px #11182710}
.login-card h1{color:#1f2937}

@media(max-width:1100px){
  .sidebar{width:224px}
  main{margin-left:224px;width:calc(100% - 224px)}
  .content{padding:28px 26px 22px}
  .grid,.chat-layout{grid-template-columns:1fr}
  .status-strip .portal-statusbar{padding-left:22px;padding-right:22px}
}
@media(max-width:650px){
  body{display:block}
  .sidebar{position:relative;inset:auto;width:100%;padding:0 14px 13px;overflow:visible;border-right:0;border-bottom:1px solid var(--line)}
  .brand{min-height:56px;border-bottom:0;padding:0 4px}
  .workspace-label,.sidebar-bottom{display:none}
  .section-label{display:flex;margin-top:5px;padding:0 4px 5px}
  #projects{display:flex;gap:5px;margin:0;overflow-x:auto}
  .project-item{flex:none;padding:8px 10px;min-height:36px;white-space:nowrap}
  .sidebar-section-title{margin-top:13px}
  .sidebar .tabs{display:flex;gap:4px;overflow-x:auto;margin:0;padding:0 0 3px}
  .sidebar .tabs button{width:auto;flex:none;min-height:35px;padding:8px 10px;white-space:nowrap;gap:6px}
  .sidebar .tabs button>[data-hero-icon]{width:16px;height:16px}
  .sidebar .tabs button>[data-hero-icon] .hi{width:16px;height:16px}
  .sidebar-tools{display:flex;gap:3px;overflow-x:auto;border:0;margin:7px 0 0;padding:5px 0 0;flex-wrap:nowrap}
  .sidebar-tools button{flex:none;padding:7px 9px;font-size:10px;white-space:nowrap}
  .sidebar-tools button>[data-hero-icon]{width:14px;height:14px;font-size:14px}
  main{margin:0;width:100%}
  .status-strip .portal-statusbar{padding:5px 13px}
  .status-strip+header{padding:10px 17px;min-height:52px}
  .content{padding:23px 17px 18px}
  h1{font-size:25px}
  .project-heading{margin-bottom:20px}
  .project-title-row{gap:8px}
  .card{padding:18px}
  .vpn-summary{gap:7px}
  .vpn-summary>div{padding:13px 10px}
  .vpn-summary strong{font-size:20px}
  .client-drawer#vpn-access-dialog{border-radius:0}
}

/* Each project owns its collapsible section list. */
#projects{display:grid;gap:3px}
.project-group{min-width:0}
.project-item{width:100%}
.project-name{flex:1;min-width:0;overflow-wrap:anywhere}
.project-caret{width:15px;height:15px;display:grid;place-items:center;color:#9ca3af;transition:transform .16s ease}
.project-caret .hi{width:14px;height:14px}
.project-group.is-open .project-caret{transform:rotate(180deg)}
.sidebar .project-sections.tabs{display:grid;gap:2px;margin:4px 0 12px 22px;padding:2px 0 2px 10px;border:0;border-left:1px solid #e5e7eb;overflow:visible}
.project-sections[hidden]{display:none!important}
.sidebar .project-sections button{min-height:36px;padding:7px 9px;gap:10px;font-size:11px}
.sidebar .project-sections button>.hi{width:16px;height:16px;color:#9ca3af}
.sidebar .project-sections button.active>.hi{color:#755ff8}
.sidebar .project-sections button>span:not(.nav-beta){flex:1;background:transparent;color:inherit;padding:0;border-radius:0;font-size:inherit;margin:0}
.sidebar .project-sections .nav-beta{margin-left:auto}

/* Theme switch is available in both the workspace and sign-in screen. */
.header-actions{display:flex;align-items:center;gap:10px;margin-left:auto}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:31px;padding:6px 10px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:7px;color:#6b7280;font-size:11px;font-weight:600;white-space:nowrap;box-shadow:0 1px 2px #1118270a}
.theme-toggle:hover{background:#f1eeff;border-color:#d2cbff;color:#5d47de}
.theme-toggle [data-hero-icon]{width:15px;height:15px;display:grid;place-items:center}
.theme-toggle .hi{width:15px;height:15px}
.theme-icon-dark{display:none!important}
html[data-theme=dark] .theme-icon-light{display:none!important}
html[data-theme=dark] .theme-icon-dark{display:grid!important}
.login-top{display:flex;align-items:center;justify-content:center;gap:20px;margin-bottom:28px}
.login-top .login-brand{min-height:0;margin:0;padding:0;border:0}

/* Mosaic's dark surfaces use the same hierarchy as the light theme. */
html[data-theme=dark]{color-scheme:dark;background:#171c28;color:#e5e7eb;--blue:#a395ff;--muted:#a5adbd;--line:#394252;--violet-soft:#332d55;--violet-line:#514580}
html[data-theme=dark] body,html[data-theme=dark] .login-page{background:#171c28;color:#e5e7eb}
html[data-theme=dark] h1,html[data-theme=dark] h2,html[data-theme=dark] h3,html[data-theme=dark] .features strong,html[data-theme=dark] .vpn-summary strong,html[data-theme=dark] .usage-total strong{color:#f2f4f8}
html[data-theme=dark] p,html[data-theme=dark] .source,html[data-theme=dark] .subtle{color:#a5adbd}
html[data-theme=dark] a,html[data-theme=dark] .link-button{color:#b4a9ff}
html[data-theme=dark] a:hover,html[data-theme=dark] .link-button:hover{color:#d1caff}
html[data-theme=dark] .sidebar{background:#202635;color:#aeb6c6;border-color:#394252;box-shadow:none}
html[data-theme=dark] .brand,html[data-theme=dark] .login-brand{color:#f2f4f8;border-color:#343c4c}
html[data-theme=dark] .brand:hover{color:#fff}
html[data-theme=dark] .workspace-label,html[data-theme=dark] .section-label{color:#8e98ac}
html[data-theme=dark] .workspace-label span{background:#2a3142;color:#a5adbd;border-color:#394252}
html[data-theme=dark] .section-label button,html[data-theme=dark] .project-caret{color:#9aa4b8}
html[data-theme=dark] .project-item,html[data-theme=dark] .sidebar .project-sections button,html[data-theme=dark] .sidebar-tools button{color:#b7c0d0}
html[data-theme=dark] .project-item:hover,html[data-theme=dark] .sidebar .project-sections button:hover,html[data-theme=dark] .sidebar-tools button:hover{background:#2b3346;color:#fff}
html[data-theme=dark] .project-item.active,html[data-theme=dark] .sidebar .project-sections button.active{background:#393254;color:#c6bcff}
html[data-theme=dark] .project-item .glyph,html[data-theme=dark] .sidebar .project-sections button>.hi,html[data-theme=dark] .sidebar-tools button>[data-hero-icon]{color:#9aa4b8}
html[data-theme=dark] .project-item.active .glyph,html[data-theme=dark] .sidebar .project-sections button.active>.hi{color:#b4a9ff}
html[data-theme=dark] .sidebar .project-sections .nav-beta{background:#4a405e;color:#d1caff}
html[data-theme=dark] .sidebar .project-sections.tabs{border-left-color:#41495b}
html[data-theme=dark] .sidebar-tools,html[data-theme=dark] .sidebar-bottom{border-color:#343c4c}
html[data-theme=dark] .sidebar-bottom{color:#e5e7eb}
html[data-theme=dark] .sidebar-bottom small{color:#9aa4b8}
html[data-theme=dark] .avatar{background:#393254;color:#b4a9ff}
html[data-theme=dark] .status-strip{background:#111521;border-color:#2b3344}
html[data-theme=dark] .status-strip+header{background:#202635;border-color:#394252}
html[data-theme=dark] .breadcrumb,html[data-theme=dark] .project-heading .eyebrow{color:#9aa4b8}
html[data-theme=dark] .breadcrumb span:last-child{color:#e5e7eb}
html[data-theme=dark] .local-badge,html[data-theme=dark] .theme-toggle{background:#2a3142;color:#c2c9d5;border-color:#41495b;box-shadow:none}
html[data-theme=dark] .theme-toggle:hover{background:#393254;color:#d1caff;border-color:#5b4c8c}
html[data-theme=dark] .card,html[data-theme=dark] .usage-card,html[data-theme=dark] .vpn-summary>div,html[data-theme=dark] .usage-day-details,html[data-theme=dark] .client-table-wrap{background:#242b3b;border-color:#394252;box-shadow:0 1px 3px #0002}
html[data-theme=dark] .ai-card{background:#242b3b;border-color:#394252}
html[data-theme=dark] .pill,html[data-theme=dark] .run-state{background:#333b4c;color:#c5ccda}
html[data-theme=dark] .pill.blue,html[data-theme=dark] .run-state.running{background:#393254;color:#c6bcff}
html[data-theme=dark] .pill.green,html[data-theme=dark] .run-state.completed{background:#234638;color:#94ddba}
html[data-theme=dark] .pill.amber{background:#4d402d;color:#e9c384}
html[data-theme=dark] .note,html[data-theme=dark] .connection,html[data-theme=dark] .agent-tags span,html[data-theme=dark] .context-item,html[data-theme=dark] .chat-attachment{background:#2b3345;border-color:#3c465a;color:#bac3d2}
html[data-theme=dark] .context-item{background:transparent;border:0}
html[data-theme=dark] .node{background:#252d3e;border-color:#414a5d}
html[data-theme=dark] .node-icon,html[data-theme=dark] .row-icon,html[data-theme=dark] .chat-symbol{background:#393254;color:#b4a9ff}
html[data-theme=dark] .row,html[data-theme=dark] .metric,html[data-theme=dark] .features,html[data-theme=dark] footer{border-color:#394252}
html[data-theme=dark] .row-text h3,html[data-theme=dark] .context-item strong,html[data-theme=dark] .vpn-fold>summary{color:#e5e7eb}
html[data-theme=dark] .secondary,html[data-theme=dark] .usage-toggle,html[data-theme=dark] #rename-project{background:#30384a;color:#d4d9e4;border-color:#495268;box-shadow:none}
html[data-theme=dark] .secondary:hover,html[data-theme=dark] .usage-toggle:hover,html[data-theme=dark] #rename-project:hover{background:#393254;color:#d1caff;border-color:#665796}
html[data-theme=dark] input,html[data-theme=dark] textarea,html[data-theme=dark] select,html[data-theme=dark] .clients-controls input,html[data-theme=dark] .clients-controls select{background:#202737;color:#e5e7eb;border-color:#4a5367}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#8792a8}
html[data-theme=dark] label{color:#c5ccda}
html[data-theme=dark] .client-table th,html[data-theme=dark] .usage-detail-scroll th{background:#2a3243;color:#aab4c5;border-color:#414a5d}
html[data-theme=dark] .client-table td,html[data-theme=dark] .usage-detail-scroll td{color:#d8dde6;border-color:#394252}
html[data-theme=dark] .client-table tbody tr:hover{background:#2c2d48}
html[data-theme=dark] .client-table .client-name-button,html[data-theme=dark] .recipient-row button{color:#e5e7eb}
html[data-theme=dark] .client-table th[aria-sort=ascending] .client-sort,html[data-theme=dark] .client-table th[aria-sort=descending] .client-sort{color:#c6bcff}
html[data-theme=dark] .recipient-row th{background:#332d55!important}
html[data-theme=dark] .usage-grid i{border-color:#414a5d}
html[data-theme=dark] .usage-before,html[data-theme=dark] .usage-period,html[data-theme=dark] .vpn-platform-chip,html[data-theme=dark] .vpn-usage-metrics>div{background:#30384a;color:#c2c9d5}
html[data-theme=dark] .usage-period button[aria-pressed=true]{background:#4c416b;color:#e0d9ff}
html[data-theme=dark] .user-message{background:#393254}
html[data-theme=dark] .assistant-message{background:#252d3e;border-color:#414a5d}
html[data-theme=dark] .message-label,html[data-theme=dark] .message-body{color:#dce1ea}
html[data-theme=dark] dialog,html[data-theme=dark] .client-drawer#vpn-access-dialog,html[data-theme=dark] #portal-status-dialog,html[data-theme=dark] #vpn-access-help{background:#242b3b;color:#e5e7eb;border-color:#414a5d;box-shadow:0 20px 60px #0006}
html[data-theme=dark] dialog::backdrop{background:#050914aa}
html[data-theme=dark] .portal-detail-heading,html[data-theme=dark] .drawer-section{border-color:#414a5d}
html[data-theme=dark] .portal-provider-head,html[data-theme=dark] .portal-models>div,html[data-theme=dark] .portal-limit,html[data-theme=dark] .portal-provider-card{background:#2b3345;border-color:#414a5d;color:#dce1ea}
html[data-theme=dark] .login-card{background:#242b3b;border-color:#414a5d;box-shadow:0 12px 30px #0003}
html[data-theme=dark] .login-card h1{color:#f2f4f8}
html[data-theme=dark] #mfa-recovery-codes{background:#202737;color:#e5e7eb}

@media(max-width:650px){
  #projects{display:grid;gap:2px;overflow:visible;margin:0}
  .project-item{width:100%;white-space:normal}
  .sidebar .project-sections.tabs{display:grid;overflow:visible;margin:3px 0 10px 22px;padding:2px 0 2px 10px}
  .sidebar .project-sections button{width:100%;white-space:normal;min-height:35px}
  .header-actions{gap:7px}
  .theme-toggle-text{display:none}
}

/* UI polish informed by Unslop by Damir Sokolovsky, CC BY 4.0:
   https://github.com/heydamir/unslop . Keep Mosaic's layout and the portal's Heroicons. */
.brand{font-weight:600;letter-spacing:0}
.workspace-label{margin:20px 8px 24px;color:#5f6b7b;font-size:12px;font-weight:500;letter-spacing:0}
.workspace-label span{color:#5f6b7b;font-size:11px;font-weight:500;padding:3px 6px}
.section-label{color:#5f6b7b;font-size:12px;font-weight:500;letter-spacing:0;padding-bottom:8px}
.project-item{min-height:40px;padding:8px 12px;font-size:13px}
.project-item.active{background:#f5f5f8;color:#303547;font-weight:600}
.project-item.active .glyph{color:#667085}
.sidebar .project-sections button{min-height:36px;padding:8px 10px;font-size:13px}
.sidebar .project-sections button.active{font-weight:600}
.sidebar .project-sections.tabs{margin-bottom:16px}
.sidebar-tools button{min-height:36px;padding:8px 10px;font-size:12px}
.sidebar-bottom small{font-size:11px;color:#5f6b7b}
.breadcrumb{font-size:13px;color:#5f6b7b}
.local-badge,.theme-toggle{font-size:12px}
.content{max-width:1640px;padding:32px 32px 24px}
.eyebrow,.project-heading .eyebrow{font-size:12px;font-weight:500;letter-spacing:0;color:#5f6b7b}
h1{font-weight:600;letter-spacing:-.02em}
.project-heading p{font-size:13px}
.card,.usage-card,.vpn-summary>div,.usage-day-details,.client-table-wrap{border-radius:12px}
.card{padding:24px}
h2{font-weight:600;letter-spacing:0}
h3{font-size:14px}
.pill{font-size:11px;font-weight:500}
.note,.connection{font-size:13px;line-height:1.5;color:#5f6b7b}
.node small,.features small,.row p,.ai-card p{font-size:12px;color:#5f6b7b}
.features strong{font-size:26px;font-weight:600;letter-spacing:0;font-variant-numeric:tabular-nums}
.primary,.secondary,.usage-toggle{min-height:40px;font-size:13px;border-radius:8px}
.primary{background:#654de8}
.primary:hover{background:#5740d4}
label{font-size:13px}
.source,footer{font-size:12px;color:#5f6b7b}
.client-table{font-size:13px}
.client-table th,.usage-detail-scroll th{font-size:12px;font-weight:500;letter-spacing:0;text-transform:none;color:#5f6b7b}
.client-table .client-sort{font-size:12px;font-weight:500}
.client-table .client-name-button,.client-inline-button{font-size:13px;font-weight:500}
.client-table td small{font-size:12px;margin-top:4px}
.vpn-summary span{font-size:13px;color:#5f6b7b}
.vpn-summary strong{font-size:28px;font-weight:600;letter-spacing:0;font-variant-numeric:tabular-nums}
.usage-card h3{font-size:14px}
.usage-card-heading p,.usage-total>span{font-size:12px}
.usage-empty{grid-column:1/-1;padding:24px;border:1px solid #e7e9ed;border-radius:12px;background:#fff}
.usage-empty strong{display:block;font-size:14px;font-weight:600;color:#1f2937}
.usage-empty p{margin:6px 0 0;font-size:13px}
.message-label{font-size:12px}
.message-label span{font-size:11px}
.message-body{font-size:14px;line-height:1.65}
.context-item,.context-item strong{font-size:13px}
.chat-composer,.chat-composer-tools span,.chat-file-button,#model{font-size:13px}
.chat-answer-actions button{font-size:12px}
html[data-theme=dark] .project-item.active{background:#2b3343;color:#e5e7eb}
html[data-theme=dark] .project-item.active .glyph{color:#aeb6c6}
html[data-theme=dark] .workspace-label,html[data-theme=dark] .section-label,html[data-theme=dark] .breadcrumb,html[data-theme=dark] .project-heading .eyebrow{color:#aeb6c6}
html[data-theme=dark] .vpn-summary span,html[data-theme=dark] .features small,html[data-theme=dark] .node small,html[data-theme=dark] .row p,html[data-theme=dark] .ai-card p,html[data-theme=dark] footer{color:#aeb6c6}
html[data-theme=dark] .usage-empty{background:#242b3b;border-color:#394252}
html[data-theme=dark] .usage-empty strong{color:#f2f4f8}
@media(max-width:1100px){
  .content{padding:28px 24px 22px}
}
@media(max-width:650px){
  .sidebar{padding:0 16px 16px}
  .content{padding:24px 16px 20px}
  .sidebar-tools button{font-size:12px}
  .vpn-summary span{font-size:12px}
  .vpn-summary strong{font-size:22px}
  .sidebar .project-sections.tabs{display:flex;gap:4px;margin:4px 0 12px;padding:4px 0 0;border-left:0;border-top:1px solid #e5e7eb;overflow-x:auto}
  .sidebar .project-sections button{flex:none;width:auto;min-height:36px;padding:8px 10px;white-space:nowrap}
  .sidebar .project-sections .nav-beta{margin-left:4px}
  .sidebar-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:8px 0 0;padding:8px 0 0;overflow:visible}
  .sidebar-tools button{width:100%;min-width:0;white-space:normal}
  .status-strip+header{flex-wrap:nowrap}
  .breadcrumb{width:auto;flex:1;min-width:0;white-space:nowrap}
  .breadcrumb #project-crumb{min-width:0;overflow:hidden;text-overflow:ellipsis}
  .header-actions{flex:none}
  .local-badge{display:none}
  html[data-theme=dark] .sidebar .project-sections.tabs{border-top-color:#41495b}
}
/* Workspace navigation and record-based project views. */
.workspace-home-link{display:flex;align-items:center;gap:10px;margin:0 0 16px;padding:10px 12px;border-radius:8px;color:#6b7280;text-decoration:none;font-size:12px;font-weight:600}.workspace-home-link .hi{font-size:17px}.workspace-home-link:hover,.workspace-home-link.active{background:#f0edfd;color:#5d47de}
.workspace-management{margin-top:auto;border-top:1px solid #e9eaf0;padding-top:10px}.workspace-management summary{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:8px;color:#6b7280;cursor:pointer;font-size:12px;font-weight:600;list-style:none}.workspace-management summary::-webkit-details-marker{display:none}.workspace-management summary .hi{font-size:17px}.workspace-management summary:hover{background:#f7f7fa;color:#5d47de}.workspace-management .sidebar-tools{margin:0;padding:2px 0 8px;border:0}
.breadcrumb a{color:inherit;text-decoration:none}.breadcrumb a:hover{text-decoration:underline}.breadcrumb [hidden]{display:none}.project-heading [hidden]{display:none!important}
.workspace-dashboard{display:grid;gap:18px}.workspace-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.workspace-stats .card{margin:0;padding:17px 19px;display:grid;align-content:start;gap:8px}.workspace-stats span{font-size:12px;color:#687487}.workspace-stats strong{font-size:27px;font-weight:650;line-height:1.15;color:#273447;font-variant-numeric:tabular-nums}.workspace-stats small{font-size:11px;color:#8994a2}.workspace-stats .workspace-backup-value{font-size:14px;line-height:1.45}.workspace-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.workspace-grid .card{margin:0}
.workspace-task-link,.workspace-project-link{width:100%;display:flex;align-items:center;gap:10px;padding:11px 2px;border:0;border-top:1px solid #e9eaf0;background:none;text-align:left;color:#39465a}.workspace-task-link>span:nth-child(2),.workspace-project-link>span:nth-child(2){flex:1;min-width:0}.workspace-task-link strong,.workspace-project-link strong{display:block;font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.workspace-task-link small,.workspace-project-link small{display:block;color:#8a95a4;font-size:11px;margin-top:3px}.workspace-task-link>.hi,.workspace-project-link>.hi{color:#8792a5}.workspace-task-link:hover,.workspace-project-link:hover{color:#5d47de}.workspace-server-row{display:flex;align-items:center;gap:9px;padding:10px 0;border-top:1px solid #e9eaf0;font-size:12px}.workspace-server-row strong{flex:1;font-weight:600}.workspace-server-row>span:last-child{color:#7a8797}.status-dot{width:7px;height:7px;border-radius:50%;flex:none;background:#a1acba}.status-dot.ok{background:#4f9a73}.status-dot.warn{background:#b8874d}
.document-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 0;border-top:1px solid #e9eaf0}.document-row.is-archived{opacity:.68}.document-row-main{display:flex;align-items:center;gap:12px;min-width:0}.document-icon{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:8px;background:#f0edfd;color:#6d5bd0;font-size:17px}.document-row h3{margin:0;font-size:13px}.document-row p{margin:4px 0 0;font-size:11px}.document-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.document-actions button{white-space:nowrap}.document-actions .secondary{padding:7px 10px;font-size:11px}
#document-dialog{width:min(680px,calc(100vw - 30px));max-height:90dvh;overflow:auto}#document-dialog label{margin-top:12px}#document-body{width:100%;min-height:260px}.document-import{display:inline-flex;align-items:center;gap:7px;color:#5d47de;cursor:pointer}#document-file{position:absolute;width:1px;height:1px;opacity:0}#document-error{color:#a54242;font-size:12px}#document-versions-dialog{width:min(680px,calc(100vw - 30px));max-height:85dvh;overflow:auto}.document-version{border-top:1px solid #e9eaf0;padding:13px 0}.document-version summary{cursor:pointer;font-size:12px}.document-version strong{display:block;margin:13px 0 5px}.document-version pre{max-height:280px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.5}
.chat-documents{margin:13px 0;border:1px solid #e4e7ed;border-radius:9px;padding:10px 13px}.chat-documents summary{cursor:pointer;color:#49566a;font-size:12px;font-weight:600}.chat-doc-choice{display:flex;align-items:center;gap:8px;margin:9px 0;font-size:12px}.chat-doc-choice input{display:inline-block;width:16px;height:16px;flex:none;margin:0;accent-color:#6d5bd0}.chat-doc-choice span{display:flex;align-items:center;gap:6px}.chat-documents .source{margin:8px 0 0}
html[data-theme=dark] .workspace-home-link,html[data-theme=dark] .workspace-management summary{color:#b7c0d0}html[data-theme=dark] .workspace-home-link:hover,html[data-theme=dark] .workspace-home-link.active,html[data-theme=dark] .workspace-management summary:hover{background:#2b3346;color:#fff}html[data-theme=dark] .workspace-management,html[data-theme=dark] .workspace-task-link,html[data-theme=dark] .workspace-project-link,html[data-theme=dark] .workspace-server-row,html[data-theme=dark] .document-row,html[data-theme=dark] .document-version{border-color:#394252}html[data-theme=dark] .workspace-stats strong,html[data-theme=dark] .workspace-task-link,html[data-theme=dark] .workspace-project-link,html[data-theme=dark] .workspace-server-row{color:#eef1f7}html[data-theme=dark] .workspace-stats span,html[data-theme=dark] .workspace-server-row>span:last-child,html[data-theme=dark] .document-row p{color:#aeb6c6}html[data-theme=dark] .document-icon{background:#34304c;color:#c3b6ff}html[data-theme=dark] .chat-documents{border-color:#414a5d}html[data-theme=dark] .chat-documents summary{color:#e1e5ed}
@media(max-width:1100px){.workspace-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace-grid{grid-template-columns:1fr}}
@media(max-width:650px){.workspace-home-link{margin:8px 0 0;padding:8px 10px}.workspace-management{margin:7px 0 0;padding:0;border:0}.workspace-management .sidebar-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.workspace-stats{gap:8px}.workspace-stats .card{padding:13px}.workspace-stats strong{font-size:22px}.document-row{align-items:flex-start;flex-direction:column}.document-actions{padding-left:46px}.workspace-server-row>span:last-child{font-size:11px}}
