/* Uses rcx-ui's default warm palette and shared component dimensions. */
:root {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-synthesis: none;
  --brand: #F47A20;
  --brand-hover: #D86514;
  --page: oklch(0.97 0.004 60);
  --card: oklch(0.99 0.003 60);
  --subtle: oklch(0.94 0.006 60);
  --text: oklch(0.18 0.01 60);
  --secondary: #4B5563;
  --muted: #646A77;
  --border: oklch(0.91 0.007 60);
  --border-strong: oklch(0.88 0.008 60);
  --active: #FCEBDD;
  --active-text: oklch(0.42 0.15 45);
  --shadow: 0 1px 3px rgb(0 0 0 / 8%);
  color: var(--text);
  background: var(--page);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 20px; }
[hidden] { display: none !important; }
.ui-update { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; background: var(--active); color: var(--text); border-bottom: 1px solid var(--brand); }
.ui-update > span { flex: 1 1 240px; }
button, input, select { font: inherit; }
button { cursor: pointer; border: 1px solid transparent; border-radius: 8px; min-height: 44px; padding: 12px 24px; font-weight: 500; transition: background 150ms, border-color 150ms; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
input:focus-visible, select:focus-visible { outline: 1px solid var(--brand); border-color: var(--brand); }
a { color: var(--active-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.4px; margin: 8px 0 8px; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 16px; }
p { color: var(--muted); line-height: 1.6; margin: 8px 0 24px; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand img { height: 32px; width: auto; max-width: 145px; object-fit: contain; }
.workspace { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
aside { background: var(--card); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; padding: 0 12px 24px; }
aside .brand { height: 56px; margin: 0 -12px 24px; padding: 0 24px; border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; gap: 12px; text-align: left; background: transparent; color: var(--secondary); position: relative; height: 44px; padding: 0 12px; border-radius: 8px; }
.nav:hover { background: var(--subtle); }
.nav.active { background: var(--active); color: var(--active-text); }
.nav.active::before { content: ''; position: absolute; left: 0; top: 50%; height: 24px; width: 3px; transform: translateY(-50%); background: var(--brand); border-radius: 0 999px 999px 0; }
.nav.active .nav-icon { color: var(--brand-hover); }
.nav-icon { font-size: 18px; }
.text-button { background: transparent; color: var(--secondary); padding: 8px 0; min-height: 36px; font-size: 12px; }
.text-button:hover { color: var(--active-text); }
main { width: 100%; min-width: 0; padding: 0 32px 32px; }
header { height: 56px; margin: 0 -32px; padding: 0 32px; border-bottom: 1px solid var(--border); background: var(--card); display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--secondary); font-size: 13px; }
.connection { font-size: 12px; color: #166534; white-space: nowrap; }
#environments-view, #clients-view, #billing-view { max-width: 1280px; margin: auto; }
.primary { background: var(--brand); color: #fff; }
.primary:hover { background: var(--brand-hover); }
.secondary { background: transparent; color: var(--active-text); border-color: var(--brand); }
.secondary:hover { background: #FFE6D2; }
.danger { color: #fff; background: #EF4444; }
.danger:hover { background: #DC2626; }
.delete { color: #991B1B; background: transparent; border-color: #FECACA; }
.delete:hover { background: #FEE2E2; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.metrics > div { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 24px; }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: 12px; }
.metrics strong { display: block; font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.5px; margin: 16px 0 12px; }
.metrics small { font-size: 12px; }
.small { font-size: 12px; color: var(--muted); }
.environment { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); margin-top: 16px; padding: 24px; }
.environment h3 { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.created { font-size: 12px; color: var(--muted); margin-top: 8px; }
.badge { font-size: 12px; padding: 4px 12px; border-radius: 999px; background: var(--subtle); color: var(--secondary); text-transform: capitalize; white-space: nowrap; }
.badge.running { color: #166534; background: #DCFCE7; }
.badge.provisioning, .badge.resuming { color: #1D4ED8; background: #DBEAFE; }
.badge.paused, .badge.pausing { background: #ECEEF1; color: #3F4654; }
.badge.error, .badge.deleting { color: #991B1B; background: #FEE2E2; }
.links, .actions { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; align-items: center; }
.links a { background: var(--page); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.links a:hover { background: var(--active); text-decoration: none; }
.actions { flex-shrink: 0; }
.actions button { padding: 8px 16px; min-height: 36px; font-size: 13px; }
.environment-error { overflow-wrap: anywhere; color: #991B1B; font-size: 12px; margin: 12px 0 0; }
.footnote { font-size: 12px; margin-top: 24px; }
.empty { text-align: center; background: var(--card); border: 1px dashed var(--border-strong); border-radius: 12px; margin-top: 16px; padding: 48px 24px; }
.empty p { font-size: 14px; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; }
label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; }
input, select { width: 100%; min-width: 0; height: 44px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 12px 12px; color: var(--text); background: var(--card); }
input:disabled { background: var(--subtle); color: var(--muted); }
#create-form > label + label { margin-top: 16px; }
#invite-result { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 24px; }
#invite-link { margin-bottom: 12px; }
.notice { background: #DBEAFE; color: #1D4ED8; border: 1px solid #BFDBFE; border-radius: 8px; padding: 12px 16px; margin-top: 24px; font-size: 13px; }
.notice.error { color: #991B1B; background: #FEE2E2; border-color: #FECACA; }
.access-feedback.success { color: #166534; background: #DCFCE7; border-color: #BBF7D0; }
.access-feedback { overflow-wrap: anywhere; }
.auth { min-height: 100vh; display: grid; grid-template-columns: 45% 55%; }
.auth-hero { display: flex; flex-direction: column; background: #1A1D23; color: #fff; padding: 48px 56px; }
.auth-logo { height: 40px; width: auto; align-self: flex-start; filter: brightness(0) invert(1); }
.auth-hero-copy { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 48px 0; }
.auth-hero h2 { font-size: clamp(32px, 3.4vw, 52px); line-height: 1.18; letter-spacing: -1.5px; font-weight: 600; }
.auth-hero h2 span { color: var(--brand); }
.auth-hero p { max-width: 26rem; color: rgb(255 255 255 / 60%); font-size: 18px; margin-top: 24px; }
.auth-hero-footer { color: rgb(255 255 255 / 45%); font-size: 12px; border-top: 1px solid rgb(244 122 32 / 40%); padding-top: 24px; }
.auth-form-panel { display: grid; place-items: center; padding: 40px 24px; }
.error { color: #991B1B; }
dialog { border: 1px solid var(--border); border-radius: 12px; padding: 24px; max-width: 480px; width: calc(100% - 32px); color: var(--text); background: var(--card); box-shadow: 0 12px 30px rgb(0 0 0 / 18%); }
dialog::backdrop { background: rgb(0 0 0 / 55%); }
dialog p { font-size: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 230px minmax(0, 1fr); }
  main { padding: 0 24px 24px; }
  header { margin: 0 -24px; padding: 0 24px; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}
@media (max-width: 700px) {
  .workspace { grid-template-columns: 1fr; }
  aside { padding: 0 16px 12px; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; border-right: 0; border-bottom: 1px solid var(--border); }
  aside .brand { flex-basis: 100%; margin: 0 -16px 4px; padding: 0 16px; }
  .nav { min-height: 36px; padding: 8px 12px; font-size: 13px; }
  main { padding: 0 16px 24px; }
  header { height: 48px; margin: 0 -16px; padding: 0 16px; }
  .metrics { gap: 8px; }
  .metrics > div { padding: 12px; }
  .metrics span { font-size: 12px; }
  .metrics strong { font-size: 24px; }
  .metrics small { display: none; }
  .environment { padding: 16px; }
  .actions { flex-shrink: 1; }
  .panel { padding: 24px; }
  .dialog-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }

.badge.approval{color:var(--warn-text, #7A5900);background:#FEF3C7}#approval-error:empty{display:none}

#budget-confirm-error:empty{display:none}

.budget-authorization{flex-direction:row;align-items:flex-start;gap:12px;margin-top:16px;padding:12px;background:var(--active);border-radius:8px}.budget-authorization input{width:18px;height:18px;flex-shrink:0;margin-top:2px}
/* Orange-filled controls always use white foregrounds. Keep dark text on
   neutral surfaces, including native form controls that otherwise pick black. */
.secondary:hover, .links a:hover { background: var(--subtle); }
.budget-authorization { background: var(--card); border: 1px solid var(--border); }
.budget-authorization input {
  appearance: none;
  position: relative;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--card);
}
.budget-authorization input:checked { background: var(--brand-hover); border-color: var(--brand-hover); }
.budget-authorization input:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.service-group{display:flex;flex-wrap:wrap;gap:12px;align-items:center;width:100%}.service-group>strong{width:100%;color:var(--secondary)}.environment-usage{display:flex;gap:12px 24px;flex-wrap:wrap;margin-top:16px;padding:12px 0;border-top:1px solid var(--border);font-size:13px}.environment-usage>.small{width:100%}.copy-endpoint {display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px;min-height:24px;padding:4px;border:0;border-radius:4px;background:transparent;color:var(--secondary)}.copy-endpoint:hover {background:var(--subtle);color:var(--text)}.copy-endpoint svg {width:16px;height:16px}.copy-endpoint.copied {color:#166534}

.environment-status-filters{display:flex;flex-wrap:wrap;gap:8px;margin-left:auto}.environment-status-filters button{padding:4px 12px;min-height:32px;font-size:12px;background:var(--card);color:var(--secondary);border:1px solid var(--border);border-radius:8px}.environment-status-filters button:hover{background:var(--subtle)}.environment-status-filters button[aria-pressed="true"]{background:var(--active);color:var(--active-text);border-color:var(--brand)}@media(max-width:700px){.environment-status-filters{margin-left:0;width:100%}}

.links{min-width:0;max-width:100%}#credentials-copy-status:empty{display:none}

/* Redesign (Oct 2026): darker orange fills keep white text readable (4.5:1+). */
:root { --action: #B4500A; --action-hover: #9A4408; }
.primary { background: var(--action); }
.primary:hover { background: var(--action-hover); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.connection { display: inline-flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 999px; background: #16A34A; }
.connection.stale { color: var(--warn-text, #7A5900); } .connection.stale .live-dot { background: var(--warn-icon, #A16207); }
.nav-label { flex: 1; }
.workspace-admin-nav { min-width:0; }
.workspace-admin-nav > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; color:var(--secondary); font-weight:600; cursor:pointer; list-style:none; border-radius:8px; }
.workspace-admin-nav > summary::-webkit-details-marker { display:none; }
.workspace-admin-nav > summary:hover { background:var(--active); }
.workspace-admin-nav > summary:focus-visible { outline:2px solid var(--brand); outline-offset:-2px; }
@media (max-width:900px) {
  .workspace-admin-nav { flex-basis:100%; }
}
.nav-badge { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 8px; background: #FEF3C7; color: var(--warn-text, #7A5900); white-space: nowrap; }
.nav-badge.approval { background: #6B21A8; color: #fff; }
.nav-badge.warning { background: #FEE2E2; color: #991B1B; }
#environments-view { container: environments / inline-size; }
.overview { display: flex; flex-direction: column; gap: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 24px; margin-bottom: 24px; }
.slots { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.slots-detail { white-space: nowrap; }
.slot-meter { display: flex; gap: 4px; margin-top: 2px; }
.slot { flex: 1; max-width: 72px; height: 8px; border-radius: 4px; background: var(--subtle); }
.slot.used { background: #E0701F; }
.slots small { font-size: 12px; color: var(--muted); }
.overview .environment-status-filters { justify-content: flex-start; margin: 0; padding-top: 16px; border-top: 1px solid var(--border); }
/* One row only when the slot summary and every filter fit side by side; otherwise filters sit under a divider. */
@container environments (min-width: 1250px) {
  .overview { flex-direction: row; align-items: center; gap: 32px; }
  .slots { flex: 0 1 420px; }
  .overview .environment-status-filters { flex: 1 1 auto; justify-content: flex-end; padding-top: 0; border-top: 0; }
}
.environment-status-filters button { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; min-height: 36px; padding: 0 12px; }
.environment-status-filters button[aria-pressed="true"] { background: var(--selected-bg); color: var(--text); border-color: var(--selected-border); font-weight: 600; }
.filter-count { font-variant-numeric: tabular-nums; opacity: .8; }
.filter-dot, .status-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; background: currentColor; }
.filter-dot.running { background: #16A34A; } .filter-dot.progress { background: #2563EB; } .filter-dot.paused { background: #8A847B; } .filter-dot.approval { background: #9333EA; } .filter-dot.error { background: #DC2626; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-transform: none; }
.badge.progress { color: #1D4ED8; background: #DBEAFE; }
.badge.pausing { background: #ECEEF1; color: #3F4654; }
.badge.deleting, .badge.error { color: #991B1B; background: #FEE2E2; }
.badge.paused { color: #4A453F; background: #EFEBE5; }
.badge.approval { color: #6B21A8; background: #F3E8FF; }
.environment { padding: 0; overflow: visible; }
.environment-name { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.links { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; width: 100%; }
.links > .ui-services { flex: 999 1 440px; min-width: 0; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; width: 100%; }
.links a.app-tile { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); }
.links a.app-tile:hover { border-color: #E9A06A; background: #FFF8F2; text-decoration: none; }
.app-tile.legacy { background: var(--page); border-style: dashed; }
.app-icon { flex-shrink: 0; width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--active); color: var(--active-text); font-weight: 600; }
.app-tile.legacy .app-icon { background: var(--subtle); color: var(--secondary); }
.app-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-name { font-size: 13px; font-weight: 600; }
.app-desc { font-size: 12px; color: var(--muted); }
.credential-row { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.credential-label { width: 70px; font-size: 12px; color: var(--muted); }
.credential-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.credential-actions { display: flex; gap: 12px; }
.service-access .credential-actions { flex-wrap: wrap; align-items: center; }
.service-access > .small { width: 100%; }
.credential-actions .text-button { min-height: 32px; padding: 4px 0; font-size: 12px; font-weight: 600; color: var(--active-text); }
.sign-in > .secondary { padding: 8px 16px; min-height: 36px; font-size: 13px; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.step { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.services-bar { display: flex; gap: 2px; height: 8px; border-radius: 999px; overflow: hidden; background: var(--border); }
.services-bar .healthy { background: #15803D; } .services-bar .started { background: #93C5FD; }
.status-note { margin: 0; color: var(--secondary); font-size: 13px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 8px; background: transparent; color: var(--secondary); }
.icon-button:hover { background: var(--subtle); }
.menu { position: absolute; right: 0; top: 40px; z-index: 10; width: 220px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 28px rgb(0 0 0 / 14%); padding: 8px; display: flex; flex-direction: column; }
/* Budget & costs */
.headroom { display: flex; flex-direction: column; gap: 16px; }
.headroom h2 { font-size: 13px; color: var(--secondary); margin: 0; }
.headroom-callout { max-width: 420px; background: #FEF3C7; color: var(--warn-text, #7A5900); border-radius: 12px; padding: 12px 16px; font-size: 13px; }
.budget-bar { position: relative; display: flex; gap: 2px; height: 26px; }
.bar-segment { height: 100%; border-radius: 3px; }
.bar-segment.console { background: #2F6DB5; } .bar-segment.environments { background: #E0701F; } .bar-segment.committed { background: #57524B; }
.bar-segment.reserve { background: repeating-linear-gradient(135deg, #C9C2B8 0 3px, #EFEBE5 3px 7px); }
.bar-segment.headroom { border: 1px dashed #B8B0A5; box-sizing: border-box; background: var(--card); }
.bar-segment.request { background: repeating-linear-gradient(135deg, #E0701F 0 4px, #F2B486 4px 8px); }
.limit-marker { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--text); }
.budget-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend-swatch.console { background: #2F6DB5; } .legend-swatch.environments { background: #E0701F; } .legend-swatch.committed { background: #57524B; }
.legend-swatch.reserve { background: repeating-linear-gradient(135deg, #C9C2B8 0 3px, #EFEBE5 3px 7px); }
.legend-swatch.headroom { border: 1px dashed #B8B0A5; box-sizing: border-box; }
.legend-swatch.request { background: repeating-linear-gradient(135deg, #E0701F 0 4px, #F2B486 4px 8px); }
.legend-swatch.needed { border: 2px solid var(--text); box-sizing: border-box; }
.budget-preview { margin: 0 0 12px; padding: 12px 12px; border-radius: 8px; background: #F0F7EF; color: #14532D; font-size: 13px; }
.budget-preview.warning { background: #FEF3C7; color: var(--warn-text, #7A5900); }
.unit-costs dl { margin: 0; }
.share { display: flex; align-items: center; gap: 8px; }
/* Approval review */
dialog.wide-dialog { max-width: 680px; }
.approval-description { margin: 0 0 12px; }
.approval-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0 0 16px; padding: 12px 16px; background: var(--page); border: 1px solid var(--border); border-radius: 12px; }
.approval-summary dt { font-size: 12px; color: var(--muted); } .approval-summary dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.impact { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.impact-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.impact-head h3 { margin: 0; font-size: 14px; }
.approval-verdict { font-size: 13px; font-weight: 600; color: #166534; } .approval-verdict.over { color: #991B1B; }
.approval-paths { border: 0; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.approval-paths legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.path-option { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; }
.path-option .text-button { align-self: flex-start; color: var(--active-text); font-weight: 600; padding: 0; min-height: 32px; }
.candidate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.candidate .secondary { min-height: 36px; padding: 8px 12px; font-size: 13px; }
.dialog-spacer { flex: 1; }
@media (max-width: 700px) {
  .overview { padding: 16px; }
  .overview .environment-status-filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 12px 16px 2px; }
  .environment-status-filters button { flex-shrink: 0; }
  .stepper { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .app-grid { grid-template-columns: 1fr; }
  .dialog-actions { flex-wrap: wrap; } .dialog-spacer { display: none; }
}
dialog { max-height: calc(100vh - 32px); overflow: auto; }
/* Client access */

.tag { font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--subtle); color: var(--secondary); }
.allowance { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 24px; }
.allowance .slot-meter { width: 120px; }
.allowance .slot { max-width: none; }
.allowance .text-button { padding: 4px 8px; min-height: 32px; font-size: 13px; color: var(--active-text); }
.people, .activity{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.person { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.person .avatar { margin-top: 2px; }
.avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--active); color: var(--active-text); }
.avatar.pending { background: transparent; border: 1px dashed var(--border-strong); color: var(--muted); }
.person.expired .small { color: var(--warn-text, #7A5900); }
.activity li { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 20px; color: var(--text); }
.activity li > span { overflow-wrap: anywhere; min-width: 0; }
.activity time { font-size: 12px; color: var(--muted); }
.choice { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.choice input { margin-top: 1px; }
#invite-form > label, #invite-existing{ margin-top: 16px; }
#invite-existing select { height: 44px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 0 12px; background: var(--card); color: var(--text); font: inherit; }
#invite-error:empty { display: none; }
@media (max-width: 700px) {
  .allowance { justify-content: flex-start; }
}
.person.removed .small { color: #991B1B; }
.access-effects { margin: 0 0 16px; padding-left: 24px; font-size: 14px; color: var(--secondary); display: flex; flex-direction: column; gap: 8px; }
#access-error:empty { display: none; }
#access-pause-option { margin-bottom: 8px; line-height: 1.4; align-items: flex-start; } #access-pause-option input { margin-top: 2px; flex: none; }
/* Checkboxes and radios are drawn here so the mark is always white on the action orange, never the browser's dark mark. */
input[type="checkbox"], input[type="radio"] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; min-width: 18px; margin: 0; padding: 0; flex: none; cursor: pointer;
  border: 1.5px solid var(--border-strong); background: var(--card) center / 12px 12px no-repeat; }
input[type="checkbox"] { border-radius: 4px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:checked { background-color: var(--action); border-color: var(--action);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.5-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
input[type="radio"]:checked { border-color: var(--action); background: radial-gradient(circle, #fff 0 3px, var(--action) 3.5px); }
input[type="checkbox"]:hover:not(:checked), input[type="radio"]:hover:not(:checked) { border-color: var(--action); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .5; cursor: default; }

/* Cost table: collapsible environment groups */

.cost-pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 12px; }

/* OIDC creation draft */

#environment-security summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
#environment-security textarea { width: 100%; box-sizing: border-box; font: 12px/1.5 monospace; }
#environment-security [hidden] { display: none; }

.oidc-provider{display:flex;flex-direction:column;gap:4px;padding:12px 0;border-bottom:1px solid var(--border);overflow-wrap:anywhere}

/* Per-environment scheduling remains visible when application details collapse. */

.schedule-form { display:flex; flex-direction:column; gap:16px; }
.schedule-extension form { display:flex; flex-direction:column; gap:16px; }

/* Technical output is always plain text, bounded and scrollable. */
.troubleshooting{width:min(960px,94vw)}
.technical-output{background:#15202b;color:#e6edf3;padding:16px;border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:45vh;min-height:160px;overflow:auto;font:13px/1.5 ui-monospace,monospace}
.terminal-input{display:flex;flex-wrap:wrap;gap:8px}.terminal-input[hidden]{display:none}.terminal-input textarea{width:100%;font-family:ui-monospace,monospace}.troubleshooting .dialog-actions{flex-wrap:wrap}

/* ═══════════════ Redesign 2026-11 — top bar · side nav · list/detail with subtabs · app tiles ═══════════════ */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Shell: a full-width top bar over the side nav + content. */
.workspace { grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: 60px minmax(0, 1fr); min-height: 100vh; }
.topbar-context { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; color: var(--secondary); font-size: 13px; }
#tenant-name { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
aside { position: sticky; top: 60px; height: calc(100vh - 60px); padding: 24px 12px; overflow-y: auto; }
aside .brand { display: none; }
main { padding: 0 32px 40px; }

/* Account menu (top-right): avatar, email + role, Sign out. */
.account { position: relative; margin-left: auto; }
.account-button { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 4px 12px 4px 4px; background: transparent; border: 1px solid transparent; border-radius: 999px; color: var(--text); }
.account-button:hover, .account-button[aria-expanded="true"] { background: var(--subtle); border-color: var(--border); }
.account-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 600; font-size: 13px; }
.account-id { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; text-align: left; }
#account-email { font-size: 13px; font-weight: 500; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-role { font-size: 12px; color: var(--muted); }
.account-caret { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.account-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; padding: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgb(0 0 0 / 12%); }
.account-menu-head { padding: 8px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.account-menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 38px; padding: 8px 12px; background: transparent; color: var(--text); border-radius: 8px; text-align: left; font-weight: 500; }
.account-menu-item:hover { background: var(--active); color: var(--active-text); }
.account-menu-item svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Environments: compact list (left) + selected environment (right). */
.env-split { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 16px; }
.env-list { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; padding: 2px; }
.env-item { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-height: 0; padding: 12px 16px; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-weight: 400; }
.env-item:hover { border-color: var(--border-strong); background: var(--subtle); }
.env-item.selected { border-color: var(--selected-border); background: var(--selected-bg); box-shadow: none; }
.env-item-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.env-item-meta { font-size: 12px; color: var(--muted); }
.env-item .badge { flex-shrink: 0; transform: scale(.92); transform-origin: right center; }

.env-detail { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); min-height: 420px; }
.detail-empty { padding: 48px 24px; text-align: center; }
.detail-body { padding: 24px 24px 24px; }
.detail-row { display: contents; }
.detail-row dt { color: var(--muted); font-size: 13px; }
.detail-row dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.section-label { display: block; font-size: 13px; line-height: 20px; font-weight: 600; color: var(--secondary); margin-bottom: 12px; }

/* Application tiles: square cards, branded icon tile, label beneath, open-in-new-tab marker. */
.ui-services .app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 16px; margin-bottom: 12px; }
.app-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 132px; padding: 24px 12px 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 1px 2px rgb(0 0 0 / 5%); color: var(--text); text-align: center; transition: transform 150ms, box-shadow 150ms, border-color 150ms; }
.app-tile:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 8px 20px rgb(244 122 32 / 14%); }
.app-tile .app-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(180deg, #F78A35, var(--brand)); color: #fff; box-shadow: 0 4px 10px rgb(244 122 32 / 30%); font-size: 0; }
.app-tile .app-icon svg { width: 24px; height: 24px; }
.app-tile .app-name { font-size: 13px; font-weight: 500; line-height: 20px; }
.app-tile .app-open { position: absolute; top: 10px; right: 10px; color: var(--muted); opacity: 0; transition: opacity 150ms; }
.app-tile:hover .app-open, .app-tile:focus-visible .app-open { opacity: 1; }
.app-tile.legacy .app-icon { background: linear-gradient(180deg, #9CA3AF, #6B7280); box-shadow: none; }
.app-tile .app-text, .app-tile .app-desc { display: none; }

/* Responsive: stack list over detail; collapse the side nav into a horizontal strip. */
@media (max-width: 1100px) { .env-split { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); } }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; grid-template-rows: 60px auto 1fr; }
  aside { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .env-split { grid-template-columns: 1fr; }
  .env-list { position: static; max-height: 280px; }
   .account-id{ display: none; }
}
@media (max-width: 600px) { main { padding: 0 16px 32px; } }

/* Redesign pass 2 — denser overview so the list/detail starts above the fold; mobile overflow fix. */
.overview { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin: 16px 0 0; padding: 16px 24px; }
.overview .slots { flex: 0 1 320px; margin: 0; padding: 0; border: 0; }
.overview .environment-status-filters { margin: 0 0 0 auto; padding: 0; border: 0; }
.overview hr, .overview .slots + * { border-top: 0; }
#environments-view > .footnote { margin-top: 16px; }
/* Grid children must be allowed to shrink, or long names push the list past the viewport. */
.env-split, .env-split > *, .env-item { min-width: 0; }
.env-split { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
@media (max-width: 900px) {
  .env-split { grid-template-columns: minmax(0, 1fr); }
  .overview { flex-direction: column; align-items: stretch; }
  .overview .slots { flex: none; }
  .overview .environment-status-filters { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
}

/* Redesign pass 3 — top bar aligned to the side menu · compact two-row environments header. */

/* Top bar: brand cell is EXACTLY the side-menu width (with its divider), so the workspace
   breadcrumb starts where the content column starts and never sits over the menu. */

.brand-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 8px;
  background: var(--active); color: var(--active-text); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.topbar-context { gap: 12px; padding: 0 32px; font-size: 14px; }
#tenant-name { font-size: 14px; }
.account { padding: 0 16px; }

/* Environments header: two compact rows instead of five stacked blocks. */
.env-header { display: flex; flex-direction: column; gap: 16px; margin: 0 0 16px; }
.env-header-row { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; min-width: 0; }
.updated-at { font-size: 12px; color: var(--muted); }
.env-toolbar { gap: 12px 16px; }
.search-field { position: relative; flex: 0 1 300px; min-width: 200px; }
.search-field svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search-field input { width: 100%; min-height: 38px; padding: 0 12px 0 32px; border-radius: 8px; }
.env-toolbar .environment-status-filters { margin: 0 0 0 auto; padding: 0; border: 0; flex-wrap: wrap; justify-content: flex-end; }
.env-toolbar .environment-status-filters button { min-height: 32px; padding: 0 12px; font-size: 12px; }
.env-split { margin-top: 0; }
.env-list { top: 76px; }

@media (max-width: 900px) {
  .topbar-context { padding: 0 8px; }
  .search-field { flex: 1 1 100%; }
  .env-toolbar .environment-status-filters { margin-left: 0; width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
}

/* Redesign pass 4 — sticky workspace card pinned to the bottom of the side menu. */
aside { display: flex; flex-direction: column; }
.ws-name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-badge { flex: none; padding: 2px 8px; border-radius: 999px; background: #ECFDF3; color: #067647; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ws-badge.full { background: var(--warn-bg, #FFFBEB); color: var(--warn-icon, #A16207); }

/* Redesign pass 5 — larger logo; quota message as a readable callout BELOW "New environment". */

.brand-badge { height: 24px; font-size: 12px; }

:root { --info-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 7.5v.01'/%3E%3C/svg%3E"); }

/* Redesign pass 6 — environment metadata as labelled items. */

/* Workspace card */

.ws-badge { background: #ECFDF3; color: #067647; }
.ws-badge.full { background: #FEF3F2; color: #B42318; }
.ws-meter { height: 6px; margin: 12px 0 8px; border-radius: 999px; background: var(--subtle); overflow: hidden; }
#ws-meter-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: #12B76A; transition: width 300ms; }
#ws-meter-fill.full { background: var(--brand); }
.ws-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.ws-stats strong { color: var(--text); font-weight: 600; }
.ws-dot { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; vertical-align: 1px; }
.ws-dot.running { background: #12B76A; }
.ws-dot.paused { background: #98A2B3; }
.ws-slots-text { margin-left: auto; }

/* Redesign pass 8 — detail subtabs as pills (segmented control) instead of underlined tabs. */

.detail-body { border-top: 0; padding-top: 16px; }

/* Redesign pass 9 — VM icon on each environment in the list, tinted by status. */
.env-item { flex-direction: row; align-items: center; gap: 12px; }
.env-item-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.env-vm { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent; }
.env-vm svg { width: 20px; height: 20px; }
.env-item.status-running .env-vm { background: #ECFDF3; color: #067647; border-color: #ABEFC6; }
.env-item.status-progress .env-vm { background: #EFF8FF; color: #175CD3; border-color: #B2DDFF; }
.env-item.status-paused .env-vm { background: var(--subtle); color: #667085; border-color: var(--border); }
.env-item.status-approval .env-vm { background: #F4F3FF; color: #6941C6; border-color: #D9D6FE; }
.env-item.status-attention .env-vm, .env-item.status-error .env-vm { background: #FEF3F2; color: #B42318; border-color: #FECDCA; }
.env-item.selected .env-vm { box-shadow: 0 1px 3px rgb(0 0 0 / 8%); }

/* pass 10: no workspace breadcrumb in the top bar (the side-menu workspace card shows it). */
.topbar-context { padding-left: 24px; }

/* pass 11: larger remote-machine glyph in a slightly larger tile. */
.env-vm { width: 44px; height: 44px; border-radius: 12px; }
.env-vm svg { width: 28px; height: 28px; }

/* Redesign pass 12 — pill tabs + Pause/Resume + ⋯ share one row at the top-right of the detail header. */

.detail-body { padding-top: 24px; }

/* pass 13: previous outline monitor icon size restored. */
.env-vm { width: 40px; height: 40px; border-radius: 12px; }
.env-vm svg { width: 20px; height: 20px; }

/* pass 14: header grid — name+status | tabs+Pause+⋯ on row 1, version/dates span row 2. */

/* Redesign pass 15 — uniform app tiles: fixed height, centred icon + single-line label; Legacy as a tag. */
.ui-services .app-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.app-tile { height: 124px; min-height: 0; padding: 0 16px; gap: 12px; justify-content: center; align-items: center; }
.app-tile .app-icon { width: 46px; height: 46px; border-radius: 12px; flex: none; }
.app-tile .app-icon svg { width: 22px; height: 22px; }
.app-tile .app-name { display: block; width: 100%; font-size: 13px; font-weight: 600; line-height: 20px; min-height: 36px;
  white-space: normal; text-align: center; }
/* One look for every tile — undo the old greyed/dashed legacy styling. */
.app-tile.legacy, .app-tile { background: var(--card); border-style: solid; }
.app-tile.legacy .app-icon { background: linear-gradient(180deg, #F78A35, var(--brand)); color: #fff; box-shadow: 0 4px 10px rgb(244 122 32 / 30%); }
.app-tag { position: absolute; top: 9px; left: 9px; padding: 1px 8px; border-radius: 999px; background: var(--subtle); color: var(--secondary);
  border: 1px solid var(--border); font-size: 12px; line-height: 16px; font-weight: 500; }

/* Redesign pass 16 — SVG menu icons · Dashboard view. */
.nav-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; font-size: 0; }
.nav-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav .nav-label { flex: 1; }

/* pass 17: uptime meta item · richer app-opening note. */

.app-note { display: flex; align-items: center; gap: 12px; margin-top: 4px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--page); color: var(--secondary); font-size: 13px; line-height: 20px; }
.app-note > svg { flex: none; color: var(--secondary); }
.app-note-text { flex: 1; min-width: 0; }
.app-note-text strong { font-weight: 600; }
.app-note-action { flex: none; min-height: 32px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--active-text); font-size: 13px; font-weight: 600; }
.app-note-action:hover { background: transparent; text-decoration: underline; }
@media (max-width: 700px) { .app-note { flex-wrap: wrap; } }

/* pass 18: environment details inline in the title row (name · status · version · dates · uptime | tabs · actions). */

/* pass 19: title row = name · status │ details · actions; pill tabs on their own row beneath. */

/* pass 19b: no leading divider on the details (it wraps under the name on most widths). */

/* pass 20: title row = name · status | pill tabs │ Pause ⋯ ; details on the line beneath, full width. */

/* Environment list: one-line names with the full name on hover; the list scrolls on its own. */
.env-list { max-height: calc(100vh - 220px); }
.env-item-name { max-width: 100%; }

/* pass 23: list items keep their full size for ANY number of environments — the list scrolls instead of squeezing them. */
.env-list > .env-item { flex: 0 0 auto; min-height: 72px; }
.env-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding-right: 4px; }

/* pass 23b: long environment names stay on one line in the detail header (full name on hover). */

/* Redesign pass 24 — Observability: VM picker · services / topics list · log viewer · Kafka events · settings. */

/* pass 24b: isolate Observability from the console global label / select / aside rules. */

/* pass 25: no "WORKSPACE" heading above the menu items. */
aside { padding-top: 16px; }

/* Redesign pass 26 — themed dropdowns · light log viewer matching the Kafka events table. */

/* The VM picker sits in the page header: larger, right-aligned list. */

/* Log viewer: light, like the Kafka events table. */

/* pass 27: search hit highlight · top-bar refresh control. */

.topbar-context { visibility: hidden; }
.refresh-ctl { display: flex; align-items: center; gap: 8px; margin-left: auto; padding-left: 12px; }
.refresh-ctl + .account { margin-left: 0; }
.refresh-btn { display: grid; place-items: center; width: 38px; height: 38px; min-height: 38px; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--secondary); box-shadow: 0 1px 2px rgb(0 0 0 / 4%); }
.refresh-btn:hover { background: var(--subtle); color: var(--text); border-color: var(--border-strong); }
.refresh-btn.spinning svg { animation: rcx-spin .8s linear infinite; }
.refresh-btn.stale { color: #B42318; border-color: #FECDCA; background: #FEF3F2; }
@keyframes rcx-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .refresh-btn.spinning svg { animation: none; } }

/* pass 27b: top bar has 4 cells now — brand | (spacer) | refresh controls | account. */

.refresh-ctl { padding: 0 4px 0 12px; }

/* pass 28: toolbar row 1 = title · filters … actions (right); row 2 = full-width search. */

/* pass 29: product name "1Click" keeps its own casing in the badge. */
.brand-badge { text-transform: none; letter-spacing: .01em; font-size: 13px; }

/* pass 30: larger 1Click badge, balanced with the 36px logo. */
.brand-badge { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 16px; font-weight: 600; }

/* pass 31b: detail header wraps instead of squeezing the name — name+status | tabs+actions | details. */

/* pass 32: no money amount in the side menu (headroom stays on the Budget page). */
#headroom-badge { display: none !important; }

/* pass 33: Budget page — limit + unit costs as two equal columns (no wasted width). */

/* Schedule tab — inline view card; the pencil turns the same card into the editor (no modal). */

/* Inline editor: day boxes wide enough for start · to · end · Remove, never overlapping. */

/* Phone width: the brand, refresh control and account must fit 390px without page side-scroll. */
@media (max-width: 480px) {
  .refresh-ctl { padding: 0 2px 0 8px; gap: 4px; }
}
@media (max-width: 420px) {   /* icon + caret; the button keeps its aria-label */

}

/* Inline schedule editor v2 — settings column + compact week list (one row per day). */

/* Phone: the detail tab strip scrolls inside itself instead of widening the page. */

@media (max-width: 420px) {   /* scale, never crop the logo */
}
/* Running hours: say what the two times are. */

/* Chips never wider than their column, at any width (labels made them overflow into the + button). */

/* Side-by-side only when the card is wide enough for settings + full-width day rows. */

/* The card's OWN width decides the layout (the detail pane can be narrow on a wide screen, next to the list). */

@container (min-width: 760px) { .schedule-layout { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); } }
@container (max-width: 759px) { .schedule-layout { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 480px) {
  .schedule-day-row { grid-template-columns: 36px minmax(0, 1fr) 28px; gap: 8px; padding: 8px 8px; }
  .schedule-slot { display: flex; width: 100%; }
  .schedule-slot-label:first-child { display: none; }
  .schedule-card .schedule-slot input[type=time] { flex: 1 1 0; width: auto; min-width: 0; padding: 0 2px; }
  .schedule-card .schedule-slot input[type=time]::-webkit-calendar-picker-indicator { display: none; }
  .schedule-slot-remove { width: 24px; height: 24px; min-height: 24px; }
  .schedule-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@container (min-width: 680px) { .schedule-layout { grid-template-columns: minmax(200px, 240px) minmax(0, 1fr); } }

/* Maintained Observability workspace: bounded viewers and a stable terminal. */

.refresh-ctl select { min-height:40px; max-width:150px; }
.terminal-input { display:flex; flex-wrap:wrap; gap:8px; padding-top:12px; }
.terminal-input textarea { width:100%; }
@media(max-width:600px){.refresh-ctl select{max-width:95px}.detail-row{display:block}}

/* Final responsive shell rules: keep navigation compact on narrow screens. */
@media (max-width:900px) {
  .workspace > aside { flex-direction:row; flex-wrap:wrap; justify-content:flex-start; gap:4px; overflow:visible; }
  .workspace > aside .nav { flex:0 0 auto; width:auto; white-space:nowrap; }
}

#workspace-cost-metrics .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media(max-width:600px){#billing-view > .metrics,#workspace-cost-metrics .metrics{grid-template-columns:1fr;}}

/* Embedded diagnostics share the environment panel and its narrower width. */

.environment-observability { min-width:0; }

/* Background service tiles share application sizing, with an in-console action. */
button.app-tile { width:100%; font:inherit; color:var(--text); }

/* Environment application access uses the same form rhythm as provisioning. */
.environment-access .access-form { min-width: 0; border: 0; padding: 0; margin: 24px 0 0; }
.environment-access .access-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; align-items: center; }
.environment-access p { overflow-wrap: anywhere; }
.environment-access textarea { width: 100%; box-sizing: border-box; }

/* Selected-service operations stay distinct from log refresh/filter controls. */
.container-restart { padding:16px 24px; border-bottom:1px solid var(--border); }
.container-restart-status { margin:12px 0 0; overflow-wrap:anywhere; font-size:14px; }
.container-restart-status.success { color:#166534; }
.container-restart-dialog { max-width:560px; width:calc(100% - 32px); padding:24px; border:1px solid var(--border); border-radius:12px; }
.container-restart-dialog::backdrop { background:#0006; }
.container-restart-dialog p { overflow-wrap:anywhere; }
.container-restart-dialog .dialog-actions { display:flex; justify-content:flex-end; gap:12px; flex-wrap:wrap; }

.workspace-picker{display:block;margin:12px 16px;font-size:.8rem;color:var(--muted,#5b6473)}
.workspace-picker select{display:block;width:100%;min-width:0;margin-top:8px;font-size:.85rem;padding:8px;}

.local-keycloak-access { border-top:1px solid var(--border,#ddd); margin-top:2rem; padding-top:1.5rem; }
.local-keycloak-access form { display:grid; gap:1rem; margin:1.5rem 0; max-width:48rem; }
.local-keycloak-access fieldset { display:flex; flex-wrap:wrap; gap:.75rem 1.25rem; padding:1rem; border:1px solid var(--border,#ddd); border-radius:8px; }
.local-keycloak-access fieldset label { display:flex; align-items:center; gap:.5rem; overflow-wrap:anywhere; }
.local-keycloak-access input[type=checkbox] { width:auto; margin:0; }
.local-keycloak-access button { margin:.25rem .5rem .25rem 0; }
.local-keycloak-access input[readonly] { display:block; max-width:100%; width:30rem; }

.application-links{grid-column:1 / -1;min-width:0;}
.application-links textarea{border:1px solid var(--input-border);border-radius:8px;background:var(--page);color:var(--text);display:block;width:100%;box-sizing:border-box;min-height:8rem;resize:vertical;white-space:pre;overflow:auto;font-family:monospace;margin:1rem 0;padding:.75rem;}

/* Access editors: compact, page-scoped tables with horizontal scrolling confined to the table. */
.environment-access,.local-keycloak-access{min-width:0;max-width:100%}
.access-provider-tabs,.access-pager,.access-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0}
.access-provider-tabs{border-bottom:1px solid var(--border,#ddd);padding-bottom:12px}
.access-provider-tabs button{padding:12px 16px}
.access-provider-tabs button.active{background:var(--selected-bg);color:var(--text);border-color:var(--selected-border);font-weight:600}
.access-pager{font-size:.9rem;justify-content:flex-start}
.access-pager label{display:flex;flex-direction:row;align-items:center;gap:.4rem;margin:0;white-space:nowrap}
.access-pager select{width:auto;min-width:5rem;padding:.45rem}
.access-pager button,.access-table-scroll button{padding:.45rem .75rem;font-size:.9rem}
.access-table-scroll{overflow:auto;max-width:100%;border:1px solid var(--border,#ddd);border-radius:8px;margin:.75rem 0 1rem}
.access-table-scroll table{border-collapse:collapse;width:100%;font-size:.9rem}
.access-table-scroll th,.access-table-scroll td{padding:.65rem;text-align:left;border-bottom:1px solid var(--border,#ddd);vertical-align:middle}
.access-table-scroll thead th{background:var(--surface-muted,#f1eeeb);min-width:7rem;max-width:14rem;overflow-wrap:anywhere}
.access-table-scroll th[scope=row]{min-width:13rem;overflow-wrap:anywhere;font-weight:600}
.access-table-scroll small{display:block;font-weight:400;color:var(--muted,#626976)}
.access-table-scroll input[type=checkbox]{width:1.2rem;height:1.2rem;margin:0;accent-color:var(--accent,#fc7917)}
.access-table-scroll select{min-width:10rem;padding:.45rem;font-size:inherit}
.access-table-scroll input:not([type=checkbox]){min-width:15rem;padding:.45rem;font-size:inherit}
.access-deleted{background:#fff0ed}.access-deleted th{text-decoration:line-through}
.local-keycloak-access>input,.access-form input[aria-label="New product role"]{max-width:24rem;margin-right:.5rem}
@media(max-width:600px){.access-pager>span{flex-basis:100%}.environment-access .access-actions button{flex:1 1 auto}.local-keycloak-access>input{max-width:100%}}
.access-table-scroll th small{display:block;font-weight:400;color:var(--muted,#626976);overflow-wrap:anywhere}
@media(min-width:601px){
 .local-keycloak-access .access-table-scroll th:first-child{position:sticky;left:0;z-index:1;background:var(--surface,#faf8f6);min-width:15rem;width:15rem;max-width:15rem;box-sizing:border-box}
 .local-keycloak-access .access-table-scroll tr>:nth-child(2){position:sticky;left:15rem;z-index:1;background:var(--surface,#faf8f6);min-width:6rem}
 .local-keycloak-access .access-deleted th:first-child,.local-keycloak-access .access-deleted>:nth-child(2){background:#fff0ed}
}
.environment-access>[role=tabpanel].local-keycloak-access{border-top:0;margin-top:0;padding-top:.5rem}
.local-keycloak-access>details{font-size:.9rem;color:var(--muted,#626976)}

/* Console navigation can be tucked away without leaving the current editor. */
.navigation-toggle { display:inline-flex; align-items:center; justify-content:center; flex:none; width:36px; height:36px; min-height:36px; padding:8px; background:transparent; color:var(--secondary); border-radius:8px; }
.navigation-toggle:hover { background:var(--subtle); color:var(--text); }
.navigation-toggle svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
/* Compact environment selector reserves most of the width for the selected environment. */
#environments-view { max-width:none; }
@media (min-width:901px) {
  .env-split { grid-template-columns:240px minmax(0,1fr); gap:16px; }
}
.env-list > .env-item { min-height:0; padding:12px 12px; gap:8px; align-items:flex-start; }
.env-list .env-vm { width:28px; height:28px; border-radius:8px; margin-top:2px; }
.env-list .env-vm svg { width:18px; height:18px; }
.env-list .env-item-text { gap:4px; }
.env-list .env-item-name { font-size:13px; line-height: 20px; }
.env-list .badge { align-self:flex-start; transform:none; font-size:12px; padding:0 8px; }
.env-list .env-item-meta { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }

/* Workspace membership administration: one compact table, independent detail tabs. */

.workspace-users .access-form { width:100%; min-width:0; border:0; padding:0; margin:0; }
.workspace-users .access-actions { margin-top:16px; }

/* Provisioning uses the Access table vocabulary, but saves one complete draft. */

.provisioning-access{min-width:0;max-width:100%;margin:1.25rem 0}
.provisioning-access [role=tabpanel]{min-width:0}
.provisioning-access .access-actions input{flex:1 1 16rem;max-width:30rem;min-width:0;margin:0}
.provisioning-access .access-actions button{flex:0 0 auto}
.provisioning-access textarea{width:100%;box-sizing:border-box;resize:vertical}
.provisioning-access>details{margin:1rem 0}
.provisioning-access .access-table-scroll thead th{min-width:7rem;max-width:12rem}
.provisioning-access .access-table-scroll th[scope=row]{min-width:12rem;max-width:18rem}
.provisioning-access .access-pager label{display:flex;align-items:center;margin:0}
.provisioning-access .access-pager select{margin:0}
@media(min-width:601px){
 .provisioning-access [aria-labelledby$="local-tab"] .access-table-scroll tr>:first-child{position:sticky;left:0;z-index:1;background:var(--page);min-width:15rem;width:15rem;max-width:15rem}
}

.provisioning-access .access-provider-tabs button.active{background:var(--selected-bg);color:var(--text);border-color:var(--selected-border)}

/* Personal data connections: optional help stays compact until expanded. */
.data-access-panel{min-width:0;border-top:1px solid var(--border);padding-top:24px;margin-top:24px}
.data-access-panel details{margin:12px 0;border:1px solid var(--border);border-radius:8px;padding:12px 16px}
.data-access-panel summary{cursor:pointer;font-weight:600}
.data-access-panel summary:focus-visible{outline:2px solid var(--brand);outline-offset:4px}
.data-access-panel h4{margin:16px 0 8px}
.data-os-tabs,.data-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.data-os-tabs [aria-selected=true]{background:var(--selected-bg);border-color:var(--selected-border);color:var(--text);font-weight:600}
.data-command{min-width:0;margin:12px 0 16px}
.data-command pre{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--subtle);padding:12px;border-radius:8px;font-size:12px}
.data-copy-status{margin-left:12px;color:var(--muted);font-size:12px}
.data-field{display:flex;gap:8px;flex-direction:column;min-width:0;margin:12px 0}
.data-field:has(input[type=checkbox]){flex-direction:row;align-items:flex-start}
.data-field input,.data-field select,.data-field textarea{min-width:0;max-width:100%;padding:12px;border:1px solid var(--border);border-radius:8px;background:var(--card);color:var(--text);font:inherit}
.data-access-form fieldset{display:flex;flex-wrap:wrap;gap:16px;border:1px solid var(--border);border-radius:8px}
.data-table-scroll{overflow-x:auto;max-width:100%}
.data-grants table{width:100%;min-width:680px;border-collapse:collapse}
.data-grants td,.data-grants th{padding:12px 8px;text-align:left;vertical-align:top;border-bottom:1px solid var(--border)}
.data-grants tr>:first-child{min-width:190px;overflow-wrap:anywhere}
.data-grants tr>:nth-child(2){min-width:100px}
.data-grants tr>:nth-child(3){min-width:160px}
.data-grants td button{margin:0 8px 8px 0;white-space:nowrap}
.data-grants details p{overflow-wrap:anywhere}
.data-connection{margin-top:16px;border:1px solid var(--border);border-radius:8px;padding:16px;min-width:0}
.data-connection p{overflow-wrap:anywhere}

@media(min-width:700px){.data-access-form{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px}.data-access-form fieldset,.data-access-form>.data-field:has(input[type=checkbox]){grid-column:1/-1}.data-access-form>.primary{justify-self:start}}

/* ═══════════════ Console shell: top navigation bar ═══════════════ */
/* Brand, destinations, workspace context, refresh and account share one 56px bar; the content uses the full width. */
:root { --bar-h: 56px; --focus: var(--action); }
.workspace { display: block; min-height: 100vh; }
#environments-view, #clients-view, #billing-view, #dashboard-view { max-width: 1600px; margin-left: auto; margin-right: auto; }
.skip-link { position: absolute; left: 16px; top: -72px; z-index: 40; display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 8px; background: var(--action); color: #fff; font-weight: 600; }
.skip-link:focus { top: 8px; outline: 2px solid var(--card); outline-offset: -4px; text-decoration: none; }
main:focus { outline: none; }
.appbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: flex-start; gap: 16px; height: var(--bar-h); margin: 0; padding: 0 max(32px, calc((100% - 1600px) / 2));
  background: var(--card); border-bottom: 1px solid var(--border); color: var(--text); font-size: 14px; }
.appbar .brand { flex: none; gap: 12px; }
.appbar .brand img { height: 30px; width: auto; max-width: 110px; }
.appbar .brand-badge { height: 24px; padding: 0 8px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.appbar .navigation-toggle { display: none; }
.appnav { display: flex; align-items: center; align-self: stretch; flex: 1 1 auto; min-width: 0; gap: 16px; }
.appnav-links, .appnav .workspace-admin-nav { display: flex; align-items: stretch; align-self: stretch; gap: 2px; flex: none; }
.appnav .nav { position: relative; flex: none; width: auto; height: auto; min-height: 0; padding: 0 12px; gap: 8px; border: 0; border-radius: 0; background: transparent; color: var(--secondary); font-size: 14px; font-weight: 500; white-space: nowrap; }
.appnav .nav::before { content: none; }
.appnav .nav::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: transparent; }
.appnav .nav:hover { background: var(--subtle); color: var(--text); }
.appnav .nav.active { background: transparent; color: var(--current-text); font-weight: 600; }
.appnav .nav.active::after { background: var(--current-bar); }
.appnav .nav.active .nav-icon { color: var(--current-text); }
.appnav .nav:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; border-radius: 8px; }
.appnav .nav .nav-label { flex: none; }
.appnav-context { display: flex; align-items: center; gap: 12px; margin-left: auto; min-width: 0; }
.ws-summary { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--page); color: var(--secondary); font-size: 12px; white-space: nowrap; }
.ws-summary .ws-name, .appnav .workspace-picker-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ws-summary .ws-meter { flex: none; width: 48px; height: 6px; margin: 0; }
.ws-summary #ws-meter-fill, .ws-summary #ws-meter-fill.full { background: var(--brand); }
.ws-summary .ws-slots-text { margin: 0; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ws-summary .ws-badge { padding: 1px 8px; }
.ws-summary .ws-badge:empty { display: none; }
.ws-summary .ws-stats { display: none; flex-wrap: nowrap; gap: 12px; padding-left: 8px; border-left: 1px solid var(--border); }
.appnav .workspace-picker { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; min-width: 0; font-size: 13px; color: var(--secondary); }
.appnav .workspace-picker select { display: block; width: auto; max-width: 220px; height: 36px; margin: 0; padding: 0 32px 0 12px; font-size: 13px; font-weight: 500; }
.appbar .refresh-ctl { display: flex; align-items: center; flex: none; gap: 8px; margin: 0; padding: 0; }
.refresh-updated { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.appbar .refresh-btn { width: 36px; height: 36px; min-height: 36px; border-radius: 8px; box-shadow: none; }
.refresh-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.appbar .account { flex: none; margin: 0; padding: 0; }
.appbar .account-button { min-height: 40px; }
.account-avatar { background: var(--action); }
.account-menu { min-width: 260px; padding: 8px; }
.account-menu-head { display: flex; flex-direction: column; gap: 2px; color: var(--text); font-size: 13px; font-weight: 500; }
.account-menu-head .account-role { font-weight: 400; font-size: 12px; }
.account-menu-field { flex-direction: row; white-space: nowrap; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 12px 12px; margin-bottom: 8px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 500; color: var(--secondary); }
.account-menu-field select { width: auto; height: 36px; padding: 0 32px 0 12px; font-size: 13px; }
.env-list { top: calc(var(--bar-h) + 16px); }
@media (min-width: 1600px) { .ws-summary .ws-stats { display: flex; } }
@media (max-width: 1280px) {
  .refresh-updated, .appbar .account-id { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .appbar .account-button { padding: 4px; gap: 4px; }
}
@media (max-width: 1040px) { .appbar { gap: 12px; padding: 0 16px; } .ws-summary .ws-meter { display: none; } .appnav .nav { padding: 0 8px; } .appnav .workspace-picker select { max-width: 160px; } }
/* Narrow screens: destinations and workspace context fold into a panel opened by the menu button. */
@media (max-width: 900px) {
  .appbar { gap: 8px; padding: 0 12px; }
  .appbar .navigation-toggle { display: inline-flex; margin-left: -4px; }
  .appbar .refresh-ctl { margin-left: auto; }
  .appnav { display: none; position: absolute; left: 0; right: 0; top: var(--bar-h); flex-direction: column; align-items: stretch; gap: 12px; max-height: calc(100vh - var(--bar-h)); overflow-y: auto;
    padding: 12px 16px 16px; background: var(--card); border-bottom: 1px solid var(--border); box-shadow: 0 12px 24px rgb(0 0 0 / 8%); }
  .workspace.navigation-open .appnav { display: flex; }
  .appnav-links, .appnav .workspace-admin-nav { flex-direction: column; flex-basis: auto; gap: 2px; }
  .appnav .nav { height: 44px; min-height: 44px; padding: 0 12px; border-radius: 8px; font-size: 14px; }
  .appnav .nav::after { left: 0; right: auto; top: 12px; bottom: 12px; width: 2px; height: auto; border-radius: 0 2px 2px 0; }
  .appnav .nav.active { background: var(--current-bg); }
  .appnav .nav:focus-visible { outline-offset: -2px; }
  .appnav-context { flex-direction: column; align-items: stretch; margin: 0; padding-top: 12px; border-top: 1px solid var(--border); }
  .appnav .workspace-picker { flex-direction: column; align-items: stretch; gap: 8px; order: -1; font-weight: 500; }
  .appnav .workspace-picker-label { position: static; width: auto; height: auto; clip: auto; }
  .appnav .workspace-picker select { width: 100%; max-width: none; height: 44px; font-size: 14px; }
  .ws-summary { flex-wrap: wrap; height: auto; padding: 12px 12px; border-radius: 8px; white-space: normal; }
  .ws-summary .ws-meter { display: block; flex: 1 1 60px; }
  .ws-summary .ws-stats { display: flex; flex-basis: 100%; padding: 0; border: 0; }
}
@media (max-width: 480px) { .appbar .brand-badge { display: none; } .appbar .brand img { height: 26px; } }

/* ═══════════════ Users: workspace list and selected workspace ═══════════════ */

@media (max-width: 900px) {
  #tenant-list { scroll-margin-top: calc(var(--bar-h) + 12px); }
}

/* ═══════════════ Shared elements ═══════════════ */
/* One set of rules for fields, buttons, tables, pagination, pills, tabs, cards and dialogs, used by the
   console and the public hub. Sizes follow the product console: 44px controls, 8px control radius,
   12px card radius, 56px table rows, 13px table text. */
:root {
  --field-border: #D1D5DB; /* outlines of buttons, cards and other decorative boundaries */
  --input-border: #80858E; /* boundary of anything typed into or chosen: at least 3:1 against the page and cards (WCAG 1.4.11) */
  --control-h: 44px; --control-h-compact: 36px; --radius-control: 8px; --radius-card: 12px;
  --danger: #B91C1C; --danger-hover: #991B1B; --shadow: none;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* Focus: one visible ring on every control. */
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible, .hub-page a:focus-visible, .hub-page button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Fields */
label { font-size: 14px; font-weight: 500; }
input:not([type="checkbox"], [type="radio"], [type="range"]), select:not([size]), textarea {
  height: var(--control-h); min-height: 0; padding: 0 12px; border: 1px solid var(--input-border); border-radius: var(--radius-control);
  background-color: var(--card); color: var(--text); font-family: inherit; font-size: 14px; line-height: 20px; }
textarea, .hub-sharing textarea { height: auto; min-height: 88px; padding: 12px 12px; line-height: 1.5; resize: vertical; }
select:not([size]) { appearance: none; -webkit-appearance: none; padding-right: 32px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23646A77' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px 16px; }
input:not([type="checkbox"], [type="radio"]):disabled, select:disabled, textarea:disabled { background-color: var(--subtle); color: var(--muted); cursor: not-allowed; }
input[readonly] { background-color: var(--page); }
::placeholder { color: var(--muted); opacity: 1; }
input[type="checkbox"], input[type="radio"] { border-color: var(--input-border); }
.search-field input { height: var(--control-h); padding-left: 32px; }
/* Buttons */
button { min-height: var(--control-h); border-radius: var(--radius-control); font-size: 14px; }
.primary, .secondary, .danger, .delete { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 24px; white-space: nowrap; box-shadow: none; }
.primary svg, .secondary svg, .danger svg, .delete svg, .text-button svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.primary { background: var(--action); color: #fff; font-weight: 600; border-color: transparent; }
.primary:hover { background: var(--action-hover); }
.secondary { background: var(--card); color: var(--text); border: 1px solid var(--field-border); font-weight: 500; }
.secondary:hover { background: var(--subtle); }
.danger { background: var(--danger); color: #fff; font-weight: 600; border-color: transparent; }
.danger:hover { background: var(--danger-hover); }
.delete { background: var(--card); color: var(--danger-hover); border: 1px solid #FECACA; font-weight: 500; }
.delete:hover { background: #FEF2F2; }
.text-button { display: inline-flex; align-items: center; gap: 8px; color: var(--active-text); font-size: 13px; font-weight: 500; }
button:disabled { opacity: 1; cursor: not-allowed; }
.primary:disabled, .secondary:disabled, .danger:disabled, .delete:disabled, .primary:disabled:hover, .secondary:disabled:hover, .danger:disabled:hover, .delete:disabled:hover { background: var(--subtle); color: var(--muted); border-color: var(--border); }
.text-button:disabled { color: var(--muted); }
.icon-button { width: var(--control-h-compact); height: var(--control-h-compact); min-height: var(--control-h-compact); border-radius: var(--radius-control); }
/* Controls inside table rows, pagers and compact toolbars use the 36px size. */
td button, td .secondary, .actions button, .access-pager button, .cost-pager button { min-height: var(--control-h-compact); height: var(--control-h-compact); padding: 0 12px; font-size: 13px; margin: 0; }
td select:not([size]), td input:not([type="checkbox"], [type="radio"]), .access-pager select:not([size]) { height: var(--control-h-compact); font-size: 13px; }
/* Cards: border only, no drop shadow. */
.panel, .metrics > div, .env-detail, .environment, .hub-sharing { border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: none; }
.panel { padding: 24px; }
.env-item.selected .env-vm, .refresh-btn { box-shadow: none; }
/* Tables: quiet header row, 56px rows, 13px cells. */
 .access-table-scroll{ border: 1px solid var(--border); border-radius: var(--radius-card); overflow: auto; background: var(--card); }
 .access-table-scroll table{ width: 100%; border-collapse: collapse; font-size: 13px; }
 .access-table-scroll thead th{ height: 44px; padding: 0 16px; background: var(--page); color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--border); }
 .access-table-scroll tbody td, .access-table-scroll tbody th{ height: 56px; padding: 8px 16px; font-size: 13px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
 .access-table-scroll tbody tr:last-child > *{ border-bottom: 0; }
.access-table-scroll tbody th[scope="row"] { font-weight: 600; color: var(--text); }
 .access-table-scroll tbody tr:hover{ background: var(--page); }
/* Pagination: summary, previous, numbered pills with the current page filled, next, page size. */
.access-pager, .cost-pager { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0; font-size: 13px; color: var(--secondary); }
.access-pager > span:first-child { margin-right: 8px; }
.pager-pages { display: inline-flex; align-items: center; gap: 4px; }
.pager-pages:empty { display: none; }
.pager-gap { padding: 0 4px; color: var(--muted); }
.access-pager .page-pill { min-width: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--text); font-weight: 500; }
.access-pager .page-pill:hover { background: var(--subtle); }
.access-pager .page-pill[aria-current="page"] { background: var(--selected-bg); border-color: var(--selected-border); color: var(--text); font-weight: 600; cursor: default; }
.access-pager label { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; margin: 0 0 0 auto; font-size: 13px; font-weight: 500; white-space: nowrap; }
.access-pager select:not([size]) { width: auto; min-width: 72px; }
.cost-pager { justify-content: space-between; }
.cost-pager #cost-page-label { display: inline-flex; align-items: center; height: var(--control-h-compact); padding: 0 16px; border-radius: 999px; background: var(--action); color: #fff; font-size: 13px; font-weight: 600; }
/* Status pills: tinted background, dot and text. */
.badge { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 16px; text-transform: none; white-space: nowrap; }
.badge.running { background: #DCFCE7; color: #166534; }
.badge.progress, .badge.provisioning, .badge.resuming { background: #DBEAFE; color: #1D4ED8; }
.badge.paused { background: #ECEEF1; color: #3F4654; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 12px; font-size: 12px; }
/* Tabs: segmented control; the selected tab is white text on the deeper orange. */
 .hub-tabs{ border-radius: 12px; }
 .hub-tabs button{ min-height: 36px; border-radius: 8px; font-size: 13px; font-weight: 500; }
 .hub-tabs button.active, .hub-tabs button[aria-selected="true"]{ background: #FFF8F2; color: #15110D; font-weight: 600; box-shadow: inset 0 0 0 1px #B4500A; }
/* Dialogs: a named heading, a body that scrolls, and a footer that stays in view. */
dialog { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--card); }
dialog h2 { margin: 0 0 8px; font-size: 18px; line-height: 26px; font-weight: 600; }
dialog form > label, dialog form > fieldset { margin-top: 16px; }
dialog .dialog-actions { position: sticky; bottom: -24px; z-index: 2; margin: 24px -24px -24px; padding: 16px 24px; background: var(--card); border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-card) var(--radius-card); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
/* Shared element sizes win over older per-screen sizes. */
.service-group > .secondary, .service-group > .primary { min-height: var(--control-h); height: var(--control-h); padding: 0 24px; font-size: 14px; }
.hub-sharing input:not([type="checkbox"]), .hub-sharing textarea { border: 1px solid var(--input-border); padding: 0 12px; }
.hub-sharing textarea { padding: 12px 12px; }
.hub-sharing form > .primary { margin-top: 16px; }
dialog form > section:not([hidden]), dialog form > details { margin-top: 16px; }
dialog form > p.small { margin: 8px 0 0; }

/* ═══════════════ Application cards (console Applications tab and public hub) ═══════════════ */
/* Bordered card, tinted icon tile, name, one line description, new tab mark. The link or button holds the icon and
   the name and stretches over the whole card. Hover and focus change the border and background only. */
.app-grid, .ui-services .app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0 0 12px; }
.app-card { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 74px; padding: 16px 44px 16px 68px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--card); cursor: pointer; transition: background-color 150ms, border-color 150ms; }
.app-card:hover, .app-card:has(.app-tile:focus-visible) { border-color: #DD8A4E; background: #FFF8F2; }
.app-card:has(.app-tile:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.app-card > .app-tile, .app-card > .app-tile.legacy, .app-card > button.app-tile { position: static; display: block; width: auto; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; transform: none; }
.app-card > .app-tile:hover { transform: none; box-shadow: none; background: transparent; text-decoration: none; }
.app-card > .app-tile:focus-visible { outline: none; }
.app-card > .app-tile::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.app-card .app-tile .app-icon, .app-card .app-tile.legacy .app-icon { position: absolute; left: 16px; top: 16px; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #F5C9A8; border-radius: 12px; background: var(--active); color: var(--action); box-shadow: none; }
.app-card .app-tile .app-icon svg { width: 22px; height: 22px; }
.app-card .app-tile .app-name { display: block; width: auto; min-height: 0; font-size: 14px; font-weight: 600; line-height: 20px; text-align: left; color: var(--text); overflow-wrap: anywhere; }
.app-card .app-desc { display: block; font-size: 13px; font-weight: 400; line-height: 20px; color: var(--muted); }
.app-card .app-tile .app-open { position: absolute; top: 14px; right: 14px; display: inline-flex; opacity: 1; color: var(--muted); transition: color 150ms; }
.app-card:hover .app-open, .app-card:has(.app-tile:focus-visible) .app-open { color: var(--action); }
.app-card .app-tag { position: static; align-self: flex-start; display: inline-flex; align-items: center; height: 18px; padding: 0 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--subtle); color: var(--secondary); font-size: 12px; line-height: 16px; font-weight: 500; }
.app-card.skeleton-tile { flex-direction: row; gap: 12px; padding: 16px; cursor: default; }
.section-label { display: block; margin: 0 0 12px; font-size: 13px; line-height: 20px; font-weight: 600; color: var(--secondary); }
.service-group.ui-services { display: block; }
.service-group.ui-services + .service-group.ui-services, .app-note + .section-label{ margin-top: 24px; }
.ui-services .app-note { margin: 4px 0 0; }
.hub-app-section + .hub-app-section { margin-top: 24px; }
.hub-page .hub-sign-in { margin: 0 0 24px; font-size: 14px; line-height: 20px; }
.hub-page .hub-footer a { color: var(--active-text); font-size: inherit; font-weight: 500; padding: 0; }
.hub-page #hub-status a { font-weight: 600; }
.hub-loading { margin-top: 24px; }
@media (max-width: 480px) { .app-grid, .ui-services .app-grid { grid-template-columns: minmax(0, 1fr); } }

/* ═══════════════ Skeleton loading ═══════════════ */
/* Placeholders match the shape of the content that replaces them and show only until the first data arrives. */
.skeleton { display: block; border-radius: 8px; background: var(--subtle); animation: skeleton-pulse 1.4s ease-in-out infinite; }
@keyframes skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.sk-line { width: 100%; height: 12px; }
.sk-line.short { width: 55%; }
.sk-line.medium { width: 40%; height: 16px; }
.sk-pill { width: 72px; height: 20px; border-radius: 999px; }
.sk-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; }
.sk-value { width: 96px; height: 30px; margin: 4px 0; }
.sk-tabs { width: min(100%, 520px); height: 44px; border-radius: 12px; }
.sk-bar { width: 100%; height: 24px; }
.skeleton-block { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.skeleton-item, .app-card.skeleton-tile, .app-card.skeleton-tile:hover { pointer-events: none; cursor: default; background: var(--card); border-color: var(--border); }
.skeleton-item .env-item-text, .skeleton-tile .app-text { flex: 1; gap: 8px; padding-top: 4px; }
.env-list .skeleton-item .sk-icon { width: 28px; height: 28px; border-radius: 8px; }
.skeleton-head { display: flex; flex-direction: column; gap: 16px; padding: 0 0 24px; border-bottom: 1px solid var(--border); }
.skeleton-row td { height: 56px; padding: 8px 16px; border-bottom: 1px solid var(--border); }
.skeleton-row td .sk-line { max-width: 160px; }
.skeleton-text { display: block; width: fit-content; min-width: min(240px, 60%); border-radius: 8px; background: var(--subtle); color: transparent !important; user-select: none; animation: skeleton-pulse 1.4s ease-in-out infinite; }
.is-loading .filter-count { visibility: hidden; }
#billing-view.is-loading #headroom-amount, #billing-view.is-loading .metrics strong, #billing-view.is-loading #budget-bar { color: transparent; border-radius: 8px; background: var(--subtle); animation: skeleton-pulse 1.4s ease-in-out infinite; }
#billing-view.is-loading #headroom-amount { display: inline-block; min-width: 140px; }
#billing-view.is-loading .metrics strong { width: 50%; }
#billing-view.is-loading #budget-bar { min-height: 24px; }
@media (prefers-reduced-motion: reduce) { .skeleton, .skeleton-text, #billing-view.is-loading #headroom-amount, #billing-view.is-loading .metrics strong, #billing-view.is-loading #budget-bar { animation: none; } }
.sk-chip { width: 150px; height: 44px; border-radius: 8px; }
.ws-summary:has(#ws-slots-text:empty) { visibility: hidden; }

/* ═══════════════ Environment detail header ═══════════════ */
/* Row 1: name, status and workspace with the lifecycle actions. Row 2: release and dates. Row 3: section tabs on one line. */
#environment-detail { scroll-margin-top: calc(var(--bar-h) + 16px); }
.detail-name { margin: 0; font-size: 18px; line-height: 26px; font-weight: 600; overflow-wrap: anywhere; }
/* Smaller fixes: readable counts, labels that wrap instead of clipping, a named environment button in the dashboard table. */
.auth-hero .auth-hero-title { margin: 0 0 24px; font-size: clamp(32px, 3.4vw, 52px); line-height: 1.18; letter-spacing: -1.5px; font-weight: 600; color: #fff; }
.auth-hero .auth-hero-title span { color: var(--brand); }
.auth-hero-footer { color: rgb(255 255 255 / 62%); }
.filter-count { opacity: 1; }
.env-list .env-item-meta { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.app-note-text { flex: 1 1 240px; }
/* The account button keeps its name (email and role) for assistive technology when the text is not shown. */
@media (max-width: 1280px) { .appbar .account-button .account-id { display: flex; } }

/* ═══════════════ Messages, confirmations and states ═══════════════ */
/* Messages float above the page so they are seen wherever the action was taken, and can be dismissed. */
.notice { position: fixed; top: calc(var(--bar-h, 56px) + 48px); right: max(32px, calc((100vw - 1600px) / 2)); z-index: 30; display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(440px, calc(100vw - 32px)); margin: 0; padding: 12px 12px 12px 16px;
  border: 1px solid #BFDBFE; border-radius: 12px; background: #EFF6FF; color: #1E3A8A; font-size: 14px; line-height: 20px; box-shadow: 0 8px 24px rgb(0 0 0 / 14%); }
.notice.error { border-color: #FECACA; background: #FEF2F2; color: #991B1B; }
@media (max-width: 700px) { .notice { top: calc(var(--bar-h, 56px) + 52px); left: 8px; right: 8px; width: auto; max-width: none; } #notice-text { flex: 1 1 auto; } }
.notice-close { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; min-height: 32px; padding: 0; border-radius: 8px; background: transparent; color: inherit; }
.notice-close:hover { background: rgb(0 0 0 / 6%); }
.notice-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#auth-error.info { color: var(--secondary); }
.auth-hub-note { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--page); font-size: 13px; line-height: 20px; color: var(--secondary); }
#confirm-effects[hidden] { display: none; }
#delete-error:empty { display: none; }
.badge.warn { background: #FEF3C7; color: var(--warn-text, #7A5900); }
.environment-error { display: block; margin: 12px 0 16px; padding: 12px 16px; border: 1px solid #FECACA; border-radius: 8px; background: #FEF2F2; color: #991B1B; font-size: 13px; line-height: 20px; }
/* Addresses and secrets wrap in full instead of being cut off; identifiers use one monospace stack. */
 .credential-value, .technical-output{ font-family: var(--mono); }
 .credential-value{ white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; font-size: 13px; line-height: 20px; }
.credential-row { align-items: flex-start; }
.credential-label { flex: none; width: 110px; padding-top: 2px; }
.copy-endpoint { width: 32px; height: 32px; min-height: 32px; border-radius: 8px; }
.local-keycloak-credentials { width: 100%; min-width: 0; }
/* Connect: each block is a column with its lines close together; blocks align to the top of their row. */

.hub-sharing { max-width: 100%; min-width: 0; overflow-wrap: anywhere; }

/* Smaller refinements */
:root { color-scheme: light; }
.terminal-input textarea { min-height: 44px; font-family: var(--mono); }
/* Wide screens: time fields are wide enough to show AM and PM in full. */

 .status-note + .service-group.ui-services, .environment-error + .service-group.ui-services { margin-top: 24px; }

/* ═══════════════ Top bar: destinations centred · workspace summary in the page body ═══════════════ */
@media (min-width: 901px) {
  .appnav-links { position: absolute; left: 50%; top: 0; height: var(--bar-h); transform: translateX(-50%); }
}
.workspace-strip { display: flex; justify-content: flex-end; min-height: 32px; }
.workspace-strip .ws-summary { height: 32px; background: var(--card); }
.workspace-strip .ws-summary .ws-name { position: static; width: auto; height: auto; max-width: 220px; overflow: hidden; clip: auto; text-overflow: ellipsis; font-size: 12px; font-weight: 600; color: var(--text); }
.workspace-strip .ws-summary .ws-meter { display: block; }
.workspace-strip .ws-summary .ws-stats { display: flex; }
@media (max-width: 900px) {

  .workspace-strip .ws-summary { width: 100%; height: auto; min-height: 36px; }
}
/* Room for the centred destinations: the account name shows in full on wide screens. */
@media (max-width: 1280px) {
  .refresh-updated, .appbar .account-id { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .appbar .account-button { padding: 4px; gap: 4px; }
}
@media (min-width: 901px) and (max-width: 1280px) { .appnav .workspace-picker select { max-width: 160px; } }
@media (min-width: 901px) and (max-width: 1200px) { .appnav .nav .nav-icon { display: none; } }
@media (min-width: 901px) and (max-width: 1040px) { .appnav .workspace-picker select { max-width: 132px; } }
/* Refresh and the time of the last update sit in the page body, before the workspace summary. */
.workspace-strip { align-items: center; gap: 12px; flex-wrap: wrap; }
.workspace-strip .refresh-ctl { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; }
.workspace-strip .refresh-btn { width: 32px; height: 32px; min-height: 32px; border-radius: 8px; }
.workspace-strip .refresh-updated { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
@media (max-width: 900px) { .appbar .account { margin-left: auto; } .workspace-strip { justify-content: flex-start; } }

/* ═══════════════ Select menus (nexus-select.js): Nexus field, menu with search ═══════════════ */
select.nx-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; margin: -1px !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.nx-select { position: relative; display: inline-flex; min-width: 0; max-width: 100%; vertical-align: middle; }
.nx-select.nx-fill { display: flex; width: 100%; }
.nx-select-trigger { position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%; min-width: 96px; height: var(--control-h); min-height: 0; padding: 0 32px 0 12px;
  border: 1px solid var(--input-border); border-radius: var(--radius-control); background: var(--card); color: var(--text); font-size: 14px; font-weight: 400; text-align: left; box-shadow: none; }
.nx-select-trigger:hover { border-color: #5F6470; background: var(--card); }
.nx-select-trigger:focus-visible, .nx-select-trigger[aria-expanded="true"] { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.nx-select-trigger:disabled { background: var(--subtle); color: var(--muted); cursor: not-allowed; opacity: 1; }
.nx-select.nx-invalid .nx-select-trigger { border-color: #B42318; }
.nx-select-value { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-select-value.nx-placeholder { color: var(--muted); }
.nx-select-chevron { position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 150ms; }
.nx-select-trigger[aria-expanded="true"] .nx-select-chevron { transform: rotate(180deg); }
.nx-select-panel { position: fixed; z-index: 60; width: max-content; max-width: min(360px, calc(100vw - 16px)); border: 1px solid var(--border); border-radius: 8px; background: var(--card); box-shadow: 0 8px 20px rgb(0 0 0 / 15%); overflow: hidden; }
.nx-select-search { position: relative; padding: 8px 8px 8px; }
.nx-select-search-icon { position: absolute; left: 16px; top: 50%; width: 14px; height: 14px; margin-top: -8px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.nx-select-search input { width: 100%; height: auto; min-height: 0; padding: 8px 8px 8px 24px; border: 0; border-radius: 4px; background: var(--subtle); color: var(--text); font-size: 13px; outline: none; }
.nx-select-search input::placeholder { color: var(--muted); }
.nx-select-search input:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--action); }
.nx-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nx-select-list { max-height: 240px; overflow-y: auto; padding: 0 8px 8px; outline: none; }
.nx-select-search[hidden] + .nx-select-list { padding-top: 8px; }
.nx-select-option { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px; border-radius: 4px; color: var(--text); font-size: 14px; line-height: 20px; cursor: pointer; }
.nx-select-option[hidden] { display: none; }
.nx-select-option.nx-active { background: var(--subtle); }
.nx-select-option[aria-selected="true"] { background: var(--selected-bg, #FFF8F2); font-weight: 600; }
.nx-select-option[aria-selected="true"].nx-active { box-shadow: inset 0 0 0 1px var(--action); }
.nx-select-option[aria-disabled="true"] { color: var(--muted); cursor: not-allowed; }
.nx-select-option-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-select-check { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--action); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nx-select-group-label { position: sticky; top: 0; z-index: 1; padding: 8px 8px; background: var(--card); color: var(--secondary); font-size: 12px; line-height: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-select-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }
/* Compact places: the top bar, table rows, pagers, the account panel and toolbars. */
.appnav .nx-select-trigger, td .nx-select-trigger, .access-pager .nx-select-trigger, .account-menu-field .nx-select-trigger, .nx-from-obs-select .nx-select-trigger { height: var(--control-h-compact); font-size: 13px; }
.appnav .workspace-picker .nx-select { max-width: 220px; }
.appnav .workspace-picker .nx-select-trigger { font-weight: 500; }
.access-pager .nx-select-trigger { min-width: 72px; }
@media (min-width: 901px) and (max-width: 1280px) { .appnav .workspace-picker .nx-select { max-width: 160px; } }
@media (min-width: 901px) and (max-width: 1040px) { .appnav .workspace-picker .nx-select { max-width: 132px; } }
@media (max-width: 900px) { .appnav .workspace-picker .nx-select { display: flex; width: 100%; max-width: none; } .appnav .workspace-picker .nx-select-trigger { height: var(--control-h); font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .nx-select-chevron { transition: none; } }
/* The workspace switcher follows the brand on the left; the account stays on the right. */
@media (min-width: 901px) {
  .appnav-context { margin-left: 0; }
  .appbar .brand + .appnav { margin-left: -4px; }
}
@media (min-width: 901px) and (max-width: 980px) { .appnav .workspace-picker .nx-select { max-width: 116px; } }
/* A person with one workspace sees its name, not a switcher. */
.workspace-single { display: none; }
.appnav .workspace-picker.single .nx-select, .appnav .workspace-picker.single select { display: none; }
.appnav .workspace-picker.single .workspace-single { display: inline-flex; align-items: center; max-width: 220px; min-height: 36px; overflow: hidden; color: var(--text); font-size: 13px; line-height: 20px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
/* Phone: the strip is one 36px row (refresh, time, then the workspace with its meter and counts). */
@media (max-width: 600px) {
  .workspace-strip { flex-wrap: nowrap; gap: 8px; }
  .workspace-strip .ws-summary { flex: 1 1 auto; width: auto; min-width: 0; height: 36px; min-height: 36px; padding: 0 12px; flex-wrap: nowrap; border-radius: 999px; white-space: nowrap; }
  .workspace-strip .ws-summary .ws-name { max-width: 88px; }
  .workspace-strip .ws-summary .ws-meter { flex: 0 0 28px; }
  .workspace-strip .ws-summary .ws-stats { flex-basis: auto; gap: 8px; padding-left: 8px; border-left: 1px solid var(--border); }
  .workspace-strip .ws-stat-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

}
@media (max-width: 767px) { #environments-view:not(.env-picked) .env-item.selected { border-color: var(--border); background: var(--card); } }

/* Focus scrolled into view stays clear of the sticky top bar and of the People save bar. */
html { scroll-padding-top: calc(var(--bar-h, 56px) + 12px); }
html:has(.people-savebar) { scroll-padding-bottom: 104px; }
:focus-visible { scroll-margin-top: calc(var(--bar-h, 56px) + 12px); }
html:has(.people-savebar) :focus-visible { scroll-margin-bottom: 104px; }

/* ── Select menus as in RCX Nexus: a light card panel, full width rows, the selected row in pale orange with the
   check on the left, a compact search field with a thin focus ring. In the top bar the trigger is a filled chip. ── */
.nx-select-panel { min-width: 240px; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--card); box-shadow: 0 8px 20px rgb(0 0 0 / 15%); }
.nx-select-search { padding: 8px; border-bottom: 1px solid var(--border); }
.nx-select-search-icon { left: 18px; width: 16px; height: 16px; }
.nx-select-search input { height: 32px; padding: 0 12px 0 32px; border: 1px solid var(--input-border); border-radius: 8px; background: var(--card); font-size: 14px; }
.nx-select-search input:focus-visible, .nx-select-search input:focus { outline: none; border-color: var(--brand, #f47a20); box-shadow: 0 0 0 1px var(--brand, #f47a20); }
.nx-select-list { padding: 4px 0; }
.nx-select-search[hidden] + .nx-select-list { padding-top: 4px; }
.nx-select-option { gap: 8px; padding: 8px 12px; border-radius: 0; font-size: 14px; line-height: 21px; font-weight: 400; }
.nx-select-option.nx-active { background: var(--subtle); }
.nx-select-option[aria-selected="true"] { background: #FCEBDD; font-weight: 400; }
.nx-select-option[aria-selected="true"].nx-active { background: #F9DFCB; box-shadow: none; }
.nx-select-check { order: 0; width: 16px; height: 16px; stroke: #f47a20; }
.nx-select-group-label { padding: 8px 12px 4px; }
.nx-select-trigger[aria-expanded="true"] { outline: none; }
.nx-select-trigger[aria-expanded="true"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.appnav .workspace-picker .nx-select-trigger { height: 36px; border: 1px solid var(--border); border-radius: 8px; background: #EEEBE8; font-weight: 500; }
.appnav .workspace-picker .nx-select-trigger:hover { background: #E7E3DF; border-color: var(--border); }

/* Top bar current page: the indicator spans the whole item and sits on the bar's bottom line */
@media (min-width: 901px) {
  .appnav .nav::after { left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; z-index: 1; }
}

/* Workspace switcher in the top bar, as the Nexus program switcher: warm filled chip, orange workspace icon,
   dark text and a dark chevron so it reads as a control, not a disabled field */
.appnav .workspace-picker .nx-select-trigger { gap: 8px; justify-content: flex-start; height: 36px; padding: 0 36px 0 12px; border: 1px solid #E4E0DC; border-radius: 12px; background: #ECE9E6; color: var(--text); font-size: 14px; font-weight: 500; }
.appnav .workspace-picker .nx-select-trigger::before { content: ""; flex: none; width: 16px; height: 16px; background: #F47A20;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V7l7-4 7 4v14M9 21v-6h6v6M9 10h.01M15 10h.01'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V7l7-4 7 4v14M9 21v-6h6v6M9 10h.01M15 10h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
.appnav .workspace-picker .nx-select-trigger:hover { background: #E5E1DD; border-color: #DAD5D0; }
.appnav .workspace-picker .nx-select-chevron { stroke: var(--secondary); }
.appnav .workspace-picker .nx-select-value { flex: 0 1 auto; }
/* Workspace switcher on white */
.appnav .workspace-picker .nx-select-trigger { background: #FFFFFF; border-color: #D6D1CC; }
.appnav .workspace-picker .nx-select-trigger:hover { background: var(--subtle); border-color: #C9C3BD; }
