/* Prototype-derived operations surfaces. No business state or synthetic facts. */
.cloud-shell {
  background: var(--bg);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.cloud-shell *, dialog * { scrollbar-color: #b8c5b3 #f2f5ef; scrollbar-width: thin; }
.cloud-shell ::selection, dialog ::selection { background: var(--sage); color: var(--primary-hover); }
.cloud-shell :is(input, textarea), dialog :is(input, textarea) { caret-color: var(--primary); }
.cloud-shell :is(button, a, summary):focus-visible, dialog :is(button, a, summary):focus-visible {
  outline: 3px solid #829f65;
  outline-offset: 3px;
}

/* The navigation is a persistent place, with one strong selected state. */
.cloud-nav { padding: 29px 15px 22px; }
.cloud-nav .cloud-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 32px; }
.cloud-nav .cloud-brand > .cloud-brand-mark {
  margin: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--sage);
  color: var(--primary-hover);
  flex: 0 0 auto;
}
.cloud-brand-mark svg { width: 23px; height: 23px; }
.cloud-brand-copy { min-width: 0; line-height: 1.2; }
.cloud-nav .cloud-brand-copy > span { margin-top: 7px; color: #c8d9c3; font-size: 11px; line-height: 1.5; }
.cloud-nav nav { gap: 7px; }
.cloud-nav nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 45px;
  padding: 11px 13px;
  border-radius: 8px;
  color: #d3e0d0;
  transition: background-color 160ms ease, color 160ms ease;
}
.cloud-nav nav a > span { min-width: 0; }
.cloud-shell .nav-icon { display: block; width: 19px; height: 19px; flex: 0 0 auto; opacity: .88; }
.cloud-nav nav a:hover { background: #2d5142; color: #fff; }
.cloud-nav nav a[aria-current="page"] { background: var(--sage); color: var(--primary-hover); font-weight: 650; }
.cloud-nav nav a[aria-current="page"] .nav-icon { opacity: 1; }
.cloud-nav footer { display: flex; align-items: start; gap: 9px; margin-top: auto; padding: 20px 10px 0; border-top: 1px solid #3d5f4c; line-height: 1.85; }

.cloud-nav footer small { display: block; font-size: 11px; color: #bfd0b9; margin-top: 4px; }
.cloud-nav-footmark { padding-top: 3px; }

/* Breadcrumbs and identity separate global context from the page task. */
.cloud-topbar { background: #fdfefb; min-height: 72px; height: auto; padding-block: 14px; }
.cloud-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.cloud-breadcrumb > svg { width: 13px; height: 13px; color: #82917e; }
.cloud-breadcrumb strong { color: var(--text); font-weight: 550; }
.cloud-user-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e6ecdf; color: var(--primary); font-size: 12px; font-weight: 650; }
.cloud-user-meta { min-width: 0; color: var(--text); font-size: 13px; line-height: 1.5; }
.cloud-user-meta > span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.cloud-user-meta strong { display: block; color: var(--text); font-size: 13px; font-weight: 550; }
.cloud-topbar [data-logout] { padding: 7px 11px; min-height: 34px; font-size: 12px; }
.cloud-main { padding-top: 32px; padding-bottom: 105px; }
.cloud-heading { align-items: center; margin-bottom: 28px; }
.cloud-heading h1 { font-size: 28px; font-weight: 650; line-height: 1.35; letter-spacing: -.025em; text-wrap: balance; }
.cloud-heading p { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.8; }
.cloud-heading #page-actions { flex-shrink: 0; }

/* Shared tools keep a stable rhythm across all operational modules. */
.cloud-shell button, dialog button { min-height: 39px; }
.cloud-shell :is(input, select, textarea), dialog :is(input, select, textarea) { border-color: #cfd8ca; }
.cloud-shell :is(input, select, textarea):focus, dialog :is(input, select, textarea):focus { border-color: #628060; }
.cloud-shell :is(input, textarea)::placeholder, dialog :is(input, textarea)::placeholder { color: #667568; opacity: 1; }
.cloud-shell :is(input[type="checkbox"], input[type="radio"]), dialog :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--primary); }
.cloud-filters { gap: 12px; margin-bottom: 24px; }
.cloud-filters label { gap: 7px; line-height: 1.5; }
.cloud-filters :is(input, select) { min-height: 41px; background: #fff; }
.cloud-field { gap: 8px; margin-bottom: 20px; }
.cloud-field small { font-size: 12px; line-height: 1.7; }
.cloud-tabs { gap: 27px; margin-bottom: 24px; }
.cloud-tabs button { padding: 12px 1px 13px; font-size: 14px; }
.cloud-tabs a { color: var(--muted); }
.cloud-tabs a.active, .cloud-tabs a[aria-current="page"] { color: var(--primary); }
.cloud-shell details > summary, dialog details > summary { color: var(--primary); min-height: 38px; line-height: 1.7; }
.cloud-panel { border-color: var(--line); }
.cloud-panel-body { padding: 23px 24px; }
.cloud-table { font-size: 13px; }
.cloud-table th { font-size: 12px; font-weight: 550; padding: 13px 18px; background: #f4f7ef; }
.cloud-table td { padding: 15px 18px; vertical-align: middle; }
.cloud-table tbody tr:last-child td { border-bottom: 0; }
.cloud-table td small { line-height: 1.65; }
.cloud-table tbody tr { transition: background-color 140ms ease; }
.cloud-pagination { min-height: 67px; padding: 15px 18px; background: #fdfefb; border-top: 1px solid var(--line); }
.cloud-notice { padding: 15px 18px; line-height: 1.8; }
.cloud-notice strong { font-weight: 600; }
.cloud-empty { padding: 58px 24px; }
.cloud-empty h2 { font-size: 19px; font-weight: 600; margin-bottom: 12px; }
.cloud-empty p { line-height: 1.85; }
.cloud-dialog-header { padding: 22px 26px; background: #fdfefb; }
.cloud-dialog-header h2 { font-size: 21px; line-height: 1.4; }
.cloud-dialog-body { padding: 26px; }
.cloud-dialog-footer { padding: 19px 26px; background: #f9fbf6; }
.cloud-details { gap: 21px 24px; }
.cloud-details dd { line-height: 1.75; }

/* Platform overview: two purposeful columns, followed by full-width ledgers. */
.overview-filters { padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.overview-ledger { padding: 19px 0 25px; gap: 12px 34px; }
.overview-ledger b { margin-left: 10px; font-size: 21px; font-weight: 600; }
.overview-ledger small { font-size: 12px; line-height: 1.7; }
.overview-top { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; gap: 22px; }
.overview-top > .owner-section { align-self: start; }
.owner-section { margin-bottom: 24px; }
.owner-panel-heading { background: #fdfefb; padding: 22px 24px 18px; }
.owner-panel-heading h2 { font-size: 17px; margin-bottom: 8px; }
.owner-panel-heading p { font-size: 12px; line-height: 1.75; }
.overview-todos { padding: 0 24px; }
.overview-todos li { padding-block: 17px; }
.overview-stages { margin-bottom: 18px; }
.overview-stages li { padding-block: 14px; align-items: center; }
.overview-stages b { font-size: 21px; font-weight: 600; }
.overview-queue { padding: 18px 24px; gap: 14px 24px; line-height: 1.8; }
.owner-link { gap: 6px; font-weight: 500; }

/* Customer overview is a work desk, not six unrelated full-width reports. */
.client-desk { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.client-desk > :is(form, .client-desk-scope, .cloud-notice) { grid-column: 1 / -1; margin: 0; }
.client-desk > form { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.client-desk-scope { font-size: 12px; line-height: 1.8; }
.client-desk-section { margin: 0; min-width: 0; }
.client-desk-section:first-of-type, .client-desk-section:last-of-type { grid-column: 1 / -1; }
.client-desk-section-heading { background: #fdfefb; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.client-desk-section-heading h2 { margin-bottom: 7px; font-size: 17px; }
.client-desk-section-heading p { font-size: 12px; line-height: 1.75; }
.client-desk-daily { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin-bottom: 20px; }
.client-desk-daily > div { min-width: 0; padding-inline: 18px; border-right: 1px solid var(--line); }
.client-desk-daily > div:first-child { padding-left: 0; }
.client-desk-daily > div:last-child { padding-right: 0; border-right: 0; }
.client-desk-daily dt { font-size: 12px; line-height: 1.7; }
.client-desk-daily dd { font-size: 27px; margin-top: 8px; line-height: 1.2; font-weight: 600; }
.client-desk-production { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 18px; margin-bottom: 22px; }
.client-desk-production > div { min-width: 0; }
.client-desk-production dt { font-size: 12px; line-height: 1.65; }
.client-desk-production dd { font-size: 23px; margin-top: 8px; line-height: 1.3; font-weight: 600; }
.client-desk-review { padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; }
.client-desk .cloud-table { white-space: normal; }
.client-desk .cloud-table td { min-width: 0; }
.client-desk .cloud-panel-body > :is(p, .cloud-actions) { margin-top: 14px; }
.client-desk .cloud-panel-body > p { font-size: 12px; line-height: 1.85; }
.client-desk .cloud-panel-body > p:first-child { margin-top: 0; }
.client-desk .client-desk-section-heading > p { margin-top: 7px; }

/* Production, matrix and device pages share readable embedded work surfaces. */
.production-panel, .matrix-workspace { padding: 24px; }
.production-tabs { gap: 26px; border-bottom: 1px solid var(--line); padding-bottom: 0; }
.production-tabs a { color: var(--muted); text-decoration: none; padding: 0 0 13px; border-bottom: 2px solid transparent; }
.production-tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.production-selection, .matrix-selection { padding-block: 17px; gap: 12px; }
.production-facts { padding-block: 20px; margin-block: 20px; border-block: 1px solid var(--line); gap: 22px 34px; }
.production-facts dt { font-size: 12px; color: var(--muted); }
.production-facts dd { font-size: 24px; margin-top: 8px; font-weight: 600; }
.cloud-steps { gap: 15px; margin-bottom: 28px; }
.cloud-steps li { padding-block: 13px; font-size: 13px; }
.output-catalog h2, .output-records h2 { font-size: 17px; }
.output-product { padding: 12px; gap: 12px; }
.output-product.is-selected { background: #edf3e5; border-color: #a8bc96; }
.device-tools .cloud-tabs { gap: 24px; }
.device-tools .cloud-tabs a { text-decoration: none; }

@media (min-width: 1550px) {
  .cloud-main { padding-top: 36px; }
  .cloud-heading { margin-bottom: 32px; }
}
@media (max-width: 1150px) {
  .cloud-main { padding-top: 27px; }
  .client-desk { grid-template-columns: minmax(0, 1fr); }
  .client-desk-section { grid-column: 1; }
  .client-desk-daily { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 0; }
  .client-desk-daily > div:nth-child(3) { border-right: 0; }
  .client-desk-daily > div:nth-child(4) { padding-left: 0; }
}
@media (max-width: 1050px) {
  .overview-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .cloud-nav { padding-top: 25px; }
  .cloud-nav .cloud-brand { padding-bottom: 27px; }
  .cloud-topbar { min-height: 64px; padding: 11px 16px; }
  .cloud-topbar > .cloud-actions { min-width: 0; flex-wrap: nowrap; gap: 9px; }
  .cloud-breadcrumb { gap: 5px; font-size: 12px; }
  .cloud-breadcrumb > span { display: none; }
  .cloud-user-avatar, .cloud-user-meta { display: none; }
  .cloud-main { padding-top: 25px; }
  .cloud-heading { align-items: start; margin-bottom: 23px; gap: 16px; }
  .cloud-heading h1 { font-size: 25px; }
  .cloud-heading p { font-size: 12px; line-height: 1.8; }
  .cloud-heading #page-actions { flex-shrink: 1; }
  .cloud-heading #page-actions:empty { display: none; }
  .cloud-filters { gap: 13px 11px; margin-bottom: 22px; }
  .cloud-tabs { gap: 23px; }
  .cloud-tabs button { font-size: 13px; }
  .cloud-panel-body { padding: 19px 18px; }
  .cloud-table th, .cloud-table td { padding: 13px 15px; }
  .cloud-pagination { padding: 14px; gap: 12px; }
  .cloud-pagination > .cloud-actions { width: 100%; gap: 7px; }
  .cloud-pagination label { min-width: 0; }
  .cloud-pagination select { max-width: 78px; }
  .cloud-notice { padding: 14px 15px; font-size: 12px; }
  .cloud-dialog-header { padding: 19px 18px; }
  .cloud-dialog-header h2 { font-size: 19px; }
  .cloud-dialog-body { padding: 20px 18px; }
  .cloud-dialog-footer { padding: 16px 18px; }
  .owner-panel-heading { padding: 19px 18px 16px; }
  .overview-todos { padding-inline: 18px; }
  .overview-ledger { gap: 13px 23px; }
  .overview-ledger b { font-size: 19px; }
  .overview-queue { padding-inline: 18px; }
  .client-desk { gap: 20px; }
  .client-desk-daily { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px 0; }
  .client-desk-daily > div { padding-inline: 16px; border-right: 1px solid var(--line); }
  .client-desk-daily > div:nth-child(odd) { padding-left: 0; }
  .client-desk-daily > div:nth-child(even) { border-right: 0; padding-right: 0; }
  .client-desk-daily dd { font-size: 25px; }
  .client-desk-production { gap: 22px 15px; }
  .client-desk-production dd { font-size: 21px; }
  .client-desk .cloud-table td { min-width: 115px; }
  .production-panel, .matrix-workspace { padding: 18px; }
  .production-tabs { gap: 22px; }
  .production-facts { gap: 20px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .cloud-nav nav a, .cloud-table tbody tr { transition: none; }
}
