:root {
  color-scheme: light;
  --ink: #20191d;
  --muted: #746a70;
  --line: #e7dfe3;
  --paper: #fffdfd;
  --wash: #f8f4f6;
  --brand: #b4004e;
  --brand-dark: #86003a;
  --shadow: 0 22px 70px rgba(66, 28, 45, 0.12);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--wash);
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(180, 0, 78, .2);
  outline-offset: 2px;
}
body.modal-open { overflow: hidden; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 316px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  padding: 34px 24px 24px;
  display: flex;
  flex-direction: column;
  background: #241b20;
  color: #fff;
}

.brand-block { display: flex; align-items: center; gap: 14px; margin-bottom: 42px; }
.brand-block h1 { margin: 2px 0 0; font-size: 20px; letter-spacing: 0.16em; }
.brand-block .eyebrow { color: #c9b9c1; }

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, #d0005a, #86003a);
  color: #fff;
  font: 700 27px/1 Georgia, serif;
  box-shadow: 0 12px 30px rgba(180, 0, 78, 0.28);
}
.brand-mark.small { width: 48px; height: 48px; border-radius: 15px; font-size: 23px; }

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-label { margin: 0 10px 14px; color: #bfaeb7; font-size: 12px; }
.agent-list { display: grid; gap: 8px; }

.agent-button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #f8f4f6;
  background: transparent;
  transition: 160ms ease;
}
.agent-button:hover { background: rgba(255, 255, 255, 0.065); }
.agent-button.active { background: rgba(255, 255, 255, 0.11); border-color: rgba(255,255,255,.10); }
.agent-button:disabled { cursor: wait; opacity: .65; }
.agent-button strong, .agent-button small { display: block; }
.agent-button strong { font-size: 14px; margin-bottom: 3px; }
.agent-button small { color: #bfaeb7; font-size: 11px; }
.reports-label { margin-top: 28px; }
.report-link { text-decoration: none; }
.report-mark { flex: 0 0 39px; width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: rgba(180, 0, 78, .65); font-size: 20px; }

.avatar, .empty-avatar {
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}
.plum .avatar, .empty-avatar.plum { background: #8c3f70; }
.rose .avatar, .empty-avatar.rose { background: #c4526e; }
.sage .avatar, .empty-avatar.sage { background: #5d826d; }
.amber .avatar, .empty-avatar.amber { background: #b47731; }
.blue .avatar, .empty-avatar.blue { background: #4776a8; }
.violet .avatar, .empty-avatar.violet { background: #7354a8; }

.sidebar-footer { margin-top: auto; padding: 20px 10px 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-footer p { margin: 0 0 8px; color: #aa99a2; font-size: 11px; }
.link-button { padding: 0; border: 0; color: #fff; background: none; font-size: 12px; text-decoration: underline; }

.workspace { min-width: 0; min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; background: var(--paper); }
.workspace-header { padding: 28px 38px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.workspace-header h2 { margin: 4px 0 0; font: 600 30px/1.15 Georgia, serif; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.secondary-button { border: 1px solid var(--line); border-radius: 12px; padding: 9px 13px; color: var(--muted); background: #fff; }
.secondary-button:hover { border-color: #cabdc4; color: var(--ink); }
.secondary-button:disabled { cursor: wait; opacity: .55; }
.connection-button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 13px; color: var(--ink); background: #fff; }
.connection-button:hover { border-color: #cabdc4; }
.supply-button {
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px 8px 13px;
  color: var(--ink);
  background: #fff;
}
.supply-button:hover { border-color: #cabdc4; }
.supply-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  font-size: 11px;
  font-weight: 800;
}
.supply-badge[data-tone="progress"] { background: #766770; }
.supply-badge[hidden] { display: none; }
.connection-dot { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #a99fa4; box-shadow: 0 0 0 4px rgba(169,159,164,.13); }
.connection-dot.connected { background: #2d9160; box-shadow: 0 0 0 4px rgba(45,145,96,.13); }
.connection-dot.warning { background: #ca8124; box-shadow: 0 0 0 4px rgba(202,129,36,.13); }
.connection-dot.error { background: #c33d59; box-shadow: 0 0 0 4px rgba(195,61,89,.13); }

.messages { min-height: 0; padding: 36px max(32px, calc((100% - 860px) / 2)); overflow-y: auto; }
.message { max-width: 82%; margin-bottom: 26px; }
.message.user { margin-left: auto; }
.message-label { display: block; margin: 0 8px 7px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.message.user .message-label { text-align: right; }
.message-body { padding: 15px 18px; border: 1px solid var(--line); border-radius: 4px 18px 18px 18px; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; box-shadow: 0 8px 25px rgba(66,28,45,.045); }
.message.user .message-body { border: 0; border-radius: 18px 4px 18px 18px; color: #fff; background: var(--brand); }
.message.pending .message-body { color: var(--muted); animation: breathe 1.5s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .48; } }

.empty-state { height: 100%; min-height: 320px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.empty-avatar { width: 58px; height: 58px; border-radius: 19px; margin-bottom: 18px; font-size: 20px; }
.empty-state h3 { margin: 0 0 7px; color: var(--ink); font: 600 23px/1.2 Georgia, serif; }
.empty-state p { margin: 0; max-width: 390px; line-height: 1.5; }

.composer { margin: 0 max(32px, calc((100% - 860px) / 2)) 28px; border: 1px solid #d9ced4; border-radius: 18px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.composer textarea { width: 100%; min-height: 88px; padding: 17px 18px; border: 0; outline: 0; resize: vertical; color: var(--ink); background: transparent; line-height: 1.45; }
.composer-footer { padding: 10px 11px 10px 17px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid #f0e9ec; }
.status { color: var(--muted); font-size: 11px; }
.composer button, .login-card button { border: 0; border-radius: 11px; padding: 10px 18px; color: #fff; background: var(--brand); font-weight: 700; }
.composer button:hover, .login-card button:hover { background: var(--brand-dark); }
.composer button:disabled { cursor: wait; opacity: .55; }

.login-body { display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #fff 0, #f6edf1 34%, #eee4e9 100%); }
.login-shell { width: min(100%, 440px); }
.login-card { padding: 42px; border: 1px solid rgba(134,0,58,.09); border-radius: 28px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.login-card .brand-mark { margin-bottom: 28px; }
.login-card h1 { margin: 5px 0 10px; font: 600 34px/1.1 Georgia, serif; }
.login-copy { margin: 0 0 27px; color: var(--muted); line-height: 1.5; }
.login-card form { display: grid; gap: 17px; }
.login-card label span { display: block; margin: 0 0 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.login-card input { width: 100%; border: 1px solid #d9ced4; border-radius: 12px; padding: 12px 13px; outline: 0; background: #fff; }
.login-card input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(180,0,78,.09); }
.login-card button { margin-top: 3px; padding: 12px; }
.login-error { margin: 0 0 18px; padding: 11px 13px; border-radius: 10px; color: #8b1539; background: #fae6ec; font-size: 12px; }
.security-note { margin: 22px 0 0; color: #93868d; font-size: 11px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; justify-items: end; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(30,20,25,.42); backdrop-filter: blur(3px); }
.connection-panel { position: relative; width: min(100%, 510px); height: 100%; padding: 34px; overflow-y: auto; background: var(--paper); box-shadow: -24px 0 70px rgba(45,22,32,.2); animation: panel-in 180ms ease-out; }
@keyframes panel-in { from { transform: translateX(30px); opacity: .65; } }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 5px 0 0; font: 600 27px/1.15 Georgia, serif; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: #fff; font-size: 22px; line-height: 1; }
.connection-summary { margin: 26px 0; padding: 18px; display: flex; align-items: flex-start; gap: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.connection-summary .connection-dot { margin-top: 5px; }
.connection-summary strong { display: block; margin-bottom: 5px; }
.connection-summary p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.report-list { display: grid; gap: 9px; }
.report-row { padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.report-row strong, .report-row span { display: block; }
.report-row strong { margin-bottom: 3px; font-size: 13px; }
.report-row span { color: var(--muted); font-size: 11px; }
.report-badge { flex: 0 0 auto; border-radius: 999px; padding: 5px 8px; font-weight: 700; }
.report-badge.ready { color: #287a52; background: #e8f5ee; }
.report-badge.missing { color: #8a606b; background: #f5eaee; }
.connection-note { margin: 20px 2px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.panel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.panel-actions button { border: 0; border-radius: 12px; padding: 11px 13px; color: #fff; background: var(--brand); font-weight: 700; }
.panel-actions button:first-child { grid-column: 1 / -1; }
.panel-actions button.secondary-button { border: 1px solid var(--line); color: var(--muted); background: #fff; }
.panel-actions button:disabled { cursor: wait; opacity: .55; }
.login-link { margin-top: 16px; display: block; border-radius: 12px; padding: 12px; text-align: center; color: var(--brand); background: #f8e9ef; font-size: 13px; font-weight: 750; text-decoration: none; }
.login-link[hidden] { display: none; }

.supply-panel {
  position: relative;
  width: min(100%, 940px);
  height: 100%;
  overflow-y: auto;
  background: var(--paper);
  box-shadow: -24px 0 70px rgba(45,22,32,.2);
  animation: panel-in 180ms ease-out;
}
.supply-panel-header { padding: 30px 34px 24px; }
.supply-panel-header > div { max-width: 690px; }
.supply-panel-header > div > p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.supply-preview-form {
  padding: 20px 34px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px auto;
  align-items: end;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbf8f9;
}
.form-field label {
  display: block;
  margin: 0 0 7px;
  color: #51474c;
  font-size: 12px;
  font-weight: 750;
}
.form-field input {
  width: 100%;
  height: 42px;
  border: 1px solid #d5c9cf;
  border-radius: 11px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  outline: 0;
}
.form-field input::placeholder { color: #746a70; }
.form-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(180,0,78,.09); }
.primary-button {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  padding: 10px 17px;
  color: #fff;
  background: var(--brand);
  font-weight: 750;
}
.primary-button:hover { background: var(--brand-dark); }
.primary-button:disabled { cursor: wait; opacity: .55; }
.column-map {
  grid-column: 1 / 3;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.sheet-share-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.sheet-share-note span { color: var(--ink); }
.column-map strong {
  display: inline-block;
  min-width: 25px;
  margin-right: 3px;
  border-radius: 5px;
  padding: 2px 5px;
  color: var(--brand-dark);
  background: #f6e5ec;
  text-align: center;
}
.column-map span { margin: 0 7px; color: #a4969d; }
.form-status {
  grid-column: 1 / -1;
  min-height: 16px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.supply-workspace {
  min-height: 470px;
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
}
.operation-sidebar {
  padding: 22px 14px;
  border-right: 1px solid var(--line);
  background: #fbf8f9;
}
.operation-list-header {
  margin: 0 5px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.operation-list-header h3 {
  margin: 0;
  font-size: 13px;
}
.text-button {
  border: 0;
  padding: 3px;
  color: var(--brand);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}
.text-button:disabled { cursor: wait; color: #9b9095; }
.operation-clear-button {
  width: calc(100% - 10px);
  min-height: 44px;
  margin: 0 5px 6px;
  border-radius: 8px;
  padding: 7px 8px;
  color: #971f43;
  text-align: left;
}
.operation-clear-button:not(:disabled):hover,
.operation-clear-button:not(:disabled):focus-visible { background: #fae6ec; }
.operation-clear-button:disabled { cursor: default; color: #9b9095; }
.operation-clear-button[aria-busy="true"] { cursor: wait; }
.operation-list-status {
  min-height: 14px;
  margin: 0 5px 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.operation-list-status[data-tone="error"] { color: #a32148; }
.operation-list-status[data-tone="success"] { color: #1d6945; }
.operation-list { display: grid; gap: 7px; }
.operation-list-empty {
  margin: 20px 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.operation-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}
.operation-item:hover { background: #fff; }
.operation-item.active { border-color: #dbcbd2; background: #fff; }
.operation-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.operation-item strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.operation-item-meta {
  margin-top: 6px;
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.state-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 7px;
  color: #62575d;
  background: #eee8eb;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}
.state-badge.large { padding: 6px 9px; font-size: 10px; }
.state-badge.success { color: #1d6d47; background: #e3f2e9; }
.state-badge.warning { color: #825111; background: #faedcf; }
.state-badge.error { color: #971f43; background: #f9e2e9; }
.state-badge.progress { color: #375d81; background: #e5eef7; }

.operation-detail { min-width: 0; padding: 27px 30px 34px; }
.operation-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.operation-detail-header h3 {
  margin: 3px 0 0;
  font: 600 23px/1.2 Georgia, serif;
  text-wrap: balance;
}
.operation-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.operation-message {
  margin: 17px 0 20px;
  border-radius: 10px;
  padding: 11px 13px;
  color: #51474c;
  background: #f3eef0;
  font-size: 12px;
  line-height: 1.45;
}
.operation-message.success { color: #1d6945; background: #e9f5ee; }
.operation-message.warning { color: #774c14; background: #fbefd5; }
.operation-message.error { color: #8d1c3d; background: #fae6ec; }
.operation-message.progress { color: #315878; background: #eaf1f7; }
.operation-empty {
  min-height: 380px;
  display: grid;
  place-content: center;
  text-align: center;
}
.operation-empty h3 { margin: 0 0 8px; font: 600 21px/1.2 Georgia, serif; }
.operation-empty p { max-width: 430px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.operation-waiting {
  min-height: 250px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}
.operation-waiting p { max-width: 420px; margin: 15px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.loading-indicator {
  width: 28px;
  height: 28px;
  border: 3px solid #eadce2;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.operation-facts {
  margin: 0 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 22px;
}
.operation-fact { min-width: 0; }
.operation-fact dt { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.operation-fact dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 650; }
.supply-metrics {
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.supply-metric {
  min-width: 0;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.supply-metric:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.supply-metric:nth-last-child(-n + 3) { border-bottom: 0; }
.supply-metric span { color: var(--muted); font-size: 10px; }
.supply-metric strong { font-size: 14px; }
.supply-metric.accent strong { color: var(--brand-dark); }
.supply-metric.danger strong { color: #a12346; }
.quantity-summary { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.quantity-summary strong { color: var(--ink); }
.preview-warnings {
  margin: 0 0 20px;
  border-radius: 10px;
  padding: 11px 13px 11px 30px;
  color: #6d4b1e;
  background: #fbf0db;
  font-size: 11px;
  line-height: 1.45;
}
.preview-warnings li + li { margin-top: 4px; }

.operation-section { margin-top: 23px; }
.operation-section h4 { margin: 0 0 9px; font-size: 12px; }
.change-table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
.change-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.change-table th {
  padding: 8px 9px;
  color: var(--muted);
  background: #f8f4f6;
  font-size: 9px;
  text-align: left;
  white-space: nowrap;
}
.change-table td { padding: 9px; border-top: 1px solid #eee7ea; vertical-align: top; }
.change-table tbody tr:first-child td { border-top: 0; }
.sku-cell { color: var(--brand-dark); font-weight: 750; white-space: nowrap; }
.name-cell { min-width: 180px; }
.number-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.after-cell { font-weight: 800; }
.delta-cell { color: #24734c; }
.delta-cell.negative { color: #a12346; }
.issue-section {
  border-radius: 10px;
  padding: 12px 14px;
  background: #f4eff1;
}
.issue-section.error { color: #811b3a; background: #fae7ed; }
.issue-list { margin: 0; padding-left: 18px; font-size: 11px; line-height: 1.5; }
.issue-list li + li { margin-top: 4px; }
.noop-details { margin-top: 20px; color: var(--muted); font-size: 11px; }
.noop-details summary { width: fit-content; color: var(--ink); cursor: pointer; font-weight: 700; }
.noop-details .operation-section { margin-top: 10px; }
.apply-result {
  margin-top: 22px;
  border-radius: 11px;
  padding: 14px;
  color: #1d6945;
  background: #e9f5ee;
}
.apply-result strong { font-size: 12px; }
.apply-result p { margin: 5px 0 0; font-size: 11px; line-height: 1.45; }
.confirmation-bar {
  margin-top: 24px;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
}
.confirmation-bar strong { font-size: 12px; }
.confirmation-bar p { max-width: 480px; margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.confirmation-bar .primary-button { flex: 0 0 auto; }
.supply-safety-note {
  margin: 0;
  padding: 16px 34px 20px 269px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fbf8f9;
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { min-height: auto; padding: 18px; }
  .brand-block { margin-bottom: 18px; }
  .agent-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .agent-button { padding: 9px; }
  .agent-button small { display: none; }
  .sidebar-footer { display: none; }
  .workspace { min-height: calc(100vh - 236px); }
  .workspace-header { padding: 20px; }
  .workspace-header h2 { font-size: 25px; }
  .messages { padding: 24px 17px; }
  .message { max-width: 92%; }
  .composer { margin: 0 14px 14px; }
  .status { display: none; }
  .header-actions { align-items: flex-end; flex-direction: column; }
  .connection-button { font-size: 11px; }
  .connection-panel { padding: 26px 20px; }
  .supply-button { font-size: 11px; }
  .supply-panel-header { padding: 24px 20px 20px; }
  .supply-preview-form { padding: 18px 20px; grid-template-columns: 1fr 120px; }
  .supply-preview-form .primary-button { grid-column: 1 / -1; }
  .column-map { grid-column: 1 / -1; }
  .supply-workspace { display: block; }
  .operation-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .operation-list { grid-auto-flow: column; grid-auto-columns: 220px; overflow-x: auto; padding-bottom: 3px; }
  .operation-detail { padding: 24px 20px 30px; }
  .supply-safety-note { padding: 15px 20px 20px; }
}

@media (max-width: 480px) {
  .agent-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-card { padding: 30px 24px; }
  .secondary-button { font-size: 11px; }
  .supply-preview-form { grid-template-columns: 1fr; }
  .supply-claim-field, .supply-preview-form .primary-button, .column-map, .form-status { grid-column: 1; }
  .operation-facts { grid-template-columns: 1fr; }
  .supply-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supply-metric { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .supply-metric:nth-child(odd) { border-right: 1px solid var(--line) !important; }
  .supply-metric:nth-last-child(-n + 2) { border-bottom: 0 !important; }
  .operation-detail-header { display: grid; }
  .confirmation-bar { align-items: stretch; flex-direction: column; }
  .confirmation-bar .primary-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .connection-panel, .supply-panel { animation: none; }
  .loading-indicator, .message.pending .message-body { animation: none; }
}
