/* The customer base stylesheet supplies typography, controls and spacing. */
[hidden] { display: none !important; }
.sidebar { top: 0; }
main { margin-top: 0; min-height: 100vh; }
.workspace-context > label:first-child { margin-top: 0; }
.sidebar-bottom { padding-top: 24px; }
.sidebar-bottom p { font-size: 14px; }
.signed-out main { margin: 0 auto; max-width: 640px; padding-top: max(40px, 12vh); }
.auth-card { padding: 32px; border: 1px solid var(--line); border-radius: 12px; }
.auth-card h1 { font-size: 32px; letter-spacing: -.035em; line-height: 1.2; margin: 28px 0 16px; }
.auth-card p { color: var(--muted); }
.auth-card .brand { padding: 0; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--hull); border-radius: 8px; padding: 9px 18px; font-weight: 600; background: var(--hull); color: #fff; }
.button-link:hover { background: #28465f; }
.auth-actions, .page-actions, .pagination { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.page-actions { margin: 0; }
.error-message { color: #9b3032; overflow-wrap: anywhere; }
.error-message:empty { display: none; }
.section-error { padding: 24px; border: 1px solid #d9b6b7; border-radius: 12px; }
.section-error h2 { font-size: 22px; }
.observed { font-size: 14px; color: var(--muted); margin-top: 20px; }
.filters form { display: flex; gap: 8px; max-width: 100%; }
.filters input { min-width: 0; }
.filters select { width: auto; max-width: 100%; margin: 0; min-height: 44px; }
/* Keep desktop list controls in view; only the application table scrolls. */
@media (min-width: 921px) {
  main:has(> .apps-table) { display: flex; flex-direction: column; height: 100dvh; min-height: 0; }
  main:has(> .apps-table) > * { flex-shrink: 0; }
  main > .apps-table { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; scroll-padding-top: 52px; }
  .apps-table .app-columns { position: sticky; top: 0; z-index: 1; }
  main:has(> .apps-table) > .observed { margin-bottom: 0; }
  main:has(> .apps-table) > .pagination:empty { display: none; }
}
.app-state { min-width: 0; }
.app-state .status { white-space: normal; }
.app-connections { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.app-connections .muted { font-size: 14px; }
.app-open svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.app-name { display: inline-block; }
.facts { margin: 0; }
.facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--muted); flex-shrink: 0; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.trigger-summary { display: flex; gap: 12px; flex-wrap: wrap; }
.trigger-summary span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; }
.account-id { display: block; font: 14px/1.6 var(--mono); overflow-wrap: anywhere; user-select: all; margin-block: 16px; }
.project-row a { text-decoration: underline; }
#notice { position: fixed; z-index: 30; right: 24px; bottom: 24px; max-width: min(480px, calc(100vw - 48px)); padding: 16px 20px; color: white; background: var(--hull); border-radius: 8px; }
dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
dialog form { margin: 0; }
dialog .modal-actions { justify-content: flex-end; }
.settings-form label { display: block; }
.settings-form .help { font-size: 14px; color: var(--muted); }
@media (max-width: 1250px) and (min-width: 761px) {
  .app-columns, .app-card { grid-template-columns: minmax(180px, 1fr) 112px minmax(100px, 1fr) 44px; }
  .app-connections { display: flex; }
  .app-columns > span:nth-child(3) { display: block; }
}
@media (max-width: 920px) {
  .sidebar { position: static; width: auto; margin: 0; padding: 24px; display: block; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: 0; }
  .sidebar .tagline { display: none; }
  .workspace-context { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 20px 0; margin: 20px 0 8px; border-bottom: 0; }
  .workspace-context label { margin: 0; }
  .sidebar nav { display: flex; justify-content: space-between; gap: 4px; }
  .sidebar nav a { padding: 10px 8px; font-size: 16px; }
  .sidebar .sidebar-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; }
  .sidebar-bottom p { margin: 0; }
  main { margin: 0; min-height: 0; padding: 28px 20px; }
}
@media (max-width: 760px) {
  .app-card { grid-template-rows: auto; }
  .app-connections { grid-column: 1 / -1; grid-row: 3; }
  .app-updated { display: block; grid-column: 1 / -1; grid-row: 4; }
  .filters form { width: 100%; }
  .filters select { width: 100%; }
  .auth-card { padding: 24px; }
  .signed-out main { padding: 28px 16px; }
  .facts > div { gap: 12px; flex-wrap: wrap; }
  .facts dd { text-align: left; }
  .project-row { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
}

.deploy-content { max-width: 920px; }
.deploy-content > input { max-width: 640px; }
.deploy-content .help { color: var(--muted); font-size: 14px; margin-block: 12px 20px; }
.deploy-content .trigger-option { grid-template-columns: 20px minmax(0, 1fr); }
.deploy-content .trigger-option input, .check-line input { width: 18px; height: 18px; margin: 0; }
.deploy-content .trigger-option > span { min-width: 0; }
.deploy-content .check-line { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.deploy-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.deploy-config-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) 44px; gap: 12px; margin-bottom: 12px; }
.deploy-config-row input, .deploy-config-row select { margin: 0; min-width: 0; width: 100%; }
.deploy-config-row button { padding: 0; font-size: 22px; }
.deploy-content details summary { cursor: pointer; min-height: 44px; padding-block: 10px; }
#inspection-state { margin-block: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
#deploy-step-title:focus { outline: none; }
.occurrences { padding-left: 24px; font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 620px) {
  .deploy-config-row { grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; }
  .deploy-config-row > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .deploy-config-row > button { grid-column: 2; grid-row: 1 / span 2; }
  .deploy-content .schedule-grid { grid-template-columns: minmax(0, 1fr); }
}
.skip:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }

.app-tabs a { padding: 0 0 14px; color: var(--muted); font-size: 16px; white-space: nowrap; }
.app-tabs a[aria-current] { color: var(--hull); box-shadow: inset 0 -2px var(--hull); }
.history-list { margin-top: 24px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.history-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(140px, 1fr) minmax(240px, 1.5fr) auto; align-items: start; gap: 24px; padding: 24px; border-bottom: 1px solid var(--line); }
.history-row:last-child { border-bottom: 0; }
.history-row h3 { font-size: 18px; margin: 0 0 8px; }
.history-row p { margin: 8px 0 0; overflow-wrap: anywhere; }
.history-row .facts > div { padding: 4px 0; border: 0; }
.history-row a { display: inline-block; padding: 8px 0; text-decoration: underline; }
.history-row > * { min-width: 0; }
.log-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-block: 24px 16px; }
#log-poll-state, #log-collection { color: var(--muted); font-size: 14px; }
#log-collection { margin-block: 16px; }
.customer-logs { background: #142738; color: #e6eef5; border-radius: 12px; padding: 20px; max-height: 65vh; min-height: 240px; overflow: auto; overflow-wrap: anywhere; }
.log-record { padding: 12px 0; border-bottom: 1px solid #344858; }
.log-record:last-child { border-bottom: 0; }
.log-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; color: #b1c4d4; font-size: 13px; }
.log-meta a { color: #d8e9fb; text-decoration: underline; }
.log-record pre { margin: 8px 0 0; font: 14px/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.log-gap { color: #ffda9e; font-size: 14px; }
@media (max-width: 1250px) {
  .history-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .history-row { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px; }
  .customer-logs { padding: 14px; }
  .app-tabs { gap: 24px; }
}
.app-tabs a { border-radius: 0; }
.sidebar-bottom button { white-space: nowrap; }
.action-receipt { overflow-wrap: anywhere; }
.action-receipt .facts { max-width: 640px; margin-block: 20px; }
.action-receipt a { text-decoration: underline; }
#trigger-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
#trigger-form .trigger-option { grid-template-columns: 20px minmax(0, 1fr); }
#trigger-form .trigger-option input { width: 18px; height: 18px; margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#config-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
#config-form textarea { min-height: 72px; min-width: 0; width: 100%; margin: 0; resize: vertical; }
#config-form .deploy-config-row button { align-self: start; min-height: 44px; }

.code-version-row { display: grid; grid-template-columns: minmax(140px,1fr) minmax(160px,1fr) auto; gap: 24px; align-items: start; padding: 24px; border-bottom: 1px solid var(--line); }
.code-version-row:last-child { border-bottom: 0; }
.http-sample { margin-top: 24px; }
#http-sample-result:not(:empty) { margin-top: 24px; }
.detail-grid > .panel { align-self: start; }
.http-sample pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; font: 14px/1.6 var(--mono); padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.http-sample .sample-id { overflow-wrap: anywhere; }
#http-sample-progress:empty { display: none; }
.code-version-row h3, .code-version-row p { margin: 0 0 8px; }
.code-version-row > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 700px) { .code-version-row { grid-template-columns: 1fr; gap: 12px; padding: 20px; } }

.service-card { position: relative; padding-bottom: 60px; min-width: 0; }
.service-card h2, .service-card p { overflow-wrap: anywhere; }
.service-card h2 a:hover { text-decoration: underline; }
.service-card .service-updated { font-size: 14px; margin-top: 20px; }
.service-eye { position: absolute; right: 16px; bottom: 16px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; opacity: 0; }
.service-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.service-card:hover .service-eye, .service-card:focus-within .service-eye { opacity: 1; }
.service-eye:hover { background: var(--panel); }
#service-size-review:not(:empty) { margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; }
#service-template-description { margin-top: 12px; }
#service-create-form .help, #service-action-form .help { margin-top: 12px; font-size: 14px; color: var(--muted); }
#service-state p + p { margin-top: 20px; }
@media (hover: none) { .service-eye { opacity: 1; } }
@media (max-width: 760px) { .service-cards { grid-template-columns: minmax(0,1fr); } }

.connection-choice {margin:20px 0;padding-bottom:20px;border-bottom:1px solid var(--line)}
.connection-inputs {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:16px;align-items:end}
.connection-inputs input,.connection-inputs select {width:100%;min-width:0}
.connection-fields {list-style:none;padding:0;margin:16px 0 0;display:grid;gap:8px}
.connection-fields li {display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}
.connection-fields code {overflow-wrap:anywhere;font-size:0.9em}
.connection-fields span {color:var(--muted)}
.connection-observation {display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:20px 0;border-bottom:1px solid var(--line);align-items:start}
.connection-observation a {font-weight:600}
.connection-review {margin:20px 0}
@media(max-width:600px) {.connection-inputs {grid-template-columns:minmax(0,1fr) auto}.connection-inputs>div {grid-column:1}.connection-inputs>button {grid-column:2;grid-row:1}.connection-observation {grid-template-columns:1fr;gap:12px}}
#connections-form fieldset {border:0;padding:0;margin:0;min-width:0}
.connection-observation > div:first-child > a {display:inline-flex;align-items:center;min-height:32px}
.connection-observation > span {display:inline-flex;align-items:center;min-height:32px}
@media(max-width:600px) {.connection-fields li {display:grid;grid-template-columns:minmax(0,1fr);gap:2px}}
.app-state {display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.app-http-summary {font-size:13px;line-height:1.4}
.app-dependencies {color:var(--ink);line-height:1.7;overflow-wrap:anywhere}
.app-dependencies:hover {text-decoration:underline;text-underline-offset:3px}
.app-card {align-items:start}
.app-connections > :first-child {min-height:28px;line-height:28px}
.app-open {align-self:center}
.app-updated {padding-top:4px}
.https-choice {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:end;margin:20px 0}
.https-choice input {width:100%;min-width:0}
.https-origin {display:inline-flex;align-items:center;min-height:32px;overflow-wrap:anywhere;word-break:break-word}
.https-review {padding-left:20px;overflow-wrap:anywhere}
.https-review li {margin:12px 0}
.https-review code {font-size:.95em}
.https-unavailable {color:var(--muted);padding:16px;background:var(--foam);border-radius:8px}
.connection-observation > div {min-width:0}
.app-connections .https-count {font-size:14px;overflow-wrap:anywhere}

.usage-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.usage-toolbar label { margin: 0; }
.usage-toolbar select { width: auto; max-width: 100%; margin: 0; }
.usage-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-top: 24px; }
.usage-capacity h2 { font-size: 18px; }
.box .usage-value { font-size: 28px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; margin: 12px 0; }
.usage-value span { font-size: 16px; color: var(--muted); font-weight: 400; }
.usage-capacity meter { width: 100%; height: 12px; display: block; margin: 16px 0; }
.usage-capacity meter::-webkit-meter-bar { background: var(--foam); border: none; border-radius: 6px; }
.usage-capacity meter::-webkit-meter-optimum-value { background: var(--hull); }
.usage-capacity meter::-moz-meter-bar { background: var(--hull); }
.usage-measurements { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; margin-block: 24px; }
.usage-measurements article { min-width: 0; }
.usage-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.usage-table table { width: 100%; border-collapse: collapse; text-align: left; }
.usage-table th,.usage-table td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 15px; }
.usage-table thead { background: var(--foam); }
.usage-table tbody tr:last-child > * { border-bottom: 0; }
.usage-table a { text-decoration: underline; overflow-wrap: anywhere; }
@media(max-width:1100px) {
  .usage-table table,.usage-table tbody,.usage-table tr,.usage-table th,.usage-table td { display: block; }
  .usage-table thead { display: none; }
  .usage-table tbody tr { padding: 16px; border-bottom: 1px solid var(--line); }
  .usage-table tbody tr:last-child { border-bottom: 0; }
  .usage-table th,.usage-table td { padding: 8px 0; border: 0; }
  .usage-table td { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
  .usage-table td::before { content: attr(data-title); color: var(--muted); }
}
@media(max-width:600px) { .usage-grid,.usage-measurements { grid-template-columns: minmax(0,1fr); } }

.usage-history { margin-block: 32px; }
.usage-history .usage-table { margin-top: 20px; }
.usage-history th,.usage-history td { vertical-align: top; }
.usage-history > p:last-child { margin-top: 16px; }
.usage-history-amount { display: grid; gap: 8px; min-width: 120px; max-width: 280px; }
.usage-history-amount strong { font-weight: 500; font-variant-numeric: tabular-nums; }
.usage-history-amount .help { display: block; margin: 0; max-width: 24ch; }
.usage-history-bar { display: block; width: 100%; height: 4px; background: var(--foam); border-radius: 2px; fill: var(--hull); }
.usage-history td { font-variant-numeric: tabular-nums; }
@media(max-width:1100px) { .usage-history-amount { text-align: right; } }
.demo-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:12px;margin:16px 0}
.demo-options .box{margin:0;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.demo-options button{margin-top:auto}
.app-diagnostic { margin-top: 16px; }
.app-diagnostic p + p, .app-diagnostic details { margin-top: 10px; }
.diagnostic-links { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 12px; }
.diagnostic-links a { text-underline-offset: 4px; }
.members-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.members-heading h2 { margin: 0; }
.members-list { list-style: none; padding: 0; margin: 24px 0 0; }
.members-list li { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.members-list li > div { min-width: 0; }
.members-list .account-id { margin: 0; overflow-wrap: anywhere; }
.members-list .help { display: block; margin-top: 8px; }
.members-list p { margin: 8px 0 0; }
.members-list button { flex-shrink: 0; }
@media(max-width:600px) { .members-list li { align-items: flex-start; flex-direction: column; gap: 12px; } }

/* Shared console design tokens and components, adapted from apps-design.zip. */
@font-face { font-family: 'IBM Plex Sans'; src: url('/fonts/ibm-plex-sans.woff2') format('woff2'); font-weight: 100 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibm-plex-mono-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibm-plex-mono-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
:root { --sans: 'IBM Plex Sans', system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace; --ink: #14212d; --hull: #14212d; --foam: #f7f8fa; --line: #dce2e9; --control: #c5cdd6; --muted: #526477; --orange: #d23a05; --positive: #176b3b; --warning: #8a4b00; --surface: #fff; --chip: #eef1f5; --radius: 8px; font-family: var(--sans); font-size: 14px; background: var(--foam); color: var(--ink); }
body { line-height: 1.45; }
:focus-visible { outline: 2px solid #d23a05; outline-offset: 2px; }
.ui-icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
button, .button-link { min-height: 38px; padding: 7px 14px; border-radius: var(--radius); font-size: 14px; font-weight: 500; line-height: 22px; }
button { border-color: var(--line); }
button:hover { background: var(--chip); border-color: #c5cdd6; }
button:has(> .ui-icon), .button-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
button.primary:hover, button.accent:hover, .button-link:hover { background: #2b3d4d; }
button.small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
input, select, textarea { font-family: var(--sans); font-size: 14px; line-height: 22px; border-color: var(--line); padding: 8px 10px; border-radius: var(--radius); }
input:hover, select:hover, textarea:hover { border-color: #a9b6c4; }
textarea { min-height: 78px; }
label { font-weight: 500; }
.sidebar { width: 232px; padding: 20px 14px; background: var(--surface); border-color: #e6eaef; }
.sidebar .brand { padding: 0 4px; margin: 0 0 22px; }
.brand img { width: 176px; height: auto; display: block; }
.workspace-context { border: 0; padding: 0 8px 20px; margin: 0; }
.workspace-context label { margin: 14px 0 6px; font-size: 12px; font-weight: 500; }
.project-controls { gap: 6px; }
.project-controls select { height: 36px; padding: 6px 30px 6px 10px; font-size: 14px; border-radius: var(--radius); }
.project-controls button { width: 36px; flex-basis: 36px; height: 36px; min-height: 36px; border: 1px solid var(--line); border-radius: var(--radius); }
.project-controls svg { width: 16px; height: 16px; }
.sidebar nav { border-top: 1px solid #e6eaef; padding-top: 14px; gap: 2px; }
.sidebar nav a { min-height: 38px; padding: 8px 12px; font-size: 14px; font-weight: 500; color: #3a4a5c; }
.sidebar nav a.active { color: var(--orange); background: #ffefe6; }
.sidebar nav a:hover { background: var(--chip); color: var(--ink); }
.sidebar-bottom { padding: 24px 8px 0; }
.sidebar-bottom p { font-size: 12px; margin-bottom: 10px; }
.sidebar-bottom button { padding: 0; min-height: 30px; font-size: 13px; }
main { margin-left: 232px; padding: 28px 32px 32px; max-width: none; }
.page-head { align-items: flex-end; margin-bottom: 20px; gap: 16px; }
.page-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -.015em; line-height: 1.15; margin: 6px 0; }
.page-head p { font-size: 14px; }
.page-head .scope-breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.scope-breadcrumb strong { font-weight: 500; color: var(--ink); }
.page-actions { gap: 8px; flex-shrink: 0; }
.nav-label, .eyebrow { font-family: var(--sans); }
h2 { font-size: 22px; } h3 { font-size: 18px; }
.box, .auth-card, .history-list, .service-card, .project-strip, .section-error { background: var(--surface); border-color: var(--line); border-radius: 10px; }
.box { padding: 20px; margin-bottom: 20px; }
.box p { font-size: 14px; }
.facts > div { padding: 12px 0; border-color: #e6eaef; }
.app-tabs a { font-size: 14px; }
.status { background: transparent; color: var(--positive); padding: 2px 3px; font-size: 13px; gap: 7px; font-weight: 500; border-radius: 5px; }
.status::before { width: 7px; height: 7px; box-shadow: 0 0 0 3px #ddf3e5; }
.status.neutral { background: transparent; color: #5b6774; }
.status.neutral::before { background: #7a8794; box-shadow: 0 0 0 3px #e6eaef; }
.status.waiting { background: #fff1db; color: var(--warning); padding: 2px 7px; }
.status.waiting::before, .status.danger::before { box-shadow: none; }
.status.danger { background: #fbeaea; padding: 2px 7px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 2px 7px; border-radius: 5px; background: var(--chip); color: #3a4a5c; font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 18px; }
.chip .ui-icon { width: 12px; height: 12px; }
a.chip:hover { color: var(--ink); background: #e3e8ee; }
.chip-warning { color: var(--warning); background: #fff1db; }
.chip-more { background: var(--surface); border: 1px dashed #c5cdd6; padding: 1px 6px; }
.positive { color: var(--positive); } .warning { color: var(--warning); }
.segmented { display: inline-flex; align-items: center; padding: 2px; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.segmented button { border: 0; background: transparent; color: var(--muted); border-radius: 6px; min-height: 30px; padding: 4px 10px; font-size: 13px; line-height: 22px; white-space: nowrap; }
.segmented button[aria-pressed=true] { background: var(--hull); color: #fff; }
.segmented button:hover:not([aria-pressed=true]) { background: var(--chip); color: var(--ink); }
.filter-count { margin-left: 5px; opacity: .75; font-variant-numeric: tabular-nums; }
.summary-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.metric-card strong { font-size: 22px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric-card span { font-size: 12px; color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.apps-filters { justify-content: flex-start; gap: 10px; margin-bottom: 20px; }
.apps-filters form { flex: 1 1 230px; max-width: 360px; gap: 6px; }
.search-input { position: relative; flex: 1; min-width: 0; }
.search-input > .ui-icon { position: absolute; left: 10px; top: 12px; width: 14px; height: 14px; color: #7a8794; pointer-events: none; }
.search-input input { width: 100%; height: 38px; padding: 7px 10px 7px 32px; font-size: 14px; }
.search-submit { padding-inline: 10px; }
.apps-view .apps-table { border-radius: 12px 12px 0 0; background: #fff; overflow: auto; scroll-padding-top: 40px; }
.apps-view .app-columns, .apps-view .app-card { grid-template-columns: minmax(190px,1.2fr) minmax(176px,1fr) 64px minmax(104px,.7fr) minmax(250px,1.4fr) minmax(84px,.6fr) 36px; grid-template-rows: auto; gap: 16px; min-width: 1040px; padding: 10px 20px; align-items: center; }
.apps-view .app-columns { min-height: 40px; padding-block: 8px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; background: #f2f4f7; color: var(--muted); position: sticky; top: 0; z-index: 1; }
.apps-view .app-columns > span { display: block; }
.apps-view .app-card { min-height: 56px; border-color: #e6eaef; }
.apps-view .app-card > * { grid-column: auto; grid-row: auto; min-width: 0; }
.apps-view .app-identity { display: flex; align-items: center; gap: 10px; }
.apps-view .app-identity .app-icon { width: 30px; height: 30px; border: 0; border-radius: 7px; background: var(--chip); color: var(--muted); font: 12px var(--mono); grid-column: auto; grid-row: auto; }
.apps-view .app-name { display: block; font: 500 14px/1.45 var(--mono); letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apps-view .app-name:hover { color: var(--orange); }
.apps-view .app-triggers { display: flex; gap: 4px; flex-wrap: wrap; }
.apps-view .app-state { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.release-summary { display: flex; gap: 10px; align-items: center; }
.release-version { color: var(--muted); font: 12px var(--mono); white-space: nowrap; }
.apps-view .app-http-summary { font-size: 12px; }
.apps-view .app-connections { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px; line-height: 18px; }
.connection-name { max-width: 150px; font-family: var(--mono); }
.connection-name span { overflow: hidden; text-overflow: ellipsis; }
.apps-view .app-connections > .muted { font-size: 13px; }
.apps-view .app-updated { display: block; font-size: 13px; line-height: 20px; white-space: nowrap; }
.apps-view .app-open { width: 32px; min-height: 32px; border-radius: var(--radius); color: var(--muted); }
.apps-view .app-open:hover { color: var(--ink); background: var(--chip); }
.list-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 20px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; background: #fafbfc; font-size: 13px; color: var(--muted); }
.page-range { display: flex; gap: 4px; align-items: baseline; }
.page-range strong { color: var(--ink); font-weight: 500; }
.page-size { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; }
.list-footer .page-size, .list-footer .pagination-link { font-size: 13px; }
.page-size select { width: auto; margin: 0; height: 32px; padding: 3px 8px; font-size: 13px; }
.list-footer .pagination { margin: 0 0 0 auto; display: flex; gap: 6px; }
.pagination-link { border: 1px solid var(--line); background: #fff; padding: 5px 10px; border-radius: 7px; min-height: 32px; font-weight: 500; }
.pagination-link:hover { background: var(--chip); }
.observed { font-size: 13px; margin-top: 20px; color: var(--muted); }
.apps-empty { margin-bottom: 0; border-radius: 12px 12px 0 0; }
@media (min-width: 921px) {
  main.apps-view { display: flex; flex-direction: column; height: 100dvh; min-height: 0; }
  main.apps-view > * { flex-shrink: 0; }
  main.apps-view > .apps-table { flex: 0 1 auto; min-height: 96px; }
}
@media (max-width: 920px) {
  .sidebar { position: static; width: auto; padding: 16px 20px; }
  .sidebar .brand { margin-bottom: 0; }
  .workspace-context { display: grid; grid-template-columns: 70px minmax(0,1fr); padding: 16px 0; margin: 0; gap: 10px; }
  .workspace-context label { margin: 0; }
  .sidebar nav { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 4px; }
  .sidebar-bottom { padding: 10px 0 0; }
  .sidebar-bottom p { margin: 0; }
  main { margin: 0; padding: 24px 20px; }
  .apps-view .apps-table { max-height: 65vh; }
}
@media (max-width: 760px) {
  .page-head { align-items: flex-start; flex-wrap: wrap; }
  .page-actions { flex-wrap: wrap; }
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .metric-card:last-child { grid-column: 1 / -1; }
  .apps-filters form { max-width: none; width: 100%; flex-basis: 100%; }
  .segmented { flex-wrap: wrap; }
  .segmented button { min-height: 38px; }
  input, select, textarea { font-size: 16px; }
  .apps-view .apps-table { max-height: none; overflow: hidden; }
  .apps-view .app-columns { display: none; }
  .apps-view .app-card { min-width: 0; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 16px; }
  .apps-view .app-identity { grid-column: 1; grid-row: 1; }
  .apps-view .app-open { grid-column: 2; grid-row: 1; opacity: 1; pointer-events: auto; }
  .apps-view .app-triggers { grid-column: 1; grid-row: 2; }
  .apps-view .app-size { grid-column: 2; grid-row: 2; }
  .apps-view .app-state { grid-column: 1; grid-row: 3; }
  .apps-view .app-updated { grid-column: 2; grid-row: 3; }
  .apps-view .app-connections { grid-column: 1 / -1; grid-row: 4; }
  .list-footer { padding: 12px 16px; }
  .list-footer .pagination { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* Usage: the same shared type/color system with compact, grouped observations. */
.usage-view { --usage-bar: #3e5c7a; }
.usage-view .page-head { margin-bottom: 12px; }
.usage-view .page-actions { flex-wrap: wrap; }
.usage-view .usage-toolbar { gap: 8px; }
.usage-view .usage-toolbar label { font-size: 13px; color: var(--muted); font-weight: 400; }
.usage-view .usage-toolbar select { max-width: 250px; height: 38px; margin: 0; }
.usage-snapshot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; color: var(--muted); font-size: 13px; margin-bottom: 28px; }
button.usage-refresh { padding: 0; min-height: 24px; background: none; border: 0; color: var(--orange); font-size: 13px; }
button.usage-refresh:hover { text-decoration: underline; }
.usage-section { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.usage-section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.usage-view h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.usage-view h2 > span { margin-left: 6px; color: var(--muted); font-size: 14px; font-weight: 400; letter-spacing: 0; }
.usage-section-head > p { margin: 0; font-size: 13px; color: var(--muted); }
.usage-view h3 { margin: 0; font-size: 13px; font-weight: 500; color: #3a4a5c; }
.usage-view p { margin: 0; }
.usage-view .usage-snapshot { margin-bottom: 28px; }
.usage-view .usage-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 0; }
.usage-tile { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; }
.usage-label { display: flex; align-items: center; gap: 6px; }
.usage-view .usage-value { font-size: 26px; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; overflow-wrap: anywhere; }
.usage-view .usage-value > span { font-size: 14px; font-weight: 400; color: var(--muted); }
.usage-view .usage-foot { font-size: 12px; line-height: 1.55; color: var(--muted); }
.usage-view meter { display: block; width: 100%; height: 8px; margin: 0; border: 0; background: #e1e8ef; border-radius: 4px; }
.usage-view meter::-webkit-meter-bar { height: 8px; background: #e1e8ef; border: 0; border-radius: 4px; box-shadow: none; }
.usage-view meter::-webkit-meter-optimum-value { background: var(--usage-bar); border-radius: 4px; }
.usage-view meter::-moz-meter-bar { background: var(--usage-bar); border-radius: 4px; }
.usage-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface); font-size: 13px; color: var(--muted); }
.usage-card { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.usage-transfer { gap: 20px; }
.usage-transfer-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.usage-transfer-head span { flex-shrink: 0; }
.usage-hero { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.usage-hero strong { font-size: 44px; line-height: 1; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
.usage-hero > span { color: var(--muted); font-size: 16px; }
.usage-transfer > meter, .usage-transfer > meter::-webkit-meter-bar { height: 12px; border-radius: 6px; }
.usage-transfer-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; }
.usage-view .usage-subheading { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; margin-bottom: 4px; }
.usage-subheading > span { font-weight: 400; }
.usage-kv { margin: 0; }
.usage-kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 5px 0; font-size: 13px; color: var(--muted); }
.usage-kv dt { font-weight: 400; }
.usage-kv dd { margin: 0; font-weight: 500; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.usage-kv dd > span:not(.usage-coverage) { color: var(--muted); font-weight: 400; }
.usage-kv dd strong { font-weight: 500; }
.usage-total { border-top: 1px solid #e6eaef; padding-top: 5px; }
.usage-coverage-row { display: flex; flex-wrap: wrap; gap: 6px; }
.usage-coverage { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; border-radius: 5px; font-size: 11px; font-weight: 600; background: var(--chip); color: var(--muted); }
.usage-coverage.complete { color: var(--positive); background: #ddf3e5; }
.usage-coverage.partial { color: var(--warning); background: #fff1db; }
.usage-details { border-top: 1px solid #e6eaef; padding-top: 10px; margin: 0; }
.usage-details > summary { cursor: pointer; color: #3a4a5c; font-size: 13px; font-weight: 500; }
.usage-details > p { margin-top: 8px; font-size: 12px; line-height: 1.55; color: var(--muted); max-width: 88ch; }
.usage-info { font-size: 12px; font-weight: 400; margin: 0; }
.usage-info > summary { display: flex; align-items: center; justify-content: center; cursor: pointer; list-style: none; width: 16px; height: 16px; padding: 0; border: 1px solid #c5cdd6; border-radius: 50%; color: var(--muted); font-size: 10px; }
.usage-info > summary::-webkit-details-marker { display: none; }
.usage-info > p { position: absolute; z-index: 3; top: 42px; left: 12px; right: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 4px 16px #14212d18; color: var(--muted); }
.usage-view .usage-history { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.usage-view .usage-history .usage-table { margin-top: 0; }
.usage-view .usage-history > p:last-child { margin-top: 0; }
.usage-view .pagination { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.usage-view .pagination-link { font-size: 13px; }
.usage-view .usage-table { background: var(--surface); }
.usage-view .usage-table th, .usage-view .usage-table td { padding: 10px 14px; font-size: 13px; }
.usage-view .usage-table th { font-weight: 500; }
.usage-view .usage-table thead { background: #f2f4f7; }
.usage-view .usage-table thead th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
.usage-view .usage-table tfoot { background: #fafbfc; font-weight: 500; }
.usage-view .usage-table tfoot th, .usage-view .usage-table tfoot td { border-top: 1px solid var(--line); border-bottom: 0; }
.usage-view .usage-table a { text-decoration: none; }
.usage-view .usage-table a:hover { color: var(--orange); text-decoration: underline; }
.usage-bar { display: block; width: 100%; height: 6px; border-radius: 3px; background: #e1e8ef; fill: var(--usage-bar); }
.usage-view .usage-history-amount, .usage-project-amount { display: grid; grid-template-columns: auto minmax(36px,1fr); align-items: center; gap: 10px; max-width: none; min-width: 0; }
.usage-view .usage-history-amount .help { grid-column: 1 / -1; font-size: 12px; }
.usage-view .usage-history td { vertical-align: middle; }
.usage-view .usage-history th { white-space: nowrap; }
.usage-counter-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.usage-storage-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 28px; }
.usage-storage-grid h2 > span { font-size: 13px; }
@media(max-width:1200px) {
  .usage-view .usage-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .usage-transfer-columns { gap: 20px; }
}
@media(max-width:1100px) {
  .usage-view .usage-table tfoot { display: block; }
  .usage-view .usage-table th, .usage-view .usage-table td { padding: 6px 0; }
  .usage-view .usage-table tfoot tr { padding: 16px; }
  .usage-view .usage-table tfoot th, .usage-view .usage-table tfoot td { border: 0; }
  .usage-view .usage-history-amount { text-align: right; }
}
@media(max-width:760px) {
  .usage-counter-grid, .usage-transfer-columns, .usage-storage-grid { grid-template-columns: minmax(0,1fr); }
  .usage-view .page-actions { width: 100%; }
  .usage-view .usage-toolbar { flex: 1 1 100%; }
  .usage-view .usage-toolbar select { max-width: 100%; min-width: 0; flex: 1; }
  .usage-card { padding: 16px; }
}
@media(max-width:420px) {
  .usage-view .usage-grid { grid-template-columns: minmax(0,1fr); }
  .usage-hero strong { font-size: 36px; }
  .usage-transfer-head { flex-wrap: wrap; }
  .usage-kv > div { gap: 10px; flex-wrap: wrap; }
  .usage-kv dd { margin-left: auto; }
}
