/* 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: 1.5; }
[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: 10px 20px; 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: 1.3; font-weight: 600; letter-spacing: -.4px; margin: 6px 0 8px; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 18px; }
p { color: var(--muted); line-height: 1.6; margin: 8px 0 20px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--muted); }
.brand { display: flex; align-items: center; gap: 16px; }
.brand img { height: 32px; width: auto; max-width: 145px; object-fit: contain; }
.brand-divider { width: 1px; height: 22px; background: var(--border-strong); }
.brand-caption { font-size: 14px; color: var(--secondary); }
.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: 6px; padding: 0 12px 20px; }
aside .brand { height: 56px; margin: 0 -12px 20px; padding: 0 20px; border-bottom: 1px solid var(--border); }
aside > .eyebrow { margin: 4px 12px 8px; }
.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: 6px; }
.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; }
.aside-footer { margin-top: auto; padding: 20px 10px 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.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; }
.page-title { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 32px 0 24px; }
.page-title p { margin-bottom: 0; font-size: 14px; }
.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: 20px; margin-bottom: 28px; }
.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: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -.5px; margin: 16px 0 12px; }
.metrics small { font-size: 11px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.section-title h2 { margin: 0; font-size: 16px; }
.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-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.environment h3 { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.created { font-size: 12px; color: var(--muted); margin-top: 6px; }
.badge { font-size: 12px; padding: 4px 12px; border-radius: 9999px; 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 { color: #92400E; background: #FEF3C7; }
.badge.error, .badge.deleting { color: #991B1B; background: #FEE2E2; }
.environment-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); margin-top: 20px; padding-top: 18px; gap: 20px; }
.links, .actions { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; align-items: center; }
.links a { background: var(--page); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; }
.links a:hover { background: var(--active); text-decoration: none; }
.actions { flex-shrink: 0; }
.actions button { padding: 7px 14px; 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-symbol { font-size: 36px; color: var(--brand-hover); margin-bottom: 16px; }
.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: 10px 12px; color: var(--text); background: var(--card); }
input:disabled { background: var(--subtle); color: var(--muted); }
#create-form > label + label { margin-top: 16px; }
.invite-form { display: grid; grid-template-columns: 1.4fr 1.4fr .8fr auto; gap: 16px; align-items: end; }
#invite-result { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 20px; }
#invite-link { margin-bottom: 12px; }
.tenant-row { display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--border); padding: 16px 0; flex-wrap: wrap; }
.tenant-row strong { flex: 1; min-width: 140px; overflow-wrap: anywhere; font-weight: 600; }
.tenant-row input { max-width: 80px; }
.tenant-row label { flex-direction: row; align-items: center; }
.tenant-row .small { flex-basis: 100%; order: 1; }
.notice { background: #DBEAFE; color: #1D4ED8; border: 1px solid #BFDBFE; border-radius: 8px; padding: 12px 16px; margin-top: 20px; 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; }
.auth-card { width: min(384px, 100%); }
.auth-mobile-brand { display: none; }
.auth-card form { display: grid; gap: 20px; padding: 24px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); margin-top: 24px; }
.auth-card h1 { font-size: 24px; }
.auth-card .small { margin-bottom: 0; font-size: 12px; }
.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; }
.create-advanced { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 12px; }
.create-advanced > summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.create-advanced > summary .small { display: block; margin: 4px 0 0 18px; font-weight: 400; }
.create-advanced fieldset { min-width: 0; margin: 12px 0 0; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 230px minmax(0, 1fr); }
  main { padding: 0 24px 24px; }
  header { margin: 0 -24px; padding: 0 24px; }
  .invite-form { grid-template-columns: 1fr 1fr; }
  .environment-bottom { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-mobile-brand { display: flex; justify-content: center; margin-bottom: 32px; }
  .auth-mobile-brand img { height: 40px; max-width: 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; }
  aside > .eyebrow { display: none; }
  .nav { min-height: 36px; padding: 7px 12px; font-size: 13px; }
  .aside-footer { margin: 0; padding: 8px 0 0; display: flex; align-items: center; width: 100%; }
  .aside-footer .text-button { padding: 0; margin-left: auto; }
  main { padding: 0 16px 24px; }
  header { height: 48px; margin: 0 -16px; padding: 0 16px; }
  .page-title { align-items: flex-start; margin: 24px 0; flex-direction: column; gap: 16px; }
  .metrics { gap: 8px; }
  .metrics > div { padding: 12px; }
  .metrics span { font-size: 11px; }
  .metrics strong { font-size: 24px; }
  .metrics small { display: none; }
  .environment { padding: 18px; }
  .actions { flex-shrink: 1; }
  .invite-form { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .section-title .small { display: none; }
  .dialog-actions { flex-wrap: wrap; }
  .tenant-row { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }

.budget-form{display:flex;gap:16px;align-items:end;flex-wrap:wrap;margin-bottom:16px}.budget-form label{max-width:220px}.cost-table-wrap{overflow-x:auto}.cost-table{border-collapse:collapse;width:100%;font-size:13px}.cost-table th,.cost-table td{text-align:left;padding:12px;border-bottom:1px solid var(--border);white-space:nowrap}.cost-table th{font-weight:600;background:var(--page)}.cost-table td:first-child{white-space:normal;min-width:170px}.cost-table tbody tr:hover{background:var(--subtle)}

.provisioning-progress{display:flex;flex-direction:column;gap:6px;margin-top:18px;padding:14px 16px;background:var(--active);border-left:3px solid var(--brand);border-radius:6px;font-size:13px}.provisioning-progress strong{font-weight:500}

.badge.approval{color:#92400E;background:#FEF3C7}.approval-message{font-size:13px;margin:14px 0 0;color:var(--secondary)}#approval-error:empty{display:none}

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

.budget-authorization{flex-direction:row;align-items:flex-start;gap:10px;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); }
.provisioning-progress { background: var(--card); }
.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:10px;align-items:center;width:100%}.service-group>strong{width:100%;color:var(--secondary)}.api-services>span,.api-address{width:100%}.api-address{font-size:12px;overflow-wrap:anywhere}.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%}

.api-endpoint-line{display:flex;align-items:center;gap:10px;width:100%;min-width:0}.api-endpoint-line>a{flex-shrink:0}.api-address-row{display:flex;align-items:center;gap:4px;min-width:0;flex:1 1 0}.api-address-row .api-address{display:block;min-width:0;width:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.copy-endpoint,.copy-password{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px;min-height:24px;padding:3px;border:0;border-radius:4px;background:transparent;color:var(--secondary)}.copy-endpoint:hover,.copy-password:hover{background:var(--subtle);color:var(--text)}.copy-endpoint svg,.copy-password svg{width:16px;height:16px}.copy-endpoint.copied,.copy-password.copied{color:#166534}

.environment-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:16px}.environment-toolbar label{font-size:13px;color:var(--secondary)}.environment-toolbar input{width:min(100%,360px);min-width:0}.environment-heading{cursor:pointer}.environment-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.environment-header-actions .actions{display:flex;flex-wrap:wrap;gap:8px;margin:0}.environment-toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:28px;height:28px;min-height:28px;padding:4px;border:0;background:transparent;color:var(--secondary);border-radius:4px}.environment-toggle:hover{background:var(--subtle)}.environment-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}.environment-toggle[aria-expanded="false"] svg{transform:rotate(-90deg)}

.environment-status-filters{display:flex;flex-wrap:wrap;gap:6px;margin-left:auto}.environment-status-filters button{padding:5px 10px;min-height:32px;font-size:12px;background:var(--card);color:var(--secondary);border:1px solid var(--border);border-radius:6px}.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%}

.credential-password{display:flex;align-items:center;gap:8px;min-width:0}.credential-password input{flex:1;min-width:0}.credential-password .copy-password{width:28px;height:28px;min-height:28px}#credentials-copy-status:empty{display:none}

@media(max-width:700px){.environment-heading{flex-wrap:wrap;align-items:flex-start}.environment-heading>div:first-child{flex-basis:100%}.environment-header-actions{width:100%;justify-content:flex-start}.environment-header-actions .actions{flex:1;min-width:0}}

/* 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: #92400E; } .connection.stale .live-dot { background: #D97706; }
.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:6px; }
.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; }
.admin-nav-caret { transition:transform .15s; }
.workspace-admin-nav:not([open]) .admin-nav-caret { transform:rotate(-90deg); }
.admin-nav-children { display:flex; flex-direction:column; gap:6px; margin-left:16px; border-left:1px solid var(--border); padding-left:8px; }
.admin-nav-children .nav { width:100%; }
@media (max-width:900px) {
  .workspace-admin-nav { flex-basis:100%; }
  .admin-nav-children { flex-direction:row; flex-wrap:wrap; }
}
.nav-badge { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 1px 8px; background: #FEF3C7; color: #92400E; white-space: nowrap; }
.nav-badge.approval { background: #6B21A8; color: #fff; }
.nav-badge.warning { background: #FEE2E2; color: #991B1B; }
.title-action { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.quota-reason { font-size: 12px; color: #92400E; margin: 0; max-width: 300px; text-align: right; }
#environments-view { container: environments / inline-size; }
.overview { display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; margin-bottom: 24px; }
.slots { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.slots-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.slots-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; color: var(--secondary); font-size: 13px; }
.slots-head strong { font-size: 20px; line-height: 1.2; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.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: 14px; 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: 6px; border-radius: 999px; min-height: 36px; padding: 0 12px; }
.environment-status-filters button[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.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: 6px; font-weight: 600; text-transform: none; }
.badge.progress { color: #1D4ED8; background: #DBEAFE; }
.badge.pausing { color: #92400E; background: #FEF3C7; }
.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-heading { padding: 18px 20px 18px 24px; flex-wrap: wrap; }
.environment-title { min-width: 0; flex: 999 1 260px; }
.environment-name { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.environment-header-actions { position: relative; }
.environment-details { border-top: 1px solid var(--border); }
.environment-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.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: 10px; width: 100%; }
.links a.app-tile { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 12px; border-radius: 10px; 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: 700; }
.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); }
.connect-panel { flex: 1 1 300px; min-width: 0; background: var(--page); border: 1px solid var(--border); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.connect-panel .service-group { gap: 6px; }
.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: 6px 14px; min-height: 36px; font-size: 13px; }
.provisioning-progress { margin-top: 0; gap: 10px; }
.progress-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.step { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.step-bar { height: 6px; border-radius: 999px; background: var(--border); }
.step.done .step-bar { background: #15803D; } .step.now .step-bar { background: #2563EB; } .step.error .step-bar { background: #DC2626; }
.step-label { font-size: 11px; line-height: 1.3; color: var(--muted); }
.step.now .step-label { color: #1D4ED8; font-weight: 600; } .step.done .step-label { color: var(--text); } .step.error .step-label { color: #991B1B; font-weight: 600; }
.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; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.info-item { display: flex; flex-direction: column; gap: 2px; }
.status-note { margin: 0; color: var(--secondary); font-size: 13px; }
.approval-note { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 10px; background: #FAF5FF; border: 1px solid #E9D5FF; }
.menu-wrap { position: relative; }
.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: 10px; box-shadow: 0 12px 28px rgb(0 0 0 / 14%); padding: 6px; display: flex; flex-direction: column; }
.menu-item { text-align: left; background: transparent; color: var(--text); font-weight: 400; min-height: 40px; padding: 0 12px; border-radius: 6px; font-size: 13px; }
.menu-item:hover { background: var(--subtle); }
.menu-item.danger-item { color: #991B1B; }
/* Budget & costs */
.headroom { display: flex; flex-direction: column; gap: 18px; }
.headroom-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px 32px; }
.headroom h2 { font-size: 13px; color: var(--secondary); margin: 0; }
.headroom-figure { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.headroom-figure strong { font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.headroom-figure strong.over { color: #991B1B; }
.headroom-figure span { color: var(--secondary); }
.headroom-callout { max-width: 420px; background: #FEF3C7; color: #78350F; border-radius: 10px; padding: 12px 14px; 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-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.budget-scale span:last-child { color: var(--text); font-weight: 600; }
.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; }
.billing-row { display: flex; flex-wrap: wrap; gap: 0 20px; }
.billing-row > .panel { flex: 999 1 420px; min-width: 0; }
.billing-row > .unit-costs { flex: 1 1 300px; }
.budget-preview { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #F0F7EF; color: #14532D; font-size: 13px; }
.budget-preview.warning { background: #FEF3C7; color: #78350F; }
.unit-costs dl { margin: 0; }
.unit-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.unit-row:last-child { border-bottom: 0; }
.unit-row dt { font-size: 14px; } .unit-row dt .small { margin-left: 6px; }
.unit-row dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.cost-table tr.cost-group td { background: var(--page); }
.cost-table tr.cost-line td:first-child { padding-left: 28px; color: var(--secondary); }
.share { display: flex; align-items: center; gap: 8px; }
.share-bar { width: 120px; height: 8px; border-radius: 999px; background: var(--subtle); overflow: hidden; display: inline-flex; }
.share-bar span { background: #E0701F; border-radius: 999px; }
/* 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: 10px; margin: 0 0 18px; padding: 12px 14px; background: var(--page); border: 1px solid var(--border); border-radius: 10px; }
.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: 10px; margin-bottom: 18px; }
.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: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; }
.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: 6px 12px; font-size: 13px; }
.dialog-spacer { flex: 1; }
@media (max-width: 700px) {
  .overview { padding: 14px; }
  .overview .environment-status-filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 12px 14px 2px; }
  .environment-status-filters button { flex-shrink: 0; }
  .title-action { align-items: flex-start; } .quota-reason { text-align: left; }
  .environment-heading { padding: 14px 16px; } .environment-body { padding: 16px; }
  .stepper { grid-template-columns: repeat(7, minmax(0, 1fr)); } .step-label { display: none; }
  .app-grid { grid-template-columns: 1fr; }
  .headroom-figure strong { font-size: 32px; }
  .dialog-actions { flex-wrap: wrap; } .dialog-spacer { display: none; }
}
dialog { max-height: calc(100vh - 32px); overflow: auto; }
/* Client access */
.client-stats { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; margin-bottom: 24px; }
.client-stats dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px 24px; margin: 0; }
.client-stats .stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.client-stats dt { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.client-stats dd { margin: 0; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.client-stats small { font-size: 12px; color: var(--muted); }
.attention-panel { border-color: #E9D5FF; background: #FAF5FF; }
#clients-view .environment-toolbar { margin: 0 0 16px; }
.workspace-list { display: flex; flex-direction: column; gap: 20px; }
.workspace-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.workspace-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.workspace-title { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.workspace-title h3 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.workspace-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.workspace-tags:empty { display: none; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--subtle); color: var(--secondary); }
.tag-danger { background: #FEE2E2; color: #991B1B; } .tag-approval { background: #F3E8FF; color: #6B21A8; } .tag-warn { background: #FEF3C7; color: #92400E; }
.allowance { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 20px; }
.allowance-usage { display: flex; align-items: center; gap: 12px; }
.allowance-actions { display: flex; align-items: center; gap: 4px; padding-left: 16px; border-left: 1px solid var(--border); }
.allowance-label { font-size: 13px; color: var(--secondary); } .allowance-label strong { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.allowance .slot-meter { width: 120px; }
.allowance .slot { max-width: none; }
.remove-workspace { color: #991B1B !important; }
.remove-workspace:hover { background: #FEE2E2; }
.allowance .text-button { padding: 4px 8px; min-height: 32px; font-size: 13px; color: var(--active-text); }
.allowance-edit { display: flex; align-items: center; gap: 8px; }
.allowance-edit label { flex-direction: row; align-items: center; font-size: 13px; }
.allowance-edit input { width: 72px; height: 36px; } .allowance-edit .primary { min-height: 36px; padding: 6px 14px; }
.workspace-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.workspace-section { padding: 20px 24px 22px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.workspace-section + .workspace-section { border-left: 1px solid var(--border); }
.workspace-section h4 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.workspace-section .count { font-size: 11px; letter-spacing: 0; padding: 1px 7px; border-radius: 999px; background: var(--subtle); color: var(--secondary); }
.workspace-section > .text-button { align-self: flex-start; padding: 2px 0; min-height: 28px; font-size: 13px; color: var(--active-text); }
.workspace-section p { margin: 0; }
.people, .workspace-envs, .activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.person { display: flex; align-items: flex-start; gap: 10px; 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-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.person-email { font-size: 14px; overflow-wrap: anywhere; }
.person.expired .person-email { color: var(--muted); }
.person.expired .small { color: #92400E; }
.person-actions { display: flex; gap: 4px; margin: 2px 0 0 -6px; }
.person-actions .text-button { font-size: 12px; padding: 4px 6px; min-height: 28px; }
.person-actions .text-button:last-child:hover { color: #991B1B; }
.workspace-envs li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.workspace-envs .env-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.workspace-envs .badge { font-size: 11px; padding: 2px 9px; }
.workspace-cost { font-size: 13px; color: var(--secondary); font-variant-numeric: tabular-nums; }
.activity li { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.4; color: var(--text); }
.activity li > span { overflow-wrap: anywhere; min-width: 0; }
.activity time { font-size: 12px; color: var(--muted); }
.workspace-foot { display: flex; justify-content: flex-end; padding: 10px 22px; border-top: 1px solid var(--border); }
.workspace-foot .delete { min-height: 34px; padding: 4px 12px; font-size: 13px; }
.invite-target { border: 0; padding: 0; margin: 16px 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.invite-target legend { font-size: 14px; font-weight: 500; margin-bottom: 8px; padding: 0; }
.choice { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.choice input { margin-top: 1px; }
#invite-form > label, .invite-new label, #invite-existing { margin-top: 14px; }
.invite-new { display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: end; gap: 12px; }
.invite-new label { white-space: nowrap; }
.invite-new label { margin-top: 0; }
#invite-existing select { height: 44px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 0 10px; background: var(--card); color: var(--text); font: inherit; }
#invite-error:empty { display: none; }
.copy-field { display: flex; gap: 8px; margin: 12px 0; } .copy-field input { flex: 1; }
@media (max-width: 1000px) {
  .workspace-body { grid-template-columns: 1fr 1fr; }
  .workspace-section:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 700px) {
  .workspace-head, .workspace-section, .workspace-foot { padding-left: 14px; padding-right: 14px; }
  .allowance { justify-content: flex-start; }
  .allowance-actions { padding-left: 0; border-left: 0; margin-left: -8px; }
  .workspace-body { grid-template-columns: 1fr; }
  .workspace-section + .workspace-section { border-left: 0; border-top: 1px solid var(--border); }
  .invite-new, .copy-field { grid-template-columns: 1fr; flex-direction: column; }
  .client-stats { padding: 14px; } .client-stats dl { grid-template-columns: 1fr 1fr; }
}

.workspace-card.suspended { border-color: #FECACA; }
.workspace-card.suspended .workspace-head { background: #FEF2F2; border-radius: 12px 12px 0 0; }
.restore-access { font-weight: 600; }
.person.removed .person-email { color: var(--muted); text-decoration: line-through; }
.person.removed .small { color: #991B1B; }
.person-actions .text-button:only-child:hover { color: #991B1B; }
.person.removed .person-actions .text-button:hover { color: var(--active-text); }
.access-effects { margin: 0 0 16px; padding-left: 20px; font-size: 14px; color: var(--secondary); display: flex; flex-direction: column; gap: 6px; }
#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-toggle { display: flex; align-items: flex-start; gap: 8px; padding: 2px 0; min-height: 0; background: none; border: 0; color: var(--text); text-align: left; font: inherit; }
.cost-toggle-text { display: flex; flex-direction: column; gap: 2px; }
.cost-toggle .small { font-weight: 400; }
.cost-chevron { flex: none; margin-top: 3px; color: var(--muted); transition: transform .15s; }
.cost-toggle[aria-expanded="true"] .cost-chevron { transform: rotate(90deg); }
.cost-toggle:hover strong { color: var(--active-text); }
.cost-table tr.cost-line td:first-child { padding-left: 38px; }
.cost-table tr.cost-history td:first-child { padding-left: 34px; }
.cost-table tr.cost-history .cost-toggle strong { font-weight: 500; color: var(--secondary); }
.cost-table tr.cost-history td { color: var(--muted); }
.cost-table tr.cost-line-history td:first-child { padding-left: 60px; }
.cost-table tr.cost-line-history td { color: var(--muted); }
.cost-table tr.cost-group-deleted td { color: var(--muted); }
.cost-toolbar { margin: 4px 0 12px; }
.cost-toolbar .cost-deleted-option { display: flex; margin-left: auto; font-size: 13px; color: var(--secondary); cursor: pointer; }
.cost-toolbar .cost-deleted-option:has(input:disabled) { cursor: default; color: var(--muted); }
.cost-table tr.cost-empty td { text-align: center; padding: 20px; color: var(--muted); }
.cost-pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.cost-pager-buttons { display: flex; align-items: center; gap: 10px; }
.cost-pager-buttons button { min-height: 32px; padding: 4px 12px; font-size: 13px; }
@media (max-width: 640px) { .cost-toolbar .cost-deleted-option { margin-left: 0; } }

/* OIDC creation draft */
#create-dialog.with-security { width: min(760px, 94vw); max-width: calc(100vw - 24px); max-height: 90vh; overflow: auto; }
#environment-security summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.security-roles fieldset { min-width: 0; border: 1px solid #d9e0e7; border-radius: 8px; margin: 12px 0; padding: 12px; }
.security-roles legend { font-size: 12px; overflow-wrap: anywhere; }
.security-roles label { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; margin: 8px 0; }
.security-roles input { grid-column: 1 / -1; }
#environment-security textarea { width: 100%; box-sizing: border-box; font: 12px/1.5 monospace; }
#environment-security [hidden] { display: none; }
#create-dialog.with-security .dialog-actions { position: sticky; bottom: -24px; background: #fff; padding: 12px 0; }

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

/* Per-environment scheduling remains visible when application details collapse. */
.schedule-panel { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:14px 24px; border-top:1px solid var(--border); background:var(--subtle); }
.schedule-summary { display:flex; flex-direction:column; gap:4px; min-width:0; }
.schedule-panel .actions { flex-wrap:wrap; }
.schedule-warning { background:#fff5dc; color:#664710; }
.schedule-dialog { width:min(680px,calc(100vw - 32px)); max-height:90vh; overflow:auto; }
.schedule-form { display:flex; flex-direction:column; gap:18px; }
.schedule-day { border:1px solid var(--border); border-radius:8px; padding:10px 14px; margin:12px 0; }
.schedule-day legend { font-weight:600; padding:0 6px; }
.schedule-window { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.schedule-window input { min-width:0; width:140px; }
.schedule-extension form { display:flex; flex-direction:column; gap:16px; }
@media(max-width:640px) { .schedule-panel { align-items:stretch; flex-direction:column; padding:14px 16px; } .schedule-window { flex-wrap:wrap; } .schedule-window input { width:110px; } }

/* 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}
.person-text select{max-width:100%;margin-top:4px}

/* ═══════════════ 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 { grid-column: 1 / -1; position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 20px;
  height: 60px; padding: 0 20px; background: var(--card); border-bottom: 1px solid var(--border); }
.topbar .brand { width: 200px; flex-shrink: 0; }
.topbar .brand img { height: 28px; }
.topbar-context { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; color: var(--secondary); font-size: 13px; }
.topbar-label { font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
#tenant-name { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .connection { margin-left: 4px; }
aside { position: sticky; top: 60px; height: calc(100vh - 60px); padding: 20px 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: 10px; min-height: 40px; padding: 4px 10px 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: 11px; 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: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgb(0 0 0 / 12%); }
.account-menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.account-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 8px 10px; background: transparent; color: var(--text); border-radius: 6px; 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: 20px; align-items: start; margin-top: 16px; }
.env-list { display: flex; flex-direction: column; gap: 6px; 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 14px; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-weight: 400; }
.env-item:hover { border-color: var(--border-strong); background: var(--subtle); }
.env-item.selected { border-color: var(--brand); background: var(--active); box-shadow: inset 3px 0 0 var(--brand); }
.env-item-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.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-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 20px 24px 12px; }
.detail-title { min-width: 0; }
.detail-title h2 { margin: 0; font-size: 18px; }
.detail-tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.detail-tab { position: relative; min-height: 44px; padding: 0 14px; background: transparent; color: var(--secondary); border-radius: 0; font-weight: 500; white-space: nowrap; }
.detail-tab:hover { color: var(--text); }
.detail-tab[aria-selected="true"] { color: var(--active-text); }
.detail-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.detail-body { padding: 20px 24px 24px; }
.detail-body > .connect-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0 0 16px; }
.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: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); 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: 14px; margin-bottom: 12px; }
.app-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 132px; padding: 22px 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: 1.3; }
.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); }
  aside > .eyebrow { display: none; }
  .env-split { grid-template-columns: 1fr; }
  .env-list { position: static; max-height: 280px; }
  .topbar .brand { width: auto; }
  .topbar-label, .account-id { display: none; }
}
@media (max-width: 600px) { main { padding: 0 16px 32px; } .topbar { padding: 0 12px; gap: 10px; } .topbar .connection { display: none; } }

/* Redesign pass 2 — denser overview so the list/detail starts above the fold; mobile overflow fix. */
#environments-view .page-title { margin-top: 20px; align-items: flex-start; }
#environments-view .page-title h1 { margin: 2px 0 2px; }
#environments-view .page-title p { margin: 0; }
#environments-view .title-action { max-width: 420px; }
.overview { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px 28px; margin: 16px 0 0; padding: 14px 20px; }
.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 > .section-title { margin: 18px 0 0; }
#environments-view > .section-title h2 { margin: 0; font-size: 15px; }
#environments-view > .environment-toolbar { margin-top: 10px; }
#environments-view > .environment-toolbar label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#environments-view > .environment-toolbar input { min-height: 40px; }
#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, .env-item-line { 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. */
.topbar { display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; gap: 0; padding: 0; height: 60px;
  box-shadow: 0 1px 0 var(--border), 0 2px 8px rgb(0 0 0 / 4%); border-bottom: 0; }
.topbar .brand { width: auto; height: 60px; gap: 10px; padding: 0 20px; border-right: 1px solid var(--border); }
.topbar .brand img { height: 26px; max-width: 110px; }
.brand-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  background: var(--active); color: var(--active-text); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.topbar-context { gap: 10px; padding: 0 32px; font-size: 14px; }
.topbar-label { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.crumb-sep { color: var(--border-strong); }
#tenant-name { font-size: 14px; }
.topbar .connection { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 3px 10px; border-radius: 999px;
  background: #ECFDF3; color: #067647; font-size: 12px; font-weight: 500; }
.topbar .connection.stale { background: #FEF3F2; color: #B42318; }
.account { padding: 0 16px; }

/* Environments header: two compact rows instead of five stacked blocks. */
.env-header { display: flex; flex-direction: column; gap: 14px; margin: 24px 0 18px; }
.env-header-row { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; min-width: 0; }
.env-heading { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; flex: 1; }
.env-heading h1 { margin: 0; font-size: 22px; }
.slot-chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--card); color: var(--secondary); font-size: 12px; cursor: help; }
.slot-chip strong { font-size: 13px; color: var(--text); font-weight: 600; }
.slot-chip .slot-meter { display: flex; gap: 3px; width: auto; margin: 0; }
.slot-chip .slot-meter > * { width: 14px; height: 6px; border-radius: 3px; margin: 0; flex: none; }
.updated-at { font-size: 12px; color: var(--muted); }
.env-header .title-action { display: flex; align-items: center; gap: 12px; margin: 0; max-width: none; text-align: left; }
.env-header .quota-reason { margin: 0; max-width: 360px; padding: 6px 10px; border-radius: 8px; background: #FFFAEB; color: #93370D;
  font-size: 12px; line-height: 1.4; }
#new-environment { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; white-space: nowrap; }
#new-environment svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.env-toolbar { gap: 10px 14px; }
.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 36px; 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 11px; font-size: 12px; }
.env-split { margin-top: 0; }
.env-list { top: 76px; }

@media (max-width: 900px) {
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .topbar .brand { border-right: 0; padding: 0 12px; }
  .topbar-context { padding: 0 8px; }
  .topbar-label, .crumb-sep { display: none; }
  .env-header .title-action { width: 100%; flex-wrap: wrap; }
  .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; }
}

/* pass 3b: quota note + button on ONE row beside the title (base .title-action is a column). */
.env-header .title-action { flex-direction: row; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
.env-header .quota-reason { text-align: left; white-space: normal; }
.env-header { margin-top: 20px; }
@media (max-width: 900px) { .env-header .title-action { flex-wrap: wrap; justify-content: flex-start; } }

/* Redesign pass 4 — sticky workspace card pinned to the bottom of the side menu. */
aside { display: flex; flex-direction: column; }
.aside-footer-card { position: sticky; bottom: 0; margin: auto -12px -20px; padding: 14px 16px; display: flex; align-items: center; gap: 10px;
  background: var(--card); border-top: 1px solid var(--border); box-shadow: 0 -6px 12px -10px rgb(0 0 0 / 18%); }
.ws-avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 8px;
  background: var(--active); color: var(--active-text); font-weight: 700; font-size: 14px; }
.ws-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.ws-name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-role { font-size: 11px; color: var(--muted); }
.ws-badge { flex: none; padding: 2px 8px; border-radius: 999px; background: #ECFDF3; color: #067647; font-size: 11px; font-weight: 600; white-space: nowrap; }
.ws-badge.full { background: #FFFAEB; color: #B54708; }
@media (max-width: 900px) { .aside-footer-card { display: none; } }

/* Redesign pass 5 — larger logo; quota message as a readable callout BELOW "New environment". */
.topbar .brand { gap: 12px; }
.topbar .brand img { height: 36px; max-width: 150px; }
.brand-badge { height: 24px; font-size: 12px; }

.env-header .title-action { flex-direction: column; align-items: flex-end; justify-content: flex-start; gap: 8px; flex-wrap: nowrap; }
.env-header .quota-reason { order: 2; display: flex; align-items: flex-start; gap: 8px; max-width: 380px; margin: 0; padding: 8px 12px;
  border: 1px solid #FEDF89; border-radius: 8px; background: #FFFAEB; color: #7A2E0E; font-size: 13px; font-weight: 500; line-height: 1.45; text-align: left; }
.env-header .quota-reason::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 1px;
  background: #B54708; -webkit-mask: var(--info-icon) center / contain no-repeat; mask: var(--info-icon) center / contain no-repeat; }
: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"); }
.env-header #new-environment { order: 1; }
.env-header-row:first-child { align-items: flex-start; }
.env-heading { min-height: 40px; }
@media (max-width: 900px) { .env-header .title-action { align-items: stretch; width: 100%; } .env-header .quota-reason { max-width: none; } }

/* Redesign pass 6 — environment metadata as labelled items. */
.env-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; font-size: 13px; color: var(--secondary); }
.meta-version { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; background: var(--text); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.meta-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; background: #EFF8FF; color: #175CD3; border: 1px solid #D1E9FF; font-size: 12px; font-weight: 500; }
.meta-tag.warn { background: #FFFAEB; color: #B54708; border-color: #FEDF89; }
.meta-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.meta-item svg { color: var(--muted); flex: none; }
.meta-label { color: var(--muted); }
.meta-value { color: var(--text); font-weight: 500; }
.env-meta .meta-item + .meta-item { padding-left: 14px; border-left: 1px solid var(--border); }

/* Redesign pass 7 — full-width slots banner · workspace card (not a user chip) in the side menu. */
.env-header .quota-banner { order: 0; display: flex; align-items: center; gap: 10px; width: 100%; max-width: none; margin: 0;
  padding: 10px 14px; border: 1px solid #FEDF89; border-left: 4px solid #F79009; border-radius: 8px;
  background: #FFFAEB; color: #7A2E0E; font-size: 14px; font-weight: 500; line-height: 1.45; text-align: left; }
.env-header .quota-banner::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 0;
  background: #B54708; -webkit-mask: var(--info-icon) center / contain no-repeat; mask: var(--info-icon) center / contain no-repeat; }
.env-header .title-action { flex-direction: row; align-items: center; }
.env-header-row:first-child { align-items: center; }

/* Workspace card */
.ws-card { display: block; padding: 14px 14px 16px; }
.ws-card-head { display: flex; align-items: center; gap: 10px; }
.ws-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 8px; background: var(--subtle); color: var(--secondary); border: 1px solid var(--border); }
.ws-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ws-card .ws-text { line-height: 1.2; }
.ws-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ws-card .ws-name { font-size: 14px; }
.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: 5px; 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-tabs { display: inline-flex; gap: 4px; margin: 4px 24px 0; padding: 4px; border: 1px solid var(--border); border-bottom: 1px solid var(--border);
  border-radius: 999px; background: var(--subtle); overflow-x: auto; max-width: calc(100% - 48px); }
.detail-tab { min-height: 34px; padding: 0 16px; border-radius: 999px; color: var(--secondary); font-size: 13px; font-weight: 500; }
.detail-tab:hover { background: rgb(255 255 255 / 60%); color: var(--text); }
.detail-tab[aria-selected="true"] { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 10%), 0 2px 6px rgb(244 122 32 / 28%); }
.detail-tab[aria-selected="true"]::after { content: none; }
.detail-tab:focus-visible { outline-offset: 1px; }
.detail-body { border-top: 0; padding-top: 18px; }

/* 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: 10px; 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: 11px; }
.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-head { align-items: center; padding: 20px 24px 16px; border-bottom: 1px solid var(--border); }
.detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.detail-actions .detail-tabs { margin: 0; max-width: 100%; }
.detail-actions .actions { display: flex; gap: 8px; margin: 0; }
.detail-actions .actions button { min-height: 36px; height: 36px; padding: 0 16px; border-radius: 999px; font-size: 13px; }
.detail-actions .menu-wrap > button, .detail-actions > button:last-child { min-height: 36px; height: 36px; width: 36px; padding: 0; border-radius: 999px; }
.detail-actions .detail-tabs + .actions { padding-left: 10px; border-left: 1px solid var(--border); }
.detail-body { padding-top: 20px; }
@media (max-width: 1280px) {
  .detail-head { align-items: flex-start; }
  .detail-actions { width: 100%; justify-content: space-between; }
}

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

/* pass 14: header grid — name+status | tabs+Pause+⋯ on row 1, version/dates span row 2. */
.detail-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; row-gap: 10px; }
.detail-head .detail-title { display: contents; }
.detail-head .environment-name { grid-column: 1; grid-row: 1; min-width: 0; }
.detail-head .detail-actions { grid-column: 2; grid-row: 1; width: auto; margin: 0; flex-wrap: nowrap; justify-content: flex-end; }
.detail-head .env-meta { grid-column: 1 / -1; grid-row: 2; margin-top: 0; }
@media (max-width: 1180px) { .detail-head .detail-actions { grid-column: 1 / -1; grid-row: 3; justify-content: space-between; flex-wrap: wrap; } }

/* 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: 14px; }
.app-tile { height: 124px; min-height: 0; padding: 0 14px; 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: 18px; 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 7px; border-radius: 999px; background: var(--subtle); color: var(--secondary);
  border: 1px solid var(--border); font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* 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; }

.dashboard { padding: 24px 0 8px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head h1 { margin: 0; font-size: 22px; }
.dash-lede { margin: 4px 0 0; font-size: 13px; }
.dash-head .secondary { min-height: 38px; padding: 0 16px; border-radius: 999px; }

.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.dash-kpi { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.dash-kpi-top { display: flex; align-items: center; gap: 10px; }
.dash-kpi-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--subtle); color: var(--secondary); }
.dash-kpi-label { font-size: 13px; color: var(--secondary); font-weight: 500; }
.dash-kpi-value { font-size: 28px; line-height: 1.15; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.dash-kpi-note { font-size: 12px; color: var(--muted); }
.dash-kpi.tone-good .dash-kpi-icon { background: #ECFDF3; color: #067647; }
.dash-kpi.tone-info .dash-kpi-icon { background: #EFF8FF; color: #175CD3; }
.dash-kpi.tone-warn .dash-kpi-icon { background: #FFFAEB; color: #B54708; }
.dash-kpi.tone-bad .dash-kpi-icon { background: #FEF3F2; color: #B42318; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 16px; }
.dash-card { padding: 18px 20px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); min-width: 0; }
.dash-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dash-card-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.dash-sub { font-size: 12px; color: var(--muted); }

.dash-stack { display: flex; gap: 2px; height: 12px; border-radius: 4px; overflow: hidden; background: var(--subtle); margin-bottom: 14px; }
.dash-seg { display: block; min-width: 6px; }
.dash-seg.empty { flex: 1; background: var(--subtle); }
.dash-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dash-legend li { display: grid; grid-template-columns: 10px 1fr auto 40px; align-items: center; gap: 10px; font-size: 13px; color: var(--secondary); }
.dash-legend strong { color: var(--text); font-variant-numeric: tabular-nums; }
.dash-pct { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.dash-dot { width: 10px; height: 10px; border-radius: 3px; }

.dash-bars { display: grid; gap: 10px; }
.dash-bar-row { display: grid; grid-template-columns: minmax(110px, 40%) 1fr 28px; align-items: center; gap: 10px; font-size: 13px; }
.dash-bar-label { color: var(--secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-bar-track { height: 8px; border-radius: 4px; background: var(--subtle); overflow: hidden; }
.dash-bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--brand); }
.dash-bar-value { text-align: right; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

.dash-table-wrap { overflow-x: auto; margin: 0 -20px -18px; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--subtle); }
.dash-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--secondary); white-space: nowrap; }
.dash-table th:first-child, .dash-table td:first-child { padding-left: 20px; }
.dash-table tbody tr { cursor: pointer; }
.dash-table tbody tr:hover, .dash-table tbody tr:focus-visible { background: var(--active); outline: none; }
.dash-table td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.dash-env { display: flex; align-items: center; gap: 10px; }
.dash-env-text { display: flex; flex-direction: column; line-height: 1.25; }
.dash-env-text strong { color: var(--text); }
.dash-env-text span { font-size: 12px; color: var(--muted); }
.dash-vm { width: 30px !important; height: 30px !important; border-radius: 8px !important; }
.dash-vm.status-running { background: #ECFDF3; color: #067647; border-color: #ABEFC6; }
.dash-vm.status-progress { background: #EFF8FF; color: #175CD3; border-color: #B2DDFF; }
.dash-vm.status-paused { background: var(--subtle); color: #667085; border-color: var(--border); }
.dash-vm.status-approval { background: #F4F3FF; color: #6941C6; border-color: #D9D6FE; }
.dash-vm.status-attention { background: #FEF3F2; color: #B42318; border-color: #FECDCA; }
.dash-empty { text-align: center; padding: 28px; color: var(--muted); }

/* pass 17: uptime meta item · richer app-opening note. */
.meta-item.uptime .meta-value { color: #067647; }
.meta-item.uptime svg { color: #12B76A; }
.app-note { display: flex; align-items: center; gap: 12px; margin-top: 4px; padding: 12px 14px; border: 1px solid #D1E9FF; border-radius: 10px; background: #F5FAFF; color: #1849A9; font-size: 13px; line-height: 1.5; }
.app-note > svg { flex: none; color: #2E90FA; }
.app-note-text { flex: 1; min-width: 0; }
.app-note-text strong { font-weight: 600; }
.app-note-action { flex: none; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid #B2DDFF; color: #175CD3; font-size: 13px; font-weight: 600; }
.app-note-action:hover { background: #EFF8FF; }
@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). */
.detail-head .detail-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; grid-column: 1; grid-row: 1; min-width: 0; }
.detail-head .environment-name { grid-column: auto; grid-row: auto; }
.detail-head .env-meta { grid-column: auto; grid-row: auto; margin: 0; padding-left: 16px; border-left: 1px solid var(--border); }
.detail-head { padding: 16px 24px; }
@media (max-width: 1180px) { .detail-head .env-meta { padding-left: 0; border-left: 0; } }

/* pass 19: title row = name · status │ details · actions; pill tabs on their own row beneath. */
.detail-head { grid-template-columns: minmax(0, 1fr) auto; border-bottom: 0; padding: 18px 24px 12px; }
.detail-head .detail-title { flex-wrap: wrap; row-gap: 6px; }
.detail-head .env-meta { flex-wrap: wrap; gap: 6px 14px; }
.detail-head .detail-actions { grid-column: 2; grid-row: 1; align-self: start; }
.detail-head .detail-actions .actions { padding-left: 0; border-left: 0; }
.detail-tabrow { padding: 0 24px 16px; border-bottom: 1px solid var(--border); }
.detail-tabrow .detail-tabs { margin: 0; max-width: 100%; }
@media (max-width: 1180px) { .detail-head .detail-actions { grid-column: 2; grid-row: 1; width: auto; flex-wrap: nowrap; } }

/* pass 19b: no leading divider on the details (it wraps under the name on most widths). */
.detail-head .env-meta { padding-left: 0; border-left: 0; }

/* pass 20: title row = name · status | pill tabs │ Pause ⋯ ; details on the line beneath, full width. */
.detail-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; row-gap: 10px; padding: 18px 24px 16px; border-bottom: 1px solid var(--border); }
.detail-head .detail-title { display: contents; }
.detail-head .environment-name { grid-column: 1; grid-row: 1; min-width: 0; }
.detail-head .detail-actions { grid-column: 2; grid-row: 1; align-self: center; width: auto; margin: 0; flex-wrap: nowrap; justify-content: flex-end; gap: 10px; }
.detail-head .detail-actions .detail-tabs + .actions { padding-left: 10px; border-left: 1px solid var(--border); }
.detail-head .env-meta { grid-column: 1 / -1; grid-row: 2; margin: 0; padding: 0; border: 0; flex-wrap: wrap; }
@media (max-width: 1180px) { .detail-head .detail-actions { grid-column: 1 / -1; grid-row: 3; justify-content: space-between; flex-wrap: wrap; } }

/* pass 21: slots notice inline in the Environments title row (between the slot chip and New environment). */
.env-heading { flex-wrap: nowrap; }
.env-header .quota-inline { order: 0; display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; max-width: 640px; margin: 0; padding: 7px 12px;
  border: 1px solid #FEDF89; border-radius: 999px; background: #FFFAEB; color: #7A2E0E; font-size: 13px; font-weight: 500; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.env-header .quota-inline::before { content: ""; flex: none; width: 16px; height: 16px; background: #B54708; -webkit-mask: var(--info-icon) center / contain no-repeat; mask: var(--info-icon) center / contain no-repeat; }
@media (max-width: 1100px) { .env-heading { flex-wrap: wrap; } .env-header .quota-inline { white-space: normal; border-radius: 10px; max-width: none; flex-basis: 100%; } }

/* pass 21b: never squeeze the title or slot chip; fit the notice. */
.env-heading h1, .slot-chip { flex: none; white-space: nowrap; }
.env-heading { gap: 12px; }
.env-header .quota-inline { max-width: none; padding: 6px 12px 6px 10px; font-size: 12.5px; gap: 6px; }
.env-header .env-header-row:first-child { gap: 12px; }
#new-environment { padding: 0 14px; }

/* Redesign pass 22 — scale to ANY number of environments / slots. */
/* Slot meter: fixed 72px; the console draws one segment per slot, so segments share that width
   whatever the quota is (4, 10, 50…). Denser quotas tighten the gaps, then merge into one bar. */
.slot-chip .slot-meter { flex: none; width: 72px; gap: 2px; }
.slot-chip .slot-meter > * { flex: 1 1 0; width: auto !important; min-width: 1px; height: 6px; margin: 0; border-radius: 3px; }
.slot-chip .slot-meter:has(> :nth-child(9)) { gap: 1px; }
.slot-chip .slot-meter:has(> :nth-child(9)) > * { border-radius: 1px; }
.slot-chip .slot-meter:has(> :nth-child(25)) { gap: 0; border-radius: 3px; overflow: hidden; }
.slot-chip .slot-meter:has(> :nth-child(25)) > * { border-radius: 0; }
.slot-chip, .slot-chip * { white-space: nowrap; }
.slot-chip #quota-metric { font-variant-numeric: tabular-nums; }

/* Slots notice in the title row: wraps to a second line instead of cutting the sentence off. */
.env-header .quota-inline { flex: 1 1 340px; white-space: normal; overflow: visible; text-overflow: clip; border-radius: 12px; line-height: 1.35; }
.env-heading { flex-wrap: nowrap; align-items: center; }

/* 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). */
.detail-head .environment-name { flex-wrap: nowrap; min-width: 0; }
.detail-head .environment-name h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-head .environment-name .badge { flex: none; }

/* Redesign pass 24 — Observability: VM picker · services / topics list · log viewer · Kafka events · settings. */
.obs-vm { display: inline-flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--secondary); }
.obs-vm-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.obs-vm .obs-select { border: 0; background: var(--subtle); border-radius: 999px; min-height: 34px; padding: 0 30px 0 12px; font-weight: 600; color: var(--text); }
.obs-tabs { margin: 0 0 14px; }
.obs-tabs .detail-tab { display: inline-flex; align-items: center; gap: 6px; }
.obs-panel { padding: 0; overflow: hidden; }
.obs-error { margin: 0 0 12px; }
.obs-empty-card { padding: 40px; text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }

.obs-kafka { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 520px; }
.obs-topics { display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; border-right: 1px solid var(--border); background: var(--page); max-height: 640px; overflow-y: auto; }
.obs-side-title { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 4px 8px 8px; }
.obs-topic { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 0; padding: 9px 10px; border-radius: 8px; background: transparent; color: var(--text); text-align: left; font-weight: 500; border: 1px solid transparent; flex: none; }
.obs-topic:hover { background: var(--card); border-color: var(--border); }
.obs-topic.selected { background: var(--active); border-color: var(--brand); color: var(--active-text); }
.obs-topic-line { display: flex; align-items: center; gap: 8px; }
.obs-topic-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.obs-topic-meta { font-size: 11px; color: var(--muted); padding-left: 0; }
.obs-selected-image { display:flex; flex-direction:column; gap:4px; padding:12px 16px; border-bottom:1px solid var(--border); min-width:0; font-size:12px; color:var(--muted); }
.obs-selected-image code { overflow-wrap:anywhere; white-space:normal; color:var(--text); user-select:text; }
.obs-topic-line + .obs-topic-meta { padding-left: 16px; }
.obs-state { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.obs-state.ok { background: #12B76A; } .obs-state.bad { background: #F04438; } .obs-state.off { background: #98A2B3; }
.obs-events { display: flex; flex-direction: column; min-width: 0; }
.obs-current { font-size: 14px; margin-right: 4px; }

.obs-toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.obs-toolbar-right { display: flex; gap: 8px; margin-left: auto; }
.obs-select { min-height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: 13px; }
.obs-pills { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--border); }
.obs-pill { min-height: 28px; padding: 0 11px; border-radius: 999px; background: transparent; color: var(--secondary); font-size: 12px; font-weight: 500; }
.obs-pill[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / 10%); }
.obs-search { position: relative; display: flex; align-items: center; }
.obs-search svg { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.obs-search input { min-height: 34px; width: 220px; padding: 0 10px 0 32px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.obs-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 8px; background: var(--card); border: 1px solid var(--border); color: var(--secondary); font-size: 13px; font-weight: 500; }
.obs-btn:hover { background: var(--subtle); color: var(--text); }
.obs-btn.on { background: #ECFDF3; border-color: #ABEFC6; color: #067647; }

.obs-log { flex: 1; min-height: 420px; max-height: 560px; overflow: auto; padding: 8px 0; background: #0F172A; color: #E2E8F0;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.obs-line { display: grid; grid-template-columns: 96px 120px 54px minmax(0, 1fr); gap: 10px; padding: 1px 16px; }
.obs-line:hover { background: rgb(255 255 255 / 5%); }
.obs-ts { color: #94A3B8; white-space: nowrap; }
.obs-svc { color: #7DD3FC; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obs-lvl { font-weight: 700; }
.obs-line.lvl-error .obs-lvl { color: #F87171; } .obs-line.lvl-warn .obs-lvl { color: #FBBF24; } .obs-line.lvl-info .obs-lvl { color: #34D399; } .obs-line.lvl-debug .obs-lvl { color: #A78BFA; }
.obs-line.lvl-error { background: rgb(248 113 113 / 8%); }
.obs-msg { white-space: pre-wrap; word-break: break-word; }
.obs-mask { background: #334155; color: #CBD5E1; border-radius: 4px; padding: 0 5px; font-size: 11px; }
.obs-log .obs-empty { color: #94A3B8; padding: 24px 16px; }
.obs-foot { margin: 0; padding: 10px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); }

.obs-table-wrap { flex: 1; overflow: auto; max-height: 560px; }
.obs-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.obs-table th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; background: var(--subtle); border-bottom: 1px solid var(--border); }
.obs-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--secondary); }
.obs-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.obs-table tbody tr { cursor: pointer; }
.obs-table tbody tr:hover, .obs-table tbody tr.open { background: var(--active); }
.obs-key { font-family: ui-monospace, Consolas, monospace; color: var(--text); white-space: nowrap; }
.obs-payload code, .obs-payload pre { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); }
.obs-payload pre { margin: 0; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; }

.obs-settings { display: grid; gap: 14px; padding: 18px; max-width: 760px; }
.obs-set-card { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; background: var(--card); display: grid; gap: 12px; }
.obs-set-card h3 { margin: 0; font-size: 14px; }
.obs-toggle, .obs-field { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.obs-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.obs-switch { flex: none; position: relative; width: 38px; height: 22px; border-radius: 999px; background: #D0D5DD; transition: background 150ms; }
.obs-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 20%); transition: transform 150ms; }
.obs-toggle input:checked + .obs-switch { background: var(--brand); }
.obs-toggle input:checked + .obs-switch::after { transform: translateX(16px); }
.obs-toggle input:focus-visible + .obs-switch { outline: 2px solid var(--brand); outline-offset: 2px; }
.obs-toggle-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.obs-toggle-text strong { font-size: 13px; color: var(--text); font-weight: 600; }
.obs-toggle-text span { font-size: 12px; color: var(--muted); }
.obs-field input { width: 110px; min-height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; text-align: right; }
.obs-set-actions { display: flex; justify-content: flex-end; gap: 10px; }
.obs-set-actions button { min-height: 38px; border-radius: 999px; padding: 0 18px; }

@media (max-width: 900px) {
  .obs-kafka { grid-template-columns: 1fr; }
  .obs-topics { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); max-height: none; }
  .obs-line { grid-template-columns: 80px minmax(0, 1fr); } .obs-svc, .obs-lvl { display: none; }
  .obs-toolbar-right { margin-left: 0; }
}

/* pass 24b: isolate Observability from the console global label / select / aside rules. */
.obs-vm { flex-direction: row !important; align-items: center !important; gap: 8px; margin: 0; font-weight: 500; }
.obs-vm > svg { flex: none; }
.obs-select, .obs-vm .obs-select { width: auto !important; flex: none; margin: 0; }
.obs-topics { position: static; height: auto; }
.obs-toggle, .obs-field { flex-direction: row !important; align-items: center !important; text-align: left; margin: 0; font-weight: 400; }
.obs-field input { flex: none; margin: 0; }
.obs-search input { margin: 0; }
.observability .dash-head { align-items: center; }

/* 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. */
.obs-dd { position: relative; display: inline-flex; }
.obs-dd-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px 0 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); color: var(--text); font-size: 13px; font-weight: 500; white-space: nowrap; box-shadow: 0 1px 2px rgb(0 0 0 / 4%); }
.obs-dd-btn:hover { border-color: var(--border-strong); background: var(--subtle); }
.obs-dd.open .obs-dd-btn, .obs-dd-btn:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(244 122 32 / 18%); outline: none; }
.obs-dd-btn > svg:first-child { color: var(--muted); }
.obs-dd-btn > svg:last-child { color: var(--muted); transition: transform 150ms; }
.obs-dd.open .obs-dd-btn > svg:last-child { transform: rotate(180deg); }
.obs-dd-prefix { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.obs-dd-value { font-weight: 600; }
.obs-dd-list { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 100%; max-height: 300px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgb(16 24 40 / 14%), 0 2px 6px rgb(16 24 40 / 6%);
  opacity: 0; transform: translateY(-4px); pointer-events: none; visibility: hidden; transition: opacity 120ms, transform 120ms, visibility 120ms; }
.obs-dd.open .obs-dd-list { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
.obs-dd-list:focus { outline: none; }
.obs-dd-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--text); cursor: pointer; white-space: nowrap; }
.obs-dd-opt:hover, .obs-dd-opt.active { background: var(--subtle); }
.obs-dd-opt[aria-selected="true"] { background: var(--active); color: var(--active-text); font-weight: 600; }
.obs-dd-opt.disabled { color: var(--muted); cursor: not-allowed; background: transparent; }
.obs-dd-check { display: inline-grid; place-items: center; width: 16px; flex: none; color: var(--brand); }
.obs-dd-text { flex: 1; }
.obs-dd-hint { margin-left: 12px; font-size: 11px; font-weight: 500; color: var(--muted); }
.obs-dd-opt[aria-selected="true"] .obs-dd-hint { color: var(--active-text); }
/* The VM picker sits in the page header: larger, right-aligned list. */
.obs-dd-vm .obs-dd-btn { min-height: 42px; padding: 0 12px 0 14px; border-radius: 999px; font-size: 14px; }
.obs-dd-vm .obs-dd-list { left: auto; right: 0; min-width: 280px; }

/* Log viewer: light, like the Kafka events table. */
.obs-log { background: var(--card); color: var(--text); padding: 0; border-top: 0; }
.obs-line { padding: 5px 16px; border-bottom: 1px solid var(--border); align-items: baseline; }
.obs-line:hover { background: var(--subtle); }
.obs-ts { color: var(--muted); }
.obs-svc { color: #175CD3; }
.obs-lvl { font-size: 11px; letter-spacing: .03em; }
.obs-line.lvl-error .obs-lvl { color: #B42318; } .obs-line.lvl-warn .obs-lvl { color: #B54708; } .obs-line.lvl-info .obs-lvl { color: #067647; } .obs-line.lvl-debug .obs-lvl { color: #6941C6; }
.obs-line.lvl-error { background: #FEF3F2; }
.obs-line.lvl-error:hover { background: #FEE4E2; }
.obs-msg { color: var(--text); }
.obs-mask { background: var(--subtle); color: var(--secondary); border: 1px solid var(--border); }
.obs-log .obs-empty { color: var(--muted); }

/* pass 27: search hit highlight · top-bar refresh control. */
.obs-hit { background: #FEF0C7; color: #7A2E0E; border-radius: 3px; padding: 0 1px; box-shadow: 0 0 0 1px #FEDF89; }
.obs-search input::-webkit-search-cancel-button { cursor: pointer; }
.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; } }
.refresh-dd .obs-dd-btn { min-height: 38px; border-radius: 999px; }
.refresh-dd .obs-dd-list { left: auto; right: 0; min-width: 170px; }
@media (max-width: 700px) { .refresh-dd .obs-dd-value { display: none; } }

/* pass 27b: top bar has 4 cells now — brand | (spacer) | refresh controls | account. */
.topbar { grid-template-columns: 240px minmax(0, 1fr) auto auto; }
.refresh-ctl { padding: 0 4px 0 12px; }
@media (max-width: 900px) { .topbar { grid-template-columns: auto minmax(0, 1fr) auto auto; } }

/* pass 28: toolbar row 1 = title · filters … actions (right); row 2 = full-width search. */
.obs-toolbar { flex-wrap: wrap; row-gap: 10px; }
.obs-toolbar-right { order: 5; margin-left: auto; }
.obs-toolbar .obs-search { order: 10; flex: 1 1 100%; }
.obs-toolbar .obs-search input { width: 100%; min-height: 38px; border-radius: 10px; }

/* 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: 700; }

/* pass 31: title row never overlaps — the notice wraps below the title + chip when space runs out. */
.env-heading { flex-wrap: wrap; min-width: 0; row-gap: 10px; }
.env-heading h1 { flex: 0 0 auto; }
.env-header .quota-inline { flex: 1 1 340px; min-width: 280px; }
.env-header .env-header-row:first-child { flex-wrap: nowrap; align-items: flex-start; }
.env-header .title-action { flex: none; }

/* pass 31b: detail header wraps instead of squeezing the name — name+status | tabs+actions | details. */
.detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.detail-head .environment-name { flex: 1 1 220px; min-width: 180px; order: 1; }
.detail-head .detail-actions { flex: 0 1 auto; order: 2; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.detail-head .env-meta { flex: 1 1 100%; order: 3; }

/* 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). */
.billing-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.billing-row > .panel, .billing-row > .unit-costs { flex: none; min-width: 0; margin: 0; }
.billing-row:has(> .unit-costs[hidden]) { grid-template-columns: minmax(0, 1fr); }
.budget-panel .budget-form { flex-wrap: nowrap; }
.budget-panel .budget-form label { flex: 1 1 auto; max-width: none; }
.budget-panel .budget-form input { width: 100%; }
.budget-panel .budget-form button { flex: none; }
@media (max-width: 900px) { .billing-row { grid-template-columns: minmax(0, 1fr); } }
.billing-row { margin-bottom: 20px; }

/* Schedule tab — inline view card; the pencil turns the same card into the editor (no modal). */
.schedule-card { border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.schedule-card.schedule-warning { border-color: #F79009; background: #FFFAEB; }
.schedule-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.schedule-card-titles { display: flex; align-items: center; gap: 10px; min-width: 0; }
.schedule-card-titles h3 { margin: 0; font-size: 16px; font-weight: 600; }
.schedule-mode-pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--subtle); color: var(--secondary); }
.schedule-mode-pill.mode-weekly, .schedule-mode-pill.mode-timer { background: var(--active); color: var(--active-text); }
.schedule-edit { border: 1px solid var(--border); background: var(--card); }
.schedule-edit:hover:not(:disabled) { border-color: var(--brand); color: var(--active-text); background: var(--active); }
.schedule-edit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.schedule-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.schedule-facts > div { display: contents; }
.schedule-facts dt { color: var(--muted); }
.schedule-facts dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.schedule-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.schedule-week-day { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--page); min-width: 0; }
.schedule-week-day.on { border-color: color-mix(in oklch, var(--brand) 40%, var(--border)); background: var(--active); }
.schedule-week-name { font-size: 12px; font-weight: 600; color: var(--secondary); text-transform: uppercase; letter-spacing: .04em; }
.schedule-week-time { font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.schedule-week-day:not(.on) .schedule-week-time { color: var(--muted); }
.schedule-card-actions { justify-content: flex-start; }
.schedule-card .schedule-form { gap: 16px; }
.schedule-form-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.schedule-form-row > label { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; }
.schedule-card .schedule-weekly > label { display: flex; flex-direction: column; gap: 6px; max-width: 360px; }
.schedule-card .schedule-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 12px; }
.schedule-form-actions { justify-content: flex-end; border-top: 1px solid var(--border); padding-top: 14px; }
@media (max-width: 900px) { .schedule-week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .schedule-week { grid-template-columns: repeat(2, minmax(0, 1fr)); } .schedule-facts { grid-template-columns: 1fr; } .schedule-facts dt { margin-top: 6px; } }
/* Inline editor: day boxes wide enough for start · to · end · Remove, never overlapping. */
.schedule-card .schedule-days { grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 12px; }
.schedule-card .schedule-day { margin: 0; min-width: 0; }
.schedule-card .schedule-window { flex-wrap: nowrap; }
.schedule-card .schedule-window input { width: 128px; flex: 0 1 128px; }
.schedule-card .schedule-window .text-button { flex: none; }
.schedule-card .schedule-weekly { display: flex; flex-direction: column; gap: 12px; }
.schedule-card .schedule-weekly > .secondary { align-self: flex-start; }
@media (max-width: 560px) { .schedule-card .schedule-window { flex-wrap: wrap; } .schedule-card .schedule-window input { flex: 1 1 110px; width: auto; } .schedule-card { padding: 16px; } }
/* Phone width: the brand, refresh control and account must fit 390px without page side-scroll. */
@media (max-width: 480px) {
  .topbar .brand { padding: 0 10px; gap: 6px; }
  .topbar .brand img { max-width: 76px; }
  .refresh-ctl { padding: 0 2px 0 6px; gap: 4px; }
}
@media (max-width: 420px) {
  .refresh-dd .obs-dd-value { display: none; }   /* icon + caret; the button keeps its aria-label */
  .topbar .brand img { max-width: 64px; }
  .topbar .brand .brand-badge { font-size: 13px; padding: 2px 8px; }
}

/* Inline schedule editor v2 — settings column + compact week list (one row per day). */
.schedule-layout { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 20px 28px; align-items: start; }
.schedule-layout.single { grid-template-columns: minmax(0, 520px); }
.schedule-settings { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.schedule-settings > label { display: flex; flex-direction: column; gap: 6px; }
.schedule-settings .small { margin: 0; }
.schedule-card .schedule-weekly { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.schedule-week-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.schedule-week-title { font-weight: 600; font-size: 13px; color: var(--secondary); }
.schedule-copy { font-size: 13px; }
.schedule-card .schedule-days { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.schedule-day-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 32px; align-items: center; gap: 10px; padding: 6px 10px 6px 14px; min-height: 48px; background: var(--card); }
.schedule-day-row + .schedule-day-row { border-top: 1px solid var(--border); }
.schedule-day-name { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.schedule-day-row.on .schedule-day-name { color: var(--active-text); }
.schedule-day-slots { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.schedule-day-off { font-size: 13px; color: var(--muted); }
.schedule-slot { display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 6px; border: 1px solid color-mix(in oklch, var(--brand) 35%, var(--border)); border-radius: 8px; background: var(--active); }
.schedule-card .schedule-slot input[type=time] { width: 96px; min-height: 30px; height: 30px; padding: 0 4px; border: 0; background: transparent; font-size: 13px; }
.schedule-slot-sep { color: var(--muted); }
.schedule-slot-remove, .schedule-slot-add { width: 28px; height: 28px; min-height: 28px; }
.schedule-slot-remove svg, .schedule-slot-add svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.schedule-slot-remove:hover { color: #B42318; background: #FEE4E2; }
.schedule-slot-add { border: 1px dashed var(--border-strong); }
.schedule-slot-add:hover { border-color: var(--brand); color: var(--active-text); background: var(--active); }
@media (max-width: 860px) { .schedule-layout { grid-template-columns: minmax(0, 1fr); } }
/* Phone: the detail tab strip scrolls inside itself instead of widening the page. */
@media (max-width: 560px) {
  .environment-header-actions { flex-wrap: wrap; min-width: 0; max-width: 100%; }
  .detail-tabs { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .detail-tabs .detail-tab { flex: none; }
}
@media (max-width: 560px) {
  .schedule-day-row { grid-template-columns: 38px minmax(0, 1fr) 28px; gap: 6px; padding: 6px 8px 6px 10px; }
  .schedule-card .schedule-slot input[type=time] { width: 78px; 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-head { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .topbar .brand img { max-width: none; height: 20px; width: auto; }   /* scale, never crop the logo */
}
@media (max-width: 560px) {
  .schedule-day-slots { display: grid; grid-template-columns: minmax(0, 1fr); }
  .schedule-slot { display: flex; min-width: 0; max-width: 100%; }
  .schedule-card .schedule-slot input[type=time] { flex: 1 1 0; width: auto; min-width: 0; }
}
/* Running hours: say what the two times are. */
.schedule-week-head { align-items: flex-end; }
.schedule-week-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.schedule-week-sub { font-size: 12px; color: var(--muted); }
.schedule-slot-label { font-size: 12px; color: var(--muted); padding: 0 2px 0 4px; }
.schedule-slot-label:first-child { padding-left: 2px; }
@media (max-width: 560px) { .schedule-slot-label:first-child { display: none; } .schedule-slot-label { padding: 0 2px; } }
/* Chips never wider than their column, at any width (labels made them overflow into the + button). */
.schedule-day-slots { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; }
.schedule-slot { min-width: 0; max-width: 100%; }
.schedule-card .schedule-slot input[type=time] { flex: 0 1 96px; min-width: 64px; }
/* Side-by-side only when the card is wide enough for settings + full-width day rows. */
@media (max-width: 1279px) { .schedule-layout { grid-template-columns: minmax(0, 1fr); } }
.schedule-card .schedule-slot input[type=time] { min-width: 58px; }
@media (max-width: 400px) { .schedule-slot { flex-wrap: wrap; row-gap: 0; } .schedule-slot-label { display: none; } .schedule-slot-label + input + .schedule-slot-label, .schedule-slot input + .schedule-slot-label { display: inline; } }
/* The card's OWN width decides the layout (the detail pane can be narrow on a wide screen, next to the list). */
.schedule-card { container-type: inline-size; }
@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: 6px; padding: 6px 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); } }
.schedule-copy { white-space: nowrap; flex: none; }

/* Maintained Observability workspace: bounded viewers and a stable terminal. */
.observation-output { min-width:0; max-width:100%; }
.observation-output pre,.obs-event-list pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:520px; overflow:auto; }
.obs-events { min-width:0; }
.obs-toolbar label { display:flex; flex-direction:column; gap:4px; }
.obs-toolbar input[type=search] { min-width:150px; flex:1; }
.obs-topic { width:100%; text-align:left; }
.obs-topic-meta { display:block; }
.obs-event-list details { padding:12px; border-bottom:1px solid var(--border); }
.obs-event-list summary { cursor:pointer; }
.obs-settings { padding:20px; }
.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){.obs-kafka{display:flex;flex-direction:column}.obs-topics{max-height:180px;overflow:auto;width:100%}.obs-toolbar{flex-wrap:wrap}.refresh-ctl select{max-width:95px}.obs-line{grid-template-columns:75px 60px minmax(0,1fr)}.obs-line .obs-svc{display:none}.detail-list{grid-template-columns:1fr}.detail-row{display:block}}

/* Final responsive shell rules: keep navigation compact on narrow screens. */
@media (max-width:900px) {
  .env-header .env-header-row:first-child { flex-wrap:wrap; }
  .workspace > aside { flex-direction:row; flex-wrap:wrap; justify-content:flex-start; gap:4px; overflow:visible; }
  .workspace > aside .ws-card { display:none; }
  .workspace > aside .nav { flex:0 0 auto; width:auto; white-space:nowrap; }
}
@media (max-width:600px) {
  .obs-tabs { flex-wrap:wrap; overflow:visible; border-radius:16px; }
  .obs-topics { display:flex; flex-direction:row; flex-wrap:wrap; gap:8px; padding:12px; }
  .obs-topics .obs-side-title { flex-basis:100%; }
  .obs-topics .obs-topic { width:auto; flex:1 1 120px; }
  .obs-tabs .detail-tab { min-height:38px; }
}

@media (max-width:600px) {
  .obs-line { grid-template-columns:65px minmax(0,1fr); }
  .obs-line .obs-svc, .obs-line .obs-lvl { display:none; }
}

#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. */
.detail-head .detail-actions { min-width:0; max-width:100%; }
.detail-head .detail-tabs { flex-wrap:wrap; min-width:0; border-radius:16px; }
.environment-observability { min-width:0; }
.environment-observability .obs-kafka { display:flex; flex-direction:column; }
.environment-observability .obs-topics { display:flex; flex-direction:row; flex-wrap:wrap; gap:8px; padding:12px; width:100%; }
.environment-observability .obs-side-title { flex-basis:100%; }
.environment-observability .obs-topic { width:auto; flex:0 1 160px; }
.environment-observability .obs-tabs { flex-wrap:wrap; overflow:visible; border-radius:16px; }
.detail-head .env-meta { order:1; flex-basis:100%; }
.detail-head .detail-actions { order:2; flex:1 1 100%; width:100%; margin-left:0; justify-content:flex-start; }

/* Background service tiles share application sizing, with an in-console action. */
button.app-tile { width:100%; font:inherit; color:var(--text); }
.etl-run-summary { padding:16px 20px; border-bottom:1px solid var(--border); }
.etl-run-summary p { margin:8px 0 0; }

/* Environment application access uses the same form rhythm as provisioning. */
.environment-access .access-form { min-width: 0; border: 0; padding: 0; margin: 20px 0 0; }
.environment-access .access-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; align-items: center; }
.environment-access .security-roles legend { font-size: 14px; font-weight: 650; }
.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 20px; border-bottom:1px solid var(--border); }
.container-restart-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.container-restart-heading > div { min-width:0; overflow-wrap:anywhere; }
.container-restart-status { margin:10px 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:16px; }
.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:6px;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:.6rem; }
.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-user-row { border-bottom:1px solid var(--border,#ddd); padding:1rem 0; overflow-wrap:anywhere; }
.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(--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:.65rem;flex-wrap:wrap;margin:1rem 0}
.access-provider-tabs{border-bottom:1px solid var(--border,#ddd);padding-bottom:.75rem}
.access-provider-tabs button{padding:.65rem 1rem}
.access-provider-tabs button.active{background:var(--accent,#fc7917);color:white}
.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:.6rem;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:7px; 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; }
.topbar .brand { padding:0 12px; gap:8px; }
.topbar .brand img { max-width:104px; height:auto; max-height:36px; }
.workspace.navigation-collapsed { grid-template-columns:minmax(0,1fr); grid-template-rows:60px minmax(0,1fr); }
.workspace.navigation-collapsed > aside { display:none; }
.workspace.navigation-collapsed > main { grid-column:1 / -1; }
/* 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:10px 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:1.4; }
.env-list .badge { align-self:flex-start; transform:none; font-size:11px; padding:2px 8px; }
.env-list .env-item-meta { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
@media (max-width:600px) {
  .topbar .brand { padding:0 6px; gap:4px; }
  .topbar .brand img { width:64px; max-width:64px; height:auto; }
  .topbar .brand-badge { display:none; }
}

/* Workspace membership administration: one compact table, independent detail tabs. */
.workspace-body.workspace-users-only { display:block; }
.workspace-users-only > .workspace-section { border-left:0; border-top:0; }
.workspace-users .access-form { width:100%; min-width:0; border:0; padding:0; margin:0; }
.workspace-user-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.workspace-user-toolbar input[type=search] { flex:1 1 220px; max-width:360px; }
.workspace-user-toolbar label { flex-direction:row; align-items:center; white-space:nowrap; }
.workspace-user-toolbar input[type=checkbox] { width:18px; height:18px; }
.workspace-users-table table { min-width:680px; width:100%; }
.workspace-users-table th[scope=row] { overflow-wrap:anywhere; min-width:200px; }
.workspace-users-table th small { display:block; font-weight:400; color:var(--muted); }
.workspace-users-table td:nth-child(2) { min-width:230px; }
.workspace-users-table td:nth-child(3) { min-width:130px; }
.workspace-user-actions button { min-height:32px; padding:4px 9px; font-size:12px; margin:3px; white-space:nowrap; }
.workspace-users .access-actions { margin-top:16px; }

#dashboard-activity .workspace-section { padding:0; }

/* Provisioning uses the Access table vocabulary, but saves one complete draft. */
#create-dialog.with-security{width:min(1120px,94vw)}
.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(--active-text);color:white;border-color:var(--active-text)}
