/* Shared enterprise appearance: warm ivory by day, ink and gold by night. */
.resource-preview-tag{border:1px solid #d6a42e45;background:#e7b63a14;color:#b68929;border-radius:20px;padding:5px 10px;font-size:11px;white-space:nowrap}.resource-notice{padding:14px 18px;border:1px solid #d6a42e30;border-radius:12px;color:var(--ui-muted);background:var(--ui-tint);margin-bottom:24px;line-height:1.8}.resource-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,370px);gap:24px;align-items:start}.resource-layout:not(:has(.resource-editor)){grid-template-columns:1fr}.resource-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}.resource-card{max-width:440px;padding:24px;border:1px solid #d6a42e35;border-radius:16px;background:linear-gradient(135deg,var(--ui-tint),var(--ui-panel) 60%)}.resource-card-top{display:flex;align-items:center;justify-content:space-between}.resource-avatar{width:46px;height:46px;border:1px solid #d6a42e45;border-radius:13px;background:var(--ui-tint);color:#b78a25;display:grid;place-items:center;font-size:20px;font-weight:700}.resource-card h2{font-size:21px;margin:20px 0}.resource-supply small{color:#b68929;font-size:11px;letter-spacing:2px}.resource-supply p{line-height:1.9;color:var(--ui-muted);white-space:pre-wrap;overflow-wrap:anywhere}.resource-card dl{padding:16px 0;border-top:1px solid var(--ui-line);margin-top:20px}.resource-card dl div{display:grid;grid-template-columns:76px 1fr;gap:12px;margin:12px 0}.resource-card dt{color:var(--ui-muted);font-size:12px}.resource-card dd{margin:0;color:var(--ui-fg);overflow-wrap:anywhere;user-select:text}.resource-card-foot{font-size:10px;color:var(--ui-muted);border-top:1px solid var(--ui-line);padding-top:16px}.resource-editor h2{font-size:20px}.resource-editor p{line-height:1.8}.resource-editor .form-stack{margin-top:20px}.resource-editor [role=status]{line-height:1.8}@media(max-width:1000px){.resource-layout{grid-template-columns:1fr}}
html[data-theme-scope][data-theme]{--ui-bg:#faf7f0;--ui-panel:#fdfbf6;--ui-sidebar:#fbf9f5;--ui-fg:#29332d;--ui-muted:#657269;--ui-line:#e8e4db;--ui-accent:#ffbf18;--ui-tint:#f6e8c64d;--ui-grid:#7e725006;color-scheme:light;background:var(--ui-bg);color:var(--ui-fg)}
html[data-theme-scope][data-theme="dark"]{--ui-bg:#090e0b;--ui-panel:#101611;--ui-sidebar:#0c120e;--ui-fg:#e5e5dc;--ui-muted:#9aa79e;--ui-line:#20291f;--ui-accent:#ffca28;--ui-tint:#e2b83714;--ui-grid:#bbb88a05;color-scheme:dark}
html[data-theme-scope][data-theme] body{background:var(--ui-bg);color:var(--ui-fg);font-family:'Segoe UI','Microsoft YaHei',sans-serif;font-size:13px}
html[data-theme-scope][data-theme] .layout{grid-template-columns:260px minmax(0,1fr)}
html[data-theme-scope][data-theme] .sidebar{width:260px;padding:25px 12px 15px;background:var(--ui-sidebar);border-right:1px solid var(--ui-line);box-shadow:none}
html[data-theme-scope][data-theme] .brand{color:var(--ui-fg);padding:0 8px;gap:12px;font-size:17px}
html[data-theme-scope][data-theme] .brand img{width:40px;height:40px;border-radius:12px;box-shadow:0 0 22px #ffc12820}
html[data-theme-scope][data-theme] .brand small{color:#dba127;font-size:9px;letter-spacing:4px;margin-top:5px}
html[data-theme-scope][data-theme] .navlabel{margin:35px 12px 12px;color:var(--ui-muted);font-size:10px;letter-spacing:3px}
html[data-theme-scope][data-theme] .nav button{min-height:40px;padding:10px 12px;margin:3px 0;border:1px solid transparent;border-radius:12px;background:transparent;color:var(--ui-muted);font-size:13px;box-shadow:none}
html[data-theme-scope][data-theme] .nav button:hover{background:var(--ui-tint);color:var(--ui-fg)}
html[data-theme-scope][data-theme] .nav button.active{background:linear-gradient(90deg,var(--ui-tint),transparent);border-color:#d9a53355;color:var(--ui-fg);box-shadow:none}
html[data-theme-scope][data-theme] .nav .symbol{color:var(--ui-muted);font-size:16px}
html[data-theme-scope][data-theme] .nav button.active .symbol{color:#dfa92a}
html[data-theme-scope][data-theme] .topbar{height:70px;padding:0 28px;background:var(--ui-sidebar);border-bottom:1px solid var(--ui-line);box-shadow:none;color:var(--ui-muted)}
html[data-theme-scope][data-theme] .topbar strong,html[data-theme-scope][data-theme] .brand,html[data-theme-scope][data-theme] .panel-head h2,html[data-theme-scope][data-theme] .page-head h1{color:var(--ui-fg)}
html[data-theme-scope][data-theme] .content{background:radial-gradient(ellipse at 45% 35%,var(--ui-tint),transparent 60%),radial-gradient(ellipse at 100% 100%,#00a66d09,transparent 45%),linear-gradient(var(--ui-grid) 1px,transparent 1px),linear-gradient(90deg,var(--ui-grid) 1px,transparent 1px);background-size:auto,auto,56px 56px,56px 56px}
html[data-theme-scope][data-theme] .main{max-width:none;padding:34px 32px}
html[data-theme-scope][data-theme] .eyebrow{color:#ba8b24;font-size:10px;letter-spacing:3px}
html[data-theme-scope][data-theme] .page-head h1{font-size:26px;line-height:1.4}
html[data-theme-scope][data-theme] :is(.muted,.small-note,.hint,.page-head p,.metric-top,.account-details,.empty p,.empty){color:var(--ui-muted)}
html[data-theme-scope][data-theme] :is(.panel,.metric,.account,.platform-card,.quota){background:var(--ui-panel);border:1px solid var(--ui-line);border-radius:16px;box-shadow:0 4px 18px #00000003;color:var(--ui-fg)}
html[data-theme-scope][data-theme] :is(.metric-value,.account-title,.empty h3){color:var(--ui-fg)}
html[data-theme-scope][data-theme] .btn{background:var(--ui-accent);color:#251e09;border:1px solid transparent;border-radius:11px;font-weight:600;box-shadow:0 4px 16px #e5ab1820}
html[data-theme-scope][data-theme] .btn:hover{background:#efb521;color:#211b07}
html[data-theme-scope][data-theme] .btn.secondary{background:var(--ui-panel);border:1px solid var(--ui-line);color:var(--ui-fg);box-shadow:none}
html[data-theme-scope][data-theme] .btn.plain{background:transparent;border-color:transparent;color:var(--ui-muted);box-shadow:none}
html[data-theme-scope][data-theme] .btn.danger{background:#c9434318;color:#ca5151;border-color:#c9434340}
html[data-theme-scope][data-theme] :is(input,select,textarea,dialog,.route-dialog){background:var(--ui-panel);border-color:var(--ui-line);color:var(--ui-fg)}
html[data-theme-scope][data-theme] :is(input,select,textarea):focus{border-color:#d6a42e;box-shadow:0 0 0 3px #d6a42e18}
html[data-theme-scope][data-theme] :is(label,.form-stack .dialog-check){color:var(--ui-muted)}
html[data-theme-scope][data-theme] :is(.workspace-note,.banner,.hint,.outcome,.form-stack .dialog-check){background:var(--ui-tint);border-color:#d6a42e30;color:var(--ui-muted)}
html[data-theme-scope][data-theme] .workspace-note{border-radius:16px;padding:17px;line-height:1.9}
html[data-theme-scope][data-theme] .workspace-note strong{color:#c5932e}
html[data-theme-scope][data-theme] .user-card{color:var(--ui-fg);border-color:var(--ui-line)}
html[data-theme-scope][data-theme] .avatar{background:#007e59;color:#fff;border-radius:50%}
html[data-theme-scope][data-theme] :is(table,td){color:var(--ui-fg);border-color:var(--ui-line)}
html[data-theme-scope][data-theme] th{background:var(--ui-tint);color:var(--ui-muted)}
html[data-theme-scope][data-theme] tbody tr:hover{background:var(--ui-tint)}
html[data-theme-scope][data-theme] :is(.account-footer,.phrase){border-color:var(--ui-line)}
html[data-theme-scope][data-theme] :is(.filters button.active,.pill.gray){background:var(--ui-tint);color:var(--ui-fg);border-color:var(--ui-line)}
html[data-theme-scope][data-theme] :is(.filters button,.phrase p,.phrase strong){color:var(--ui-muted)}
.connection-state{min-height:calc(100vh - 150px);display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:40px 18px}
.connection-orbit{width:220px;height:220px;position:relative;display:grid;place-items:center;margin-bottom:26px}
.connection-orbit i{position:absolute;border:1px dashed #b2985a35;border-radius:50%;inset:0}.connection-orbit i:nth-child(2){inset:27px}.connection-orbit i:nth-child(3){inset:54px}
.connection-orbit:before,.connection-orbit:after{content:'';position:absolute;width:8px;height:8px;background:#edb33f;border-radius:50%;box-shadow:0 0 15px #e8b03188;top:45px;left:30px}.connection-orbit:after{top:auto;left:auto;bottom:24px;right:65px}
.connection-orbit span{display:grid;place-items:center;width:64px;height:64px;border-radius:17px;border:1px solid #dcb24144;background:var(--ui-panel);box-shadow:0 0 50px #e9b73125;color:#eab131;font-size:35px}
.connection-eyebrow{color:#dba22f;font-size:11px;font-weight:700;letter-spacing:4px}
html[data-theme-scope][data-theme] .connection-state h1{font-family:'Noto Serif SC','Songti SC','SimSun',serif;font-size:clamp(28px,4vw,46px);font-weight:700;line-height:1.4;margin:12px 0;color:var(--ui-fg)}
.connection-copy{max-width:420px;line-height:1.8;color:var(--ui-muted);margin:0}.connection-actions{display:flex;gap:12px;margin:32px 0}.connection-actions .btn{border-radius:24px;padding:13px 20px}.connection-footnote{color:var(--ui-muted);font-size:11px}
html[data-theme-scope="desktop"][data-theme] :is(.brandbar,#sidebar,.controls){background:var(--ui-sidebar);color:var(--ui-muted);border-color:var(--ui-line)}
html[data-theme-scope="desktop"][data-theme] #welcome{background:radial-gradient(ellipse at 45% 35%,var(--ui-tint),transparent 65%),var(--ui-bg)}
html[data-theme-scope="desktop"][data-theme] :is(.account-row,.sidebar-top button,.sidebar-accounts>button,.center-heading h1,.section-heading h2,.platform-card strong){color:var(--ui-fg)}
html[data-theme-scope="desktop"][data-theme] :is(.account-row.active,.sidebar-top button.selected){background:var(--ui-tint);box-shadow:inset 2px 0 #e7b63a}
html[data-theme-scope="desktop"][data-theme] :is(.control-row select,.provider,.saved-account,.color-picker){background:var(--ui-panel);color:var(--ui-fg);border-color:var(--ui-line)}
@media(max-width:800px){html[data-theme-scope][data-theme] .layout{grid-template-columns:76px minmax(0,1fr)}html[data-theme-scope][data-theme] .sidebar{width:76px;padding:20px 10px}html[data-theme-scope][data-theme] .main{padding:24px 16px}.connection-state{min-height:70vh}.connection-orbit{width:160px;height:160px}.connection-actions{flex-wrap:wrap;justify-content:center}}
/* Feature surfaces use the same tokens instead of their former green/blue palette. */
html[data-theme-scope][data-theme] :is(.login-story,.login-form){background:var(--ui-bg);color:var(--ui-fg)}
html[data-theme-scope][data-theme] .login-story{background:radial-gradient(ellipse at 30% 40%,var(--ui-tint),transparent 65%),var(--ui-sidebar);border-right:1px solid var(--ui-line)}
html[data-theme-scope][data-theme] :is(.login-copy h1,.login-form h2){color:var(--ui-fg)}
html[data-theme-scope][data-theme] :is(.login-copy p,.login-footer,.login-bubble small){color:var(--ui-muted)}
html[data-theme-scope][data-theme] :is(.login-bubble,.studio-credit-strip,.studio-output,.studio-preview,.route-node,.route-option,.switch-row,.fp-editor,.fp-row,.channel-auth-card,.account-dialog-note,.note){background:var(--ui-panel)!important;color:var(--ui-fg);border-color:var(--ui-line)}
html[data-theme-scope][data-theme] :is(.studio-credit-strip strong,.channel-auth-title strong,.route-heading h2,.route-node strong,.switch-copy strong,.fp-editor h3){color:var(--ui-fg)}
html[data-theme-scope][data-theme] :is(.studio-status,.route-note,.switch-copy small,.channel-auth-copy small,.fp-row label,.platform-card span,.saved-account small,.fine){color:var(--ui-muted)}
html[data-theme-scope][data-theme] :is(.primary,#create-account,.route-primary,.fp-save){background:var(--ui-accent);color:#251e09;border:1px solid transparent;border-radius:11px}
html[data-theme-scope][data-theme] :is(.channel-auth-card:has(input:checked),.route-option:has(input:checked)){background:var(--ui-tint)!important;border-color:#d6a42e66;box-shadow:none}
html[data-theme-scope][data-theme] input[type=checkbox]{accent-color:#cf9e2b}
html[data-theme-scope][data-theme] .switch-control input:checked+.switch-track{background:#c69c31}
html[data-theme-scope][data-theme] :is(.channel-auth-card input:checked,.channel-auth-card:has(input:checked) .channel-auth-check){background:#bd932d;border-color:#bd932d}
html[data-theme-scope][data-theme] :is(.channel-auth-state,.channel-auth-check){background:var(--ui-tint);color:var(--ui-muted)}
html[data-theme-scope][data-theme] .channel-auth-state.is-authorized{background:#078a5e18;color:#208966}
html[data-theme-scope][data-theme] :is(.brandbar button,.section-heading button,.platform-card em,.platform-install,.platform-download-link){color:#bc9029;border-color:var(--ui-line);background:var(--ui-tint)}
html[data-theme-scope][data-theme] :is(#account-context-menu,#account-context-menu button){background:var(--ui-panel);color:var(--ui-fg);border-color:var(--ui-line)}
html[data-theme-scope][data-theme] #account-context-menu button:hover{background:var(--ui-tint)}
html[data-theme-scope][data-theme] #account-context-menu button.danger{color:#d45757}
html[data-theme-scope][data-theme] :is(#toast,#notice){background:var(--ui-panel);color:var(--ui-fg);border:1px solid var(--ui-line)}
html[data-theme-scope][data-theme] :is(.form-stack input,.form-stack select,.form-stack textarea){color:var(--ui-fg)}
html[data-theme-scope][data-theme] a{color:#ba8c20}
html[data-theme-scope][data-theme] button:focus-visible,html[data-theme-scope][data-theme] a:focus-visible{outline:2px solid #c59a32;outline-offset:3px}
/* Resolve legacy feature rules here so every surface shares one palette. */
html[data-theme-scope][data-theme] {
  --ui-accent-text: #806013;
  --ui-danger: #a73535;
  --ui-success: #286342;
  --green: var(--ui-accent);
  --line: var(--ui-line);
  --muted: var(--ui-muted);
}
html[data-theme-scope][data-theme="dark"] {
  --ui-accent-text: #e9bd4a;
  --ui-danger: #ef9690;
  --ui-success: #84cda1;
}
html[data-theme-scope][data-theme] .sidebar .brand { margin-bottom: 0; }
html[data-theme-scope][data-theme] .nav { gap: 4px; }
html[data-theme-scope][data-theme] .nav button { margin: 0; padding-block: 9px; line-height: 20px; }
html[data-theme-scope][data-theme] .server-picker {
  /* Earlier service/eye-care styles use !important for these three properties. */
  background: var(--ui-panel) !important;
  color: var(--ui-fg) !important;
  border-color: var(--ui-line) !important;
  box-shadow: none;
}
html[data-theme-scope][data-theme] .server-picker:hover { background: var(--ui-tint) !important; }
html[data-theme-scope][data-theme] .theme-toggle,
html[data-theme-scope][data-theme] .btn.secondary:hover:not(:disabled) {
  background: var(--ui-panel);
  color: var(--ui-fg);
  border-color: var(--ui-line);
  box-shadow: none;
}
html[data-theme-scope][data-theme] :is(.theme-toggle,.btn.secondary):hover:not(:disabled) { background: var(--ui-tint); }
html[data-theme-scope][data-theme] :is(.btn.plain,.btn.plain:hover:not(:disabled)) { background: transparent; color: var(--ui-muted); }
html[data-theme-scope][data-theme] :is(.eyebrow,.resource-preview-tag,.resource-avatar,.resource-supply small,.workspace-note strong,.quota-remaining,.studio-step,.connection-eyebrow,.resource-card a) { color: var(--ui-accent-text); }
html[data-theme-scope][data-theme] :is(.dialog-head h2,.dialog-heading h2,.image-canvas h3,.fp-title h3,.route-option strong,.route-node dd,.quota strong,.phrase strong) { color: var(--ui-fg); }
html[data-theme-scope][data-theme] :is(.settings-list,.login-form p,.login-bubble .example,.login-footnote,.image-canvas p,.studio-prompt-foot,.preview-caption,.channel-auth-footnote,.route-dialog p,.route-option small,.route-node small,.fp-sub,.fp-scope,.quota-caption,.quota>span,.quota small,.control-row>span,.sidebar-accounts h2,.sidebar-foot small,.center-heading p,.section-heading small,.brandbar>span) { color: var(--ui-muted); }
html[data-theme-scope][data-theme] :is(.image-model-security,.fingerprint-panel,.keepalive-item,.color-picker input[type=color],.generated-image-card img,.tenant-menu-items) { background: var(--ui-panel); color: var(--ui-fg); border-color: var(--ui-line); }
html[data-theme-scope][data-theme] :is(.color-picker output,.route-close,.route-node button,.quota button,.saved-account b,.fp-seed code,.platform-card em,.platform-install,.platform-download-link) { color: var(--ui-accent-text); }
html[data-theme-scope][data-theme] :is(dialog .dialog-heading button,dialog #new-group,.brandbar .theme-toggle,.account-row .close-account) { background: var(--ui-panel); color: var(--ui-fg); border-color: var(--ui-line); }
html[data-theme-scope][data-theme] :is(dialog .dialog-heading button,dialog #new-group,.account-row .close-account):hover { background: var(--ui-tint); border-color: var(--ui-accent-text); }
html[data-theme-scope][data-theme] dialog :is(input,select,textarea) { background: var(--ui-panel); color: var(--ui-fg); border-color: var(--ui-line); }
html[data-theme-scope][data-theme] dialog :is(label,p) { color: var(--ui-muted); }
html[data-theme-scope][data-theme] dialog input[type=checkbox] { accent-color: var(--ui-accent-text); }
html[data-theme-scope][data-theme] dialog::backdrop { background: #07110dcc; backdrop-filter: blur(3px); }
html[data-theme-scope][data-theme="light"] dialog::backdrop { background: #29332d55; }
html[data-theme-scope][data-theme] :is(.image-canvas,.account-extra,.keepalive-item,.channel-auth-footnote,.sidebar-accounts,hr) { border-color: var(--ui-line); }
html[data-theme-scope][data-theme] :is(.error,.fp-error,.route-state.offline,.danger-text) { color: var(--ui-danger); }
html[data-theme-scope][data-theme] .pill { color: var(--ui-success); background: #078a5e18; }
html[data-theme-scope][data-theme] .pill.gray { color: var(--ui-muted); background: var(--ui-tint); }
html[data-theme-scope][data-theme] .pill.warn { color: var(--ui-accent-text); background: var(--ui-tint); }
html[data-theme-scope][data-theme] .route-state { color: var(--ui-success); }
html[data-theme-scope][data-theme] .route-option em { background: var(--ui-accent); color: #251e09; }
html[data-theme-scope][data-theme] .progress { background: var(--ui-line); }
html[data-theme-scope][data-theme] .switch-track { background: var(--ui-line); }
html[data-theme-scope][data-theme] .switch-track::after { background: var(--ui-panel); }
html[data-theme-scope][data-theme] ::selection { background: #e5b64155; color: var(--ui-fg); }
html[data-theme-scope][data-theme] ::-webkit-scrollbar-track { background: var(--ui-bg); }
html[data-theme-scope][data-theme] ::-webkit-scrollbar-thumb { background: var(--ui-line); border-color: var(--ui-bg); }
html[data-theme-scope][data-theme].desktop-client body::before { background: var(--ui-sidebar); color: var(--ui-muted); }
html[data-theme-scope="workspace"][data-theme] .topbar-right { gap: 10px; }
html[data-theme-scope="workspace"][data-theme] .topbar { gap: 16px; }
html[data-theme-scope="workspace"][data-theme] .sidebar { overflow-y: auto; }
.connection-orbit svg { width: 29px; height: 29px; }
@media (max-width: 1100px) {
  html[data-theme-scope="workspace"][data-theme] .topbar-right>.muted { display: none; }
}
@media (max-width: 800px) {
  html[data-theme-scope="workspace"][data-theme] .topbar { height: auto; min-height: 70px; flex-wrap: wrap; padding: 14px 16px; gap: 10px; }
  html[data-theme-scope][data-theme] .sidebar .brand { margin-bottom: 22px; }
}
