:root {
  /* Brand palette from the SMC Living logo: orange #f5821f, grey #606060 */
  --bg: #f2f3f5;
  --bg-accent: #e7e9ec;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-soft: #f7f8f9;
  --ink: #2b2e31;
  --muted: #6b7177;
  --line: #d7dadd;
  --accent: #f5821f;
  --accent-deep: #d2690e;
  --amber: #b45309;
  --orange: #c2410c;
  --green: #15803d;
  --red: #b91c1c;
  --focus: #f7a24d;
  --shadow: 0 18px 34px rgba(43, 46, 49, 0.08);
  --radius: 8px;
  --radius-soft: 6px;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(245, 130, 31, 0.08), transparent 28%),
    linear-gradient(180deg, #fafafb 0%, var(--bg) 42%, #eff0f2 100%);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.login-shell,
.app-shell {
  min-height: 100vh;
}

.login-shell {
  padding: 32px 18px;
  display: grid;
  place-items: center;
}

.login-panel {
  width: min(520px, 100%);
  padding: 28px;
  border: 1px solid rgba(215, 218, 221, 0.92);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-brand {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 8px 0 20px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.login-logo {
  width: 200px;
  height: 54px;
  object-fit: contain;
}

.login-title {
  margin: 4px 0 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-tagline {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.login-credit {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-form {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.login-status {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  display: flex;
  align-items: center;
}

.login-status.success {
  border-color: #9de3cf;
  background: #ebfbf4;
  color: #0f5132;
}

.login-status.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.login-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.app-shell {
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(215, 218, 221, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  max-width: 760px;
}

.brand-mark {
  width: 172px;
  height: 46px;
  flex: 0 0 172px;
  object-fit: contain;
}

.brand-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.brand-subtitle,
.eyebrow,
label span,
.metric span,
.search span,
.side-title,
.system-pill span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.top-actions,
.form-actions,
.status-actions,
.worklist-toolbar,
.session-strip,
.scope-toggle,
.module-list {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.active-user-pill {
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}

.active-user-text {
  display: grid;
  gap: 2px;
}

.active-user-pill span {
  color: var(--muted);
  font-size: 12px;
}

.active-user-pill strong {
  font-size: 15px;
}

.avatar,
.avatar.avatar-initials {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.avatar.avatar-initials {
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.4px;
}

.avatar.avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 18px;
}

.avatar.avatar-xl {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.avatar-photo {
  cursor: pointer;
}

.avatar-photo:hover {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.chat-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 55;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--accent-deep);
  background: linear-gradient(135deg, var(--accent), #e06d10);
  color: #ffffff;
  font-size: 24px;
  box-shadow: 0 10px 24px rgba(43, 46, 49, 0.25);
}

.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 56;
  width: min(360px, calc(100vw - 40px));
  height: min(480px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(43, 46, 49, 0.28);
}

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-close {
  border: none;
  background: transparent;
  font-size: 20px;
  color: var(--muted);
  line-height: 1;
}

.chat-channel-select {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-soft);
  background: var(--panel-soft);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px;
}

.chat-message {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.chat-message.mine {
  flex-direction: row-reverse;
}

.chat-bubble {
  max-width: 80%;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.chat-message.mine .chat-bubble {
  background: #fef3e7;
  border-color: #f0c294;
}

.chat-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}

.chat-meta span {
  opacity: 0.8;
}

.chat-text {
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-empty {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 12px 0;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-input-row input[type="text"],
.chat-input-row input:not([type]) {
  flex: 1;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-soft);
  min-width: 0;
}

.chat-attach {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-soft);
  background: var(--panel-soft);
  font-size: 16px;
}

.chat-attach:hover {
  border-color: var(--accent);
}

.chat-image {
  display: block;
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  margin-top: 4px;
}

.chat-file {
  display: inline-block;
  margin-top: 4px;
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.chat-file:hover {
  text-decoration: underline;
}

.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 24, 33, 0.82);
  cursor: zoom-out;
}

.photo-viewer figure {
  display: grid;
  gap: 10px;
  justify-items: center;
  max-width: min(92vw, 640px);
}

.photo-viewer img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.photo-viewer figcaption {
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.photo-viewer.is-hidden {
  display: none;
}

.avatar.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.avatar.avatar-xs {
  width: 22px;
  height: 22px;
  font-size: 10px;
}

.avatar-slot {
  display: inline-flex;
  flex: 0 0 auto;
}

.session-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.session-user-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.user-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.session-roles {
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.imports-panel {
  margin: 14px 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(215, 218, 221, 0.92);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: var(--radius-soft);
  display: grid;
  gap: 12px;
}

.imports-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.imports-head h2 {
  margin: 0;
  font-size: 17px;
}

.imports-updated {
  color: var(--muted);
  font-size: 12px;
}

.imports-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.panel-subhead {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.doc-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.doc-filter {
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.doc-filter.active {
  background: var(--accent);
  border-color: var(--accent-deep);
  color: #ffffff;
}

.num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.imports-status.closed {
  background: #f1f2f3;
  color: var(--muted);
  border-color: var(--line);
}

.imports-metrics .metric em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

.imports-table-wrap {
  overflow-x: auto;
}

.imports-table {
  width: 100%;
  border-collapse: collapse;
}

.imports-empty {
  padding: 8px 2px;
  color: var(--muted);
  font-size: 13px;
}

.imports-status {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #fef3e7;
  color: var(--accent-deep);
  border: 1px solid #f0c294;
}

@media (max-width: 900px) {
  .imports-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

.assignee-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.server-state,
.button,
.status-filter,
.segment,
.status-button,
.assignee-filter,
.scope-button,
.module-pill,
.system-pill,
.active-user-pill,
.login-panel {
  border-radius: var(--radius-soft);
}

.server-state {
  height: 38px;
  min-width: 104px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
}

.server-state.online {
  border-color: #9de3cf;
  color: #0f5132;
  background: #ebfbf4;
}

.server-state.error {
  border-color: #fecaca;
  color: #991b1b;
  background: #fef2f2;
}

.button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(16, 32, 42, 0.04);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #e06d10 100%);
  color: #ffffff;
  border-color: var(--accent);
}

.button.secondary {
  background: #ffffff;
  border-color: var(--line);
}

.button:disabled {
  opacity: 0.55;
  cursor: default;
}

.button:hover,
.status-filter:hover,
.segment:hover,
.status-button:hover,
.assignee-filter:hover,
.scope-button:hover,
.archive-button:hover {
  filter: brightness(0.98);
}

.session-strip {
  padding: 14px 18px 0;
  display: grid;
  grid-template-columns: 1.05fr 1.15fr 1.3fr;
  align-items: stretch;
}

.session-card,
.metric,
.pipeline,
.worklist,
.detail-pane {
  border: 1px solid rgba(215, 218, 221, 0.92);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.session-card {
  min-height: 102px;
  padding: 14px 16px;
  display: grid;
  gap: 8px;
}

.session-card strong {
  font-size: 22px;
  line-height: 1.1;
}

.scope-toggle {
  flex-wrap: wrap;
}

.scope-button {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.scope-button.active {
  color: #ffffff;
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.scope-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.module-list {
  flex-wrap: wrap;
}

.module-pill {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
}

.module-pill.active {
  color: #ffffff;
  background: linear-gradient(135deg, #f5821f, #e06d10);
  border-color: #d2690e;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  padding: 14px 18px;
}

.metric {
  min-height: 92px;
  padding: 14px 16px;
  border-left: 5px solid var(--accent);
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
  line-height: 1;
}

.metric-request {
  border-left-color: var(--orange);
}

.metric-active {
  border-left-color: var(--amber);
}

.metric-done {
  border-left-color: var(--green);
}

.workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(560px, 1fr) minmax(420px, 500px);
  gap: 14px;
  padding: 0 18px 18px;
}

.pipeline,
.worklist,
.detail-pane {
  min-height: 0;
}

.pipeline {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-section {
  display: grid;
  gap: 8px;
}

.status-filter,
.assignee-filter {
  min-height: 46px;
  width: 100%;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  text-align: left;
}

.status-filter.active,
.assignee-filter.active {
  border-color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
}

.status-filter strong,
.assignee-filter strong {
  font-size: 18px;
}

.assignee-list {
  display: grid;
  gap: 8px;
}

.worklist {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.worklist-toolbar {
  min-height: 68px;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 250, 249, 0.88);
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, 98px);
  border: 1px solid var(--line);
  background: #ffffff;
  overflow: hidden;
}

.segment {
  height: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
}

.segment:last-child {
  border-right: 0;
}

.segment.active {
  color: #ffffff;
  background: var(--accent-deep);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search input {
  width: 260px;
}

.table-wrap,
.card-list {
  min-height: 0;
  position: relative;
  overflow: auto;
}

.jobs-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  table-layout: fixed;
}

.jobs-table th:nth-child(1),
.jobs-table td:nth-child(1) {
  width: 130px;
}

.jobs-table th:nth-child(2),
.jobs-table td:nth-child(2) {
  width: 180px;
}

.jobs-table th:nth-child(3),
.jobs-table td:nth-child(3) {
  width: 190px;
}

.jobs-table th:nth-child(4),
.jobs-table td:nth-child(4) {
  width: 150px;
}

.jobs-table th:nth-child(5),
.jobs-table td:nth-child(5) {
  width: 125px;
}

.jobs-table th:nth-child(6),
.jobs-table td:nth-child(6) {
  width: 150px;
}

.jobs-table th:nth-child(7),
.jobs-table td:nth-child(7) {
  width: 110px;
}

.jobs-table th:nth-child(8),
.jobs-table td:nth-child(8) {
  width: 120px;
}

.jobs-table th,
.jobs-table td {
  min-height: 42px;
  padding: 10px 10px;
  border-bottom: 1px solid #dce7e5;
  border-right: 1px solid #e3edeb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jobs-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #dce9e6;
  text-align: left;
  font-weight: 700;
}

.jobs-table tr {
  background: rgba(255, 255, 255, 0.92);
}

.jobs-table tr:nth-child(even) {
  background: #f7f8f9;
}

.jobs-table tr.selected {
  background: #fef3c7;
}

.jobs-table tr.overdue td {
  color: #7f1d1d;
}

.empty-state {
  display: none;
  margin: 34px auto;
  width: min(360px, calc(100% - 32px));
  padding: 22px;
  border: 1px dashed var(--line);
  background: var(--panel-soft);
  text-align: center;
}

.empty-state.show {
  display: grid;
  gap: 6px;
}

.status-chip,
.sync-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 12px;
}

.status-chip.DESIGN_PENDING {
  border-color: #7dd3fc;
  color: #075985;
  background: #ecfeff;
}

.status-chip.CHANGE_REQUESTED {
  border-color: #fed7aa;
  color: #9a3412;
  background: #fff7ed;
}

.status-chip.CHANGE_IN_DESIGN {
  border-color: #fcd34d;
  color: #854d0e;
  background: #fffbeb;
}

.status-chip.DESIGN_DONE,
.sync-ready {
  border-color: #86efac;
  color: #166534;
  background: #ecfdf5;
}

.sync-not-ready {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

.sync-sent {
  border-color: #bbf7d0;
  color: #15803d;
  background: #f0fdf4;
}

.sync-error {
  border-color: #fecaca;
  color: #991b1b;
  background: #fef2f2;
}

.card-list {
  display: none;
  padding: 12px;
  gap: 10px;
}

.job-card {
  padding: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  display: grid;
  gap: 10px;
}

.job-card.selected {
  border-color: var(--amber);
  background: #fffaf0;
}

.job-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.job-card-head strong {
  font-size: 18px;
  line-height: 1.2;
}

.job-card-head span,
.job-card-meta,
.job-card-grid label,
.auto-note {
  color: var(--muted);
}

.job-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.job-card-grid span {
  display: grid;
  gap: 3px;
}

.job-card-grid label {
  font-size: 11px;
  text-transform: uppercase;
}

.detail-pane {
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.job-form {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.form-head h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.form-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.archive-button {
  min-width: 88px;
}

.system-banner {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.system-pill {
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  display: grid;
  gap: 4px;
}

.system-pill strong {
  font-size: 15px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

label {
  display: grid;
  gap: 5px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  border-radius: var(--radius-soft);
}

input,
select {
  min-height: 40px;
  padding: 8px 10px;
}

textarea {
  min-height: 88px;
  padding: 10px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.wide-field {
  margin-top: 10px;
}

.auto-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px dashed #f0c294;
  background: #fef7ef;
  font-size: 13px;
}

.status-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 12px;
}

.status-button {
  min-height: 38px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.status-button.pending {
  border-color: #7dd3fc;
}

.status-button.request {
  border-color: #fed7aa;
}

.status-button.active {
  border-color: #fcd34d;
}

.status-button.done {
  border-color: #86efac;
}

.form-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.history {
  padding: 14px;
}

.history h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.history-item strong {
  display: block;
  font-size: 13px;
}

.history-item span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1440px) {
  .workspace {
    grid-template-columns: 210px minmax(460px, 1fr) minmax(360px, 440px);
  }
}

@media (max-width: 1180px) {
  .session-strip {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .pipeline {
    flex-direction: row;
    overflow-x: auto;
  }

  .side-section {
    min-width: 260px;
  }
}

@media (max-width: 820px) {
  .login-shell {
    padding: 18px 12px;
  }

  .login-panel {
    padding: 20px;
  }

  .topbar,
  .top-actions,
  .worklist-toolbar,
  .login-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search input {
    width: 100%;
  }

  .table-wrap {
    display: none;
  }

  .card-list {
    display: grid;
  }

  .system-banner,
  .field-grid,
  .status-actions {
    grid-template-columns: 1fr;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions .button,
  .top-actions .button,
  .top-actions .server-state,
  .top-actions .active-user-pill,
  .login-actions .button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .metrics {
    grid-template-columns: 1fr;
  }

  .scope-toggle {
    display: grid;
    grid-template-columns: 1fr;
  }

  .job-card-grid {
    grid-template-columns: 1fr;
  }

  .segmented {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

  .search {
    align-items: stretch;
    flex-direction: column;
  }
}
