:root {
  color-scheme: light;
  --canvas: #ececea;
  --surface: #f8f8f5;
  --surface-raised: #ffffff;
  --surface-subtle: #e4e4e1;
  --ink: #181a1a;
  --ink-soft: #555a5a;
  --line: #cfd1cf;
  --line-strong: #9da19f;
  --carbon: #121414;
  --graphite: #1d2020;
  --steel: #7e8583;
  --fire: #ed5b1a;
  --success: #23784b;
  --success-bg: #deefe5;
  --warning: #986000;
  --warning-bg: #fff0cf;
  --danger: #b42d2d;
  --danger-bg: #f7dddd;
  --info: #245f91;
  --info-bg: #dfeaf4;
  --inactive: #626867;
  --radius-sm: 4px;
  --radius: 6px;
  --shadow: 0 8px 24px rgb(20 23 22 / 7%);
  font-family:
    Inter,
    Aptos,
    'Segoe UI',
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
html {
  min-width: 320px;
  background: var(--carbon);
}
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 32%) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--canvas);
}
button,
input,
select,
textarea {
  min-height: 44px;
  font: inherit;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid var(--carbon);
  border-radius: var(--radius-sm);
  padding: 0.68rem 0.95rem;
  background: var(--carbon);
  color: #fff;
  font-weight: 720;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}
button:hover:not(:disabled) {
  border-color: #2d3030;
  background: #2d3030;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button.secondary {
  border-color: var(--line);
  background: var(--surface-raised);
  color: var(--ink);
}
button.secondary:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}
button.danger {
  border-color: var(--danger);
  background: var(--danger);
}
button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgb(237 91 26 / 38%);
  outline-offset: 2px;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  letter-spacing: -0.035em;
}
h1 {
  margin-bottom: 0.32rem;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  line-height: 1.08;
}
h2 {
  font-size: 1.18rem;
}
.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
}
.shell {
  min-height: 100vh;
}
.side {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: 232px;
  flex-direction: column;
  padding: 1.35rem 0.9rem;
  overflow-y: auto;
  border-right: 1px solid #333737;
  background: radial-gradient(circle at 0 0, rgb(142 39 17 / 18%), transparent 34%), var(--carbon);
  color: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.4rem;
  font-size: 1.12rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 26%);
  border-bottom-color: var(--fire);
  border-radius: var(--radius-sm);
  background: #202323;
  color: #fff;
  letter-spacing: -0.06em;
}
.brand small {
  display: block;
  margin-top: 0.12rem;
  color: #989e9c;
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.11em;
}
.nav {
  display: grid;
  gap: 0.15rem;
}
.nav button {
  position: relative;
  justify-content: flex-start;
  min-height: 46px;
  border-color: transparent;
  padding-inline: 0.75rem;
  background: transparent;
  color: #b9bfbd;
  font-size: 0.92rem;
  font-weight: 630;
}
.nav button:hover:not(:disabled) {
  border-color: #343838;
  background: #202323;
  color: #fff;
}
.nav button.active {
  border-color: #3a3e3d;
  background: #262929;
  color: #fff;
}
.nav button.active::before {
  position: absolute;
  inset: 9px auto 9px -0.9rem;
  width: 3px;
  background: var(--fire);
  content: '';
}
.side-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding: 1.1rem 0.7rem 0.2rem;
  color: #858c89;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.side-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgb(35 120 75 / 14%);
}
.main {
  width: min(calc(100% - 232px), 1480px);
  min-height: 100vh;
  margin-left: 232px;
  padding: 2rem clamp(1.4rem, 3vw, 3rem) 3rem;
}
.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.top p,
.muted {
  margin-bottom: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}
.eyebrow {
  display: block;
  margin-bottom: 0.42rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.icon-button .icon {
  width: 1.05rem;
  height: 1.05rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 0.9rem;
}
.card {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}
.card h2,
.card h3 {
  margin-bottom: 0.8rem;
}
.metric {
  margin: 0.28rem 0;
  font-size: 2rem;
  font-weight: 820;
  line-height: 1;
  letter-spacing: -0.05em;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  border: 1px solid #c5c9c7;
  border-radius: 3px;
  padding: 0.24rem 0.48rem;
  background: #e7e9e8;
  color: var(--inactive);
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}
.badge.success {
  border-color: #a9d1ba;
  background: var(--success-bg);
  color: var(--success);
}
.badge.warning {
  border-color: #ead092;
  background: var(--warning-bg);
  color: var(--warning);
}
.badge.danger {
  border-color: #e0aaaa;
  background: var(--danger-bg);
  color: var(--danger);
}
.ops-hero {
  position: relative;
  isolation: isolate;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid #323635;
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2rem);
  background:
    radial-gradient(circle at 96% 0, rgb(237 91 26 / 17%), transparent 30%),
    linear-gradient(120deg, #111313 0%, #1b1e1e 68%, #241611 100%);
  color: #fff;
  box-shadow: 0 16px 34px rgb(17 19 19 / 15%);
}
.ops-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.16;
  background-image: linear-gradient(90deg, rgb(255 255 255 / 10%) 1px, transparent 1px);
  background-size: 42px 100%;
  content: '';
}
.ops-context {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgb(255 255 255 / 13%);
}
.ops-context .eyebrow,
.situation .eyebrow {
  color: #9da3a1;
}
.ops-context h2 {
  margin: 0;
  font-size: 0.94rem;
  letter-spacing: 0.08em;
}
.mode-signal {
  width: 10px;
  height: 30px;
  border-radius: 2px;
  background: var(--fire);
  box-shadow: 0 0 22px rgb(237 91 26 / 44%);
}
.mode-management .mode-signal,
.mode-closed .mode-signal {
  background: #777e7b;
  box-shadow: none;
}
.mode-prep .mode-signal,
.mode-closing .mode-signal {
  background: #e0a126;
  box-shadow: 0 0 20px rgb(224 161 38 / 25%);
}
.mode-time {
  margin-left: auto;
  color: #aeb4b2;
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
}
.situation {
  max-width: 820px;
  padding: clamp(1.4rem, 4vw, 2.3rem) 0 1.4rem;
}
.situation p {
  margin: 0;
  font-size: clamp(1.35rem, 3.1vw, 2.35rem);
  font-weight: 690;
  line-height: 1.14;
  letter-spacing: -0.035em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.hero-actions > button:first-child {
  border-color: var(--fire);
  background: var(--fire);
  color: #fff;
}
.hero-actions > button:first-child:hover:not(:disabled) {
  border-color: #ff6b27;
  background: #ff6b27;
}
.dark-secondary {
  border-color: #454a48;
  background: #242727;
  color: #fff;
}
.ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 1rem;
}
.work-stack,
.pulse-panel,
.module-directory {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}
.section-heading h2,
.module-directory h2 {
  margin-bottom: 0;
}
.count {
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 800;
}
.action-list {
  border-top: 1px solid var(--line);
}
.action-row {
  display: grid;
  width: 100%;
  grid-template-columns: 32px 1fr auto;
  gap: 0.75rem;
  min-height: 72px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.85rem 0.25rem;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.action-row:hover:not(:disabled) {
  border-color: var(--line);
  background: #f1f1ee;
}
.action-row.primary-row {
  box-shadow: inset 3px 0 var(--fire);
}
.action-row strong,
.directory-item strong {
  display: block;
  margin-bottom: 0.22rem;
  font-size: 0.98rem;
}
.action-row small,
.directory-item small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
}
.action-index {
  color: var(--steel);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}
.arrow {
  color: var(--fire);
  font-size: 1.1rem;
}
.pulse-panel {
  background: #dadcda;
}
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #bfc3c0;
  background: #bfc3c0;
}
.pulse-grid button {
  display: flex;
  min-height: 116px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  border: 0;
  border-radius: 0;
  padding: 0.9rem;
  background: #f5f5f2;
  color: var(--ink);
  text-align: left;
}
.pulse-grid button:hover:not(:disabled) {
  background: #fff;
}
.pulse-grid span,
.pulse-grid small {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 600;
}
.pulse-grid strong {
  font-size: 1.8rem;
  line-height: 1;
}
.pulse-grid .metric-word {
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.toolbar,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.toolbar input,
.toolbar select,
.form input,
.form select,
.form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.66rem 0.72rem;
  background: #fff;
  color: var(--ink);
}
.form textarea {
  min-height: 90px;
  resize: vertical;
}
.toolbar input {
  flex: 1 1 220px;
}
.toolbar select {
  width: auto;
  min-width: 190px;
}
.list {
  display: grid;
  gap: 0.55rem;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  background: var(--surface-raised);
}
.row strong {
  display: block;
}
.row small {
  display: block;
  margin-top: 0.16rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-variant-numeric: tabular-nums;
}
.table th,
.table td {
  padding: 0.78rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eceeec;
  color: var(--ink-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}
.table tbody tr:hover {
  background: #f6f6f3;
}
.state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 3rem 1rem;
  background: var(--surface-raised);
  text-align: center;
}
.state::before {
  display: block;
  width: 28px;
  height: 4px;
  margin: 0 auto 1rem;
  background: var(--steel);
  content: '';
}
.state.error {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.state.error::before {
  background: var(--danger);
}
.state p {
  color: var(--ink-soft);
}
.form {
  display: grid;
  gap: 0.9rem;
}
.form label {
  display: grid;
  gap: 0.34rem;
  color: #343838;
  font-size: 0.87rem;
  font-weight: 720;
}
.form small {
  color: var(--ink-soft);
  font-weight: 500;
}
.notice {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 1rem;
  border: 1px solid #dfc481;
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  background: var(--warning-bg);
  color: #563a08;
}
.notice.info {
  border-color: #a8c4db;
  border-left-color: var(--info);
  background: var(--info-bg);
  color: #183f60;
}
.tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  overflow: auto;
  scrollbar-width: thin;
}
.tabs button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.tabs button.active {
  border-color: var(--carbon);
  outline: 0;
  background: var(--carbon);
  color: #fff;
}
.feedback {
  position: sticky;
  z-index: 8;
  top: 0.65rem;
  margin-bottom: 1rem;
  border: 1px solid #a9d1ba;
  border-left: 4px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  background: var(--success-bg);
  color: var(--success);
  box-shadow: var(--shadow);
  font-weight: 700;
}
.inline-error {
  border-left: 4px solid var(--danger);
  padding: 0.75rem;
  background: var(--danger-bg);
  color: var(--danger);
}
.fact {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.72rem 0;
}
.fact span {
  color: var(--ink-soft);
}
.module-directory {
  margin-bottom: 1rem;
}
.directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}
.directory-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  justify-content: initial;
  min-height: 74px;
  border-color: var(--line);
  background: #f6f6f3;
  color: var(--ink);
  text-align: left;
}
.directory-item:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: #fff;
}
.settings-card {
  box-shadow: none;
}
.analysis-summary {
  margin-bottom: 1rem;
  border: 1px solid #343837;
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 1.8rem);
  background: var(--graphite);
  color: #fff;
}
.analysis-summary h2 {
  max-width: 800px;
  margin-bottom: 1.1rem;
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  line-height: 1.25;
}
.analysis-summary .eyebrow,
.analysis-summary small {
  color: #aeb4b2;
}
.completion {
  height: 6px;
  margin-bottom: 0.6rem;
  overflow: hidden;
  border-radius: 2px;
  background: #383c3b;
}
.completion span {
  display: block;
  height: 100%;
  background: var(--success);
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.metric-card {
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}
.metric-card span,
.metric-card small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.78rem;
}
.metric-card strong {
  display: block;
  margin: 0.75rem 0 0.45rem;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}
.bottom {
  display: none;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  background: var(--carbon);
}
.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 6vw, 5rem);
  background:
    radial-gradient(circle at 20% 100%, rgb(237 91 26 / 24%), transparent 34%),
    linear-gradient(145deg, #101212, #202323);
  color: #fff;
}
.login-brand h1 {
  max-width: 520px;
  font-size: clamp(2.6rem, 6vw, 5rem);
}
.login-brand p {
  max-width: 500px;
  color: #aeb4b2;
  font-size: 1.05rem;
  line-height: 1.55;
}
.login-brand .eyebrow {
  color: var(--fire);
}
.login-panel {
  display: flex;
  width: min(100%, 620px);
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 7vw, 6rem);
  background: var(--surface);
}
.login-panel > div p {
  color: var(--ink-soft);
  line-height: 1.5;
}
.login-panel form {
  margin-top: 1.2rem;
}
@media (min-width: 761px) and (max-width: 1100px) {
  .side {
    width: 196px;
  }
  .main {
    width: calc(100% - 196px);
    margin-left: 196px;
    padding: 1.5rem;
  }
  .ops-layout {
    grid-template-columns: 1fr;
  }
  .pulse-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pulse-grid button {
    min-height: 104px;
  }
}
@media (max-width: 760px) {
  body {
    background: var(--canvas);
  }
  .side {
    display: none;
  }
  .main {
    width: 100%;
    margin: 0;
    padding: 1rem 1rem calc(5.3rem + env(safe-area-inset-bottom));
  }
  .top {
    align-items: center;
    margin-bottom: 1rem;
  }
  .top h1 {
    font-size: 1.55rem;
  }
  .top p {
    max-width: 230px;
    font-size: 0.84rem;
  }
  .top .eyebrow {
    display: none;
  }
  .icon-button {
    width: 44px;
    padding: 0;
  }
  .icon-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .bottom {
    position: fixed;
    z-index: 30;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid #353938;
    padding: 0.35rem 0.3rem calc(0.35rem + env(safe-area-inset-bottom));
    background: rgb(18 20 20 / 97%);
    box-shadow: 0 -6px 20px rgb(0 0 0 / 16%);
  }
  .bottom button {
    display: flex;
    min-width: 0;
    min-height: 52px;
    flex-direction: column;
    gap: 0.22rem;
    border: 0;
    padding: 0.3rem 0.1rem;
    background: transparent;
    color: #919896;
    font-size: 0.68rem;
    font-weight: 650;
  }
  .bottom button:hover:not(:disabled) {
    background: transparent;
  }
  .bottom button.active {
    color: #fff;
  }
  .bottom button.active .icon {
    color: var(--fire);
  }
  .bottom .icon {
    width: 1.25rem;
    height: 1.25rem;
  }
  .ops-hero {
    margin-inline: -1rem;
    border-width: 1px 0;
    border-radius: 0;
    padding: 1.25rem 1rem 1.35rem;
  }
  .situation {
    padding: 1.35rem 0;
  }
  .situation p {
    font-size: 1.45rem;
  }
  .hero-actions button {
    flex: 1 1 145px;
  }
  .ops-layout,
  .grid {
    grid-template-columns: 1fr;
  }
  .work-stack,
  .pulse-panel,
  .module-directory,
  .card {
    padding: 1rem;
  }
  .pulse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pulse-grid button {
    min-height: 104px;
  }
  .directory-grid {
    grid-template-columns: 1fr;
  }
  .toolbar select {
    width: 100%;
  }
  .notice {
    flex-direction: column;
  }
  .login-shell {
    display: block;
    background: var(--surface);
  }
  .login-brand {
    min-height: 275px;
    padding: 1.4rem 1.2rem;
  }
  .login-brand h1 {
    font-size: 2.5rem;
  }
  .login-brand p {
    margin-bottom: 0;
    font-size: 0.92rem;
  }
  .login-panel {
    width: 100%;
    padding: 1.5rem 1.2rem 2.5rem;
  }
}
@media (max-width: 560px) {
  .row {
    align-items: stretch;
    flex-direction: column;
  }
  .row input,
  .row button {
    width: 100%;
  }
  .fact {
    flex-direction: column;
    gap: 0.25rem;
  }
  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }
  .table thead {
    display: none;
  }
  .table tr {
    margin-bottom: 0.7rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 4px 12px rgb(20 23 22 / 5%);
  }
  .table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.62rem 0.8rem;
    border-bottom: 1px solid #e5e6e4;
    white-space: normal;
    text-align: right;
  }
  .table td::before {
    color: var(--ink-soft);
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 750;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .table td:first-child {
    align-items: flex-start;
    background: #eceeec;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

[hidden] {
  display: none !important;
}

/* Five areas, with service phases using desktop space without adding domain tabs. */
.utility {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}
.area-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.area-nav .active {
  border-color: var(--fire);
  box-shadow: inset 0 -2px var(--fire);
}
.service-context {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.service-phase {
  margin: 2rem 0;
  scroll-margin-top: 1rem;
}
.service-phase > h2 {
  border-bottom: 2px solid var(--fire);
  padding-bottom: 0.65rem;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}
.service-grid > * {
  min-width: 0;
}
.preparation-stock {
  grid-column: 1 / -1;
}
.service-history {
  position: relative;
  margin-left: auto;
}
summary {
  cursor: pointer;
  min-height: 44px;
  padding: 0.75rem;
  font-weight: 700;
}
.history-menu {
  position: absolute;
  right: 0;
  z-index: 3;
  width: min(500px, 85vw);
  max-height: 65vh;
  overflow: auto;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px #0002;
}
.history-day {
  margin-bottom: 1rem;
}
.service-grid fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
}
@media (max-width: 760px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
  .service-context {
    align-items: stretch;
    flex-direction: column;
  }
  .top {
    flex-wrap: wrap;
  }
  .service-history {
    margin-left: 0;
  }
  .history-menu {
    left: 0;
    right: auto;
  }
}

/* DB-05: bounded context and actionable exceptions, within the existing shell. */
.home-context,
.home-exceptions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.home-context .card,
.home-exceptions .card {
  min-width: 0;
  overflow-wrap: anywhere;
}
.home-exception.priority-critical {
  border-left: 4px solid var(--fire);
}
.home-exception.priority-attention {
  border-left: 4px solid #b87b25;
}
.home-context .button,
.home-exceptions .button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
@media (max-width: 760px) {
  .home-context,
  .home-exceptions {
    grid-template-columns: 1fr;
  }
}
/* DB-06: business-only layout; global navigation is unchanged. */
.business-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.business-calendar .card {
  margin: 0;
  padding: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.business-calendar h3 {
  font-size: 0.85rem;
}
.business-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.business-form h2,
.business-form details,
.business-form p {
  grid-column: 1/-1;
}
.business-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.business-form pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .business-calendar,
  .business-form {
    grid-template-columns: 1fr;
  }
  .calendar-weekday,
  .calendar-spacer {
    display: none;
  }
}

/* DB-UX-01: shared area shell and discoverable subareas. */
.inventory-areas {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.top {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  align-items: center;
}
.top h1 {
  margin: 0;
}
.area-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-left: auto;
  flex-wrap: wrap;
}
.profile {
  margin-top: auto;
  position: relative;
}
.profile summary {
  padding: 0.8rem;
  min-height: 44px;
  cursor: pointer;
  border: 1px solid var(--line-strong);
}
.profile-menu {
  padding: 1rem;
  background: var(--surface);
  color: var(--ink);
  display: grid;
  gap: 0.6rem;
}
.mobile-header {
  display: none;
}
.intelligent-management form {
  display: flex;
  align-items: end;
  gap: 0.7rem;
  margin-top: 1rem;
}
.intelligent-management label {
  flex: 1;
}
.inventory-areas .card {
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.area-nav a.active {
  border-bottom: 3px solid var(--fire);
  font-weight: 800;
}
.floating-panel {
  max-width: min(900px, 95vw);
  max-height: 90dvh;
  border: 1px solid var(--line);
  padding: 1.5rem;
  background: var(--surface);
  color: var(--ink);
}
.floating-panel::backdrop {
  background: rgb(0 0 0 / 55%);
}
.checklist-row {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.checklist-row small {
  display: block;
}
@media (max-width: 760px) {
  .inventory-areas {
    grid-template-columns: 1fr;
  }
  .mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1rem;
    background: var(--carbon);
    color: white;
  }
  .mobile-header .brand {
    margin: 0;
    font-size: 0.95rem;
  }
  .mobile-header .profile {
    margin: 0;
  }
  .mobile-header .profile-menu {
    position: absolute;
    right: 0;
    width: min(300px, 90vw);
    box-shadow: var(--shadow);
  }
  .main {
    padding-top: 100px;
    padding-bottom: 100px;
  }
  .bottom {
    padding-bottom: env(safe-area-inset-bottom);
  }
  .top {
    flex-wrap: wrap;
    gap: 0.7rem;
  }
  .area-nav {
    display: flex;
    flex-wrap: wrap;
  }
  .business-calendar article {
    padding: 0.4rem;
    overflow-wrap: anywhere;
  }
}

.checklist-heading {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 1rem 0;
}
.service-tasks {
  margin: 1rem 0;
}

.checklist-row,
.checklist-heading {
  grid-template-columns: 2rem minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.7rem;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .checklist-row,
  .checklist-heading {
    grid-template-columns: 1.5rem minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.45rem;
  }
}

.checklist-heading > span:first-child {
  white-space: nowrap;
  font-size: 0.65rem;
}

/* Visual lab proposal: keep the message field within narrow mobile cards. */
@media (max-width: 700px) {
  .intelligent-management form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .intelligent-management form label {
    display: grid;
    gap: 0.35rem;
    flex: 1 1 180px;
    min-width: 0;
  }
  .intelligent-management input {
    width: 100%;
    min-width: 0;
  }
  .intelligent-management button {
    align-self: end;
  }
}

/* DB CONTROL · refinamiento visual 02. Solo presentación. */
:root {
  --canvas: #ececea;
  --surface: #f8f8f5;
  --surface-subtle: #e4e4e1;
  --ink: #181a1a;
  --ink-soft: #555a5a;
  --line: #cfd1cf;
  --line-strong: #9da19f;
  --carbon: #121414;
  --graphite: #1d2020;
  --fire: #ed5b1a;
  --radius-sm: 8px;
  --radius: 12px;
  --shadow: 0 3px 12px rgb(20 23 22 / 3%);
}
body {
  background: var(--canvas);
  font-size: 14px;
  line-height: 1.55;
}
h1,
h2,
h3,
h4 {
  line-height: 1.25;
}
h1 {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  letter-spacing: -0.045em;
}
h2 {
  font-size: 1.08rem;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1rem;
  letter-spacing: -0.018em;
}
p {
  line-height: 1.6;
}
small {
  font-size: 0.76rem;
  line-height: 1.5;
}
button,
.button {
  min-height: 44px;
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0;
  border-radius: var(--radius-sm);
}
button {
  padding: 0.65rem 1rem;
}
button:hover:not(:disabled) {
  background: #2d3030;
  border-color: #2d3030;
}
button.secondary:hover:not(:disabled),
.button.secondary:hover {
  background: #f1f1f1;
  border-color: #bababa;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.95rem;
  border: 1px solid var(--carbon);
  background: var(--carbon);
  color: white;
  text-decoration: none;
  line-height: 1.35;
}
.button.secondary {
  color: var(--ink);
  background: white;
  border-color: var(--line);
}
a {
  text-underline-offset: 0.2em;
}
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgb(237 91 26 / 45%);
  outline-offset: 4px;
  border-radius: 4px;
}
button:disabled,
input:disabled {
  opacity: 0.55;
}
input:not([type='checkbox']):not([type='radio']),
select,
textarea {
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  color: var(--ink);
  background: white;
  font-size: 0.88rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 2%);
}
input:disabled,
textarea:disabled {
  background: var(--surface);
}
input[type='checkbox'],
input[type='radio'] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--carbon);
}
.form label:has(input[type='checkbox']),
.form label:has(input[type='radio']) {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.form,
.business-form {
  gap: 1rem;
}
.form label,
.business-form label,
.toolbar label {
  color: #575757;
  font-size: 0.79rem;
  font-weight: 600;
}
.form label > :is(input, select, textarea),
.business-form label > :is(input, select, textarea),
.toolbar label > :is(input, select, textarea) {
  margin-top: 0.1rem;
  width: 100%;
}
fieldset {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
}
legend {
  padding: 0 0.4rem;
  font-weight: 650;
  color: var(--ink-soft);
}
.side {
  width: 224px;
  padding: 1.8rem 1rem 1.2rem;
  border-right: 0;
  background: var(--carbon);
}
.brand {
  gap: 0.65rem;
  margin-bottom: 2.25rem;
  font-size: 1rem;
  letter-spacing: 0.09em;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid #3a3e3d;
  border-radius: 9px;
  background: #202323;
  color: #ed5b1a;
  font-size: 1.05rem;
  letter-spacing: -0.07em;
}
.brand small {
  margin-top: 4px;
  color: #adadad;
  font-size: 0.56rem;
  letter-spacing: 0.095em;
}
.workspace-label {
  padding: 0 0.75rem;
  margin-bottom: 0.75rem;
  color: #9d9d9d;
  font-size: 0.64rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.nav {
  gap: 0.4rem;
}
.nav button {
  min-height: 46px;
  border-radius: 8px;
  color: #b9bfbd;
  font-size: 0.87rem;
  padding: 0.7rem 0.8rem;
  gap: 0.8rem;
}
.nav button .icon {
  width: 19px;
  height: 19px;
}
.nav button.active {
  background: #262929;
  border-color: #3a3e3d;
  color: #fff;
}
.nav button.active .icon {
  color: #ed5b1a;
}
.nav button.active::before {
  inset: 12px auto 12px 0;
  width: 2px;
  border-radius: 2px;
}
.nav button:hover:not(:disabled) {
  background: #202323;
  border-color: #3a3e3d;
}
.main {
  margin-left: 224px;
  width: min(calc(100% - 224px), 1440px);
  padding: 2rem clamp(1.3rem, 3vw, 2.8rem) 3rem;
}
.top {
  align-items: center;
  padding-bottom: 1.3rem;
  margin-bottom: 1.65rem;
  border-color: var(--line);
  gap: 1rem;
}
.heading-copy {
  min-width: 0;
}
.top .eyebrow {
  margin-bottom: 0.4rem;
  color: #6d6d6d;
  font-size: 0.62rem;
  letter-spacing: 0.13em;
}
.top h1 {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
}
.top .page-subtitle {
  margin-top: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.5;
  max-width: 65ch;
}
.area-actions {
  gap: 0.5rem;
}
.profile summary {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid #4c4c4c;
  border-radius: 9px;
  color: #e4e4e4;
  padding: 0.75rem;
  font-size: 0.8rem;
  list-style: none;
}
.profile summary::after {
  content: '⌃';
  margin-left: auto;
  color: #b0b0b0;
}
.profile summary::marker {
  display: none;
}
.profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #444444;
  color: #e8e8e8;
  font-size: 0.7rem;
  font-weight: 700;
}
.profile-menu {
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgb(0 0 0 / 15%);
  font-size: 0.8rem;
}
.side .profile-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  right: 0;
}
.skip-link {
  position: fixed;
  z-index: 150;
  top: 8px;
  left: 8px;
  transform: translateY(-180%);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  background: white;
  color: var(--ink);
}
.skip-link:focus {
  transform: none;
}
.card {
  padding: 1.35rem;
  box-shadow: var(--shadow);
  border-color: var(--line);
}
.card > h2,
.card > h3 {
  margin-bottom: 0.9rem;
}
.card > small {
  display: block;
  color: var(--ink-soft);
  margin-bottom: 0.8rem;
}
.card > p:last-child {
  margin-bottom: 0;
}
.grid {
  gap: 1rem;
}
.row {
  border-radius: 9px;
  padding: 0.95rem 1rem;
  border-color: var(--line);
  line-height: 1.5;
}
a.row {
  text-decoration: none;
  transition:
    border-color 150ms,
    background 150ms;
}
a.row:hover {
  border-color: #bdbdbd;
  background: #fafafa;
}
.row small {
  font-size: 0.75rem;
  color: #777777;
}
.badge {
  border-radius: 5px;
  padding: 0.25rem 0.5rem;
  font-size: 0.66rem;
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: normal;
}
.badge.success {
  color: #23784b;
  background: #deefe5;
  border-color: #b3d4c0;
}
.badge.warning {
  color: #986000;
  background: #fff0cf;
  border-color: #e5ce9c;
}
.badge.danger {
  color: #b42d2d;
  background: #f7dddd;
  border-color: #e6b7b7;
}
.area-nav {
  gap: 0.35rem;
  padding: 0.35rem;
  margin: 0 0 1.4rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ececec;
}
.area-nav > :is(a, button) {
  padding: 0.55rem 0.9rem;
  min-height: 39px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.8rem;
  text-decoration: none;
  box-shadow: none;
}
.area-nav > :is(a, button).active,
.area-nav a.active {
  border: 1px solid #dcdcdc;
  background: white;
  color: var(--ink);
  font-weight: 650;
  box-shadow: 0 1px 3px rgb(0 0 0 / 4%);
}
.toolbar {
  align-items: end;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin: 1rem 0 1.25rem;
}
.toolbar label {
  display: grid;
  gap: 0.35rem;
  flex: 1 1 150px;
  min-width: 0;
}
.toolbar :is(input, select) {
  min-width: 0;
}
.toolbar > input {
  flex: 1 1 200px;
}
.table-wrap {
  box-shadow: none;
  border-radius: 10px;
}
.table {
  font-size: 0.82rem;
}
.table th {
  color: #6c6c6c;
  background: #f0f0f0;
  font-weight: 650;
  letter-spacing: 0.06em;
  font-size: 0.62rem;
  padding: 0.85rem 1rem;
}
.table td {
  padding: 1rem;
  border-color: #efefef;
}
.table td small {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  line-height: 1.5;
}
.table td > a {
  text-decoration: none;
}
.table tbody tr:hover {
  background: #fbfbfb;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.state {
  border-style: solid;
  padding: 2.5rem 1.5rem;
  background: #fcfcfc;
}
.state h2 {
  font-size: 1.08rem;
  margin-bottom: 0.55rem;
}
.state p {
  max-width: 65ch;
  margin-inline: auto;
  font-size: 0.85rem;
}
.notice,
.feedback {
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.6;
}
.notice {
  border-left-width: 3px;
}
.feedback {
  top: 0.7rem;
  box-shadow: var(--shadow);
}
details > summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.5;
  padding: 0.55rem 0;
  color: #565656;
}
details[open] > summary {
  margin-bottom: 0.75rem;
}
.floating-panel {
  width: min(820px, 95vw);
  max-width: 95vw;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 24px 70px rgb(0 0 0 / 18%);
}
.floating-panel::backdrop {
  background: rgb(18 20 20 / 42%);
  backdrop-filter: blur(3px);
}
.checklist-heading {
  color: #848484;
  font-size: 0.64rem;
  letter-spacing: 0.055em;
}
.checklist-row {
  padding-block: 1rem;
  font-size: 0.83rem;
  border-color: #e7e7e7;
}
.checklist-row small {
  color: #707070;
  font-size: 0.72rem;
  line-height: 1.55;
  margin-top: 0.2rem;
}
.checklist-row > div:last-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.service-context {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 3px solid #d6d6d6;
}
.service-context h2 {
  font-size: 1.3rem;
}
.service-phase {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  margin: 1.2rem 0;
}
.service-phase > h2 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.service-phase > h2::before {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #f0f0f0;
  color: #737373;
  font-size: 0.65rem;
  letter-spacing: 0;
}
#preparacion > h2::before {
  content: '01';
}
#durante > h2::before {
  content: '02';
}
#cierre > h2::before {
  content: '03';
}
.service-phase > h2::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--line);
}
.card[data-occurrence] > h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.98rem;
}
.result-record {
  border-left: 2px solid #d3d3d3;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: 0 8px 8px 0;
  background: #f7f7f7;
}
.result-record h4 {
  margin: 0 0 0.75rem;
  font-size: 0.83rem;
}
.result-record dl {
  display: grid;
  grid-template-columns: minmax(80px, 0.4fr) 1fr;
  gap: 0.3rem 0.8rem;
  margin: 0.5rem 0;
  font-size: 0.8rem;
}
.result-record dd {
  margin: 0;
}
.business-calendar {
  gap: 0.6rem;
}
.business-calendar .card {
  padding: 0.8rem;
  box-shadow: none;
  min-height: 110px;
}
.business-calendar h3 {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.business-calendar p {
  font-size: 0.72rem;
  color: var(--ink-soft);
}
.business-form {
  padding: 1.4rem;
}
.business-form details {
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
}
.business-form input,
.business-form select,
.business-form textarea {
  width: 100%;
}
.metric-card,
.analysis-summary {
  border-radius: 12px;
  box-shadow: none;
}
.metric-card strong {
  font-variant-numeric: tabular-nums;
  font-size: 2rem;
}
.metric-card span,
.metric-card small {
  font-size: 0.75rem;
}
.intelligent-management {
  margin-bottom: 1.8rem;
  padding: 1rem 1.2rem;
  background: #ececec;
  border-color: #dcdcdc;
  box-shadow: none;
}
.assistant-heading {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.assistant-heading h2 {
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
}
.assistant-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.77rem;
}
.assistant-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  border-radius: 9px;
  color: #747474;
  background: #e3e3e3;
}
.assistant-status {
  margin-left: auto;
  background: transparent;
  color: #6d6d6d;
  border-color: #cfcfcf;
  white-space: nowrap;
  font-size: 0.62rem;
}
.assistant-details {
  margin-left: 48px;
  margin-top: 0.5rem;
}
.assistant-details summary {
  padding: 0.15rem 0;
  font-size: 0.74rem;
  font-weight: 500;
}
.intelligent-management input {
  width: 100%;
}
.section-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.65rem 0 1rem;
}
.section-intro h2,
.section-intro h3 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: -0.035em;
}
.section-intro .eyebrow {
  margin-bottom: 0.3rem;
  font-size: 0.59rem;
  letter-spacing: 0.13em;
  color: #6d6d6d;
}
.section-note,
.section-description {
  font-size: 0.76rem;
  color: var(--ink-soft);
}
.section-description {
  margin-top: -0.4rem;
  margin-bottom: 1.1rem;
}
.home-context,
.home-exceptions {
  gap: 1rem;
}
.context-card {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  padding: 1.3rem;
}
.context-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}
.context-heading h2 {
  font-size: 0.96rem;
  margin: 0;
}
.context-icon {
  width: 31px;
  height: 31px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #767676;
  background: #f3f3f3;
}
.context-icon .icon {
  width: 18px;
  height: 18px;
}
.context-body {
  flex: 1;
}
.context-lead {
  font-size: 0.91rem;
  color: #383838;
  font-weight: 650;
  line-height: 1.55;
}
.context-detail {
  font-size: 0.79rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 0.65rem;
}
.context-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding-top: 0.9rem;
  margin-top: 0.55rem;
  border-top: 1px solid #efefef;
}
.context-action {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.77rem;
  font-weight: 650;
  text-decoration: none;
  color: #434343;
  min-height: 36px;
}
.context-action:hover {
  color: #b74410;
}
.context-sources {
  font-size: 0.68rem;
  max-width: 100%;
}
.context-sources summary {
  font-size: 0.68rem;
  color: #707070;
  font-weight: 500;
  padding: 0.2rem;
}
.context-sources small {
  display: block;
  padding: 0.5rem;
  font-size: 0.68rem;
  background: var(--surface);
}
.attention-section {
  margin-top: 2rem;
}
.home-exception {
  padding: 1.2rem;
  margin: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}
.exception-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.priority-label {
  font-size: 0.59rem;
  text-transform: uppercase;
  letter-spacing: 0.085em;
  font-weight: 700;
  color: #9d6a1d;
}
.exception-source {
  font-size: 0.66rem;
  color: #707070;
}
.home-exception h3 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.home-exception > p {
  font-size: 0.79rem;
  color: var(--ink-soft);
  flex: 1;
}
.home-exception.priority-attention {
  border-left: 3px solid #d7b679;
}
.home-exception.priority-critical {
  border-left: 3px solid #bf4938;
}
.home-exception.priority-critical .priority-label {
  color: #b42d2d;
}
.home-exception.priority-informative .priority-label {
  color: #536f91;
}
.exception-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #efefef;
  padding-top: 0.75rem;
}
.exception-footer small {
  max-width: 65%;
  font-size: 0.62rem;
  color: #707070;
  overflow-wrap: anywhere;
}
.text-action {
  font-size: 0.76rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.more-exceptions {
  margin: 1rem 0;
}
.source-register {
  margin-top: 2rem;
  padding: 0.75rem 1.2rem;
  background: transparent;
  box-shadow: none;
}
.source-register p {
  font-size: 0.73rem;
  color: var(--ink-soft);
  padding: 0.35rem 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 761px) and (max-width: 1100px) {
  .side {
    width: 190px;
    padding-inline: 0.8rem;
  }
  .main {
    width: calc(100% - 190px);
    margin-left: 190px;
    padding-inline: 1.3rem;
  }
  .brand {
    font-size: 0.83rem;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
  }
  .section-note {
    display: none;
  }
}
@media (max-width: 760px) {
  .main {
    width: 100%;
    margin-left: 0;
    padding: 90px 1rem calc(6rem + env(safe-area-inset-bottom));
  }
  .top {
    margin-bottom: 1.25rem;
    gap: 0.7rem;
    padding-bottom: 1rem;
  }
  .top .eyebrow {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.56rem;
  }
  .top h1 {
    font-size: 1.65rem;
  }
  .top .page-subtitle {
    font-size: 0.76rem;
    max-width: 32ch;
  }
  .mobile-header {
    background: var(--carbon);
    padding: 0.7rem 1rem;
    box-shadow: 0 2px 12px rgb(0 0 0 / 7%);
  }
  .mobile-header .brand {
    font-size: 0.8rem;
    gap: 0.55rem;
  }
  .mobile-header .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }
  .mobile-header .brand small {
    font-size: 0.49rem;
  }
  .mobile-header .profile summary {
    padding: 0.35rem 0.5rem;
    border-color: #4f4f4f;
    gap: 0.4rem;
    min-height: 40px;
    font-size: 0.68rem;
  }
  .mobile-header .profile-avatar {
    width: 24px;
    height: 24px;
  }
  .mobile-header .profile-menu {
    top: calc(100% + 12px);
    bottom: auto;
  }
  .bottom {
    background: #222222;
    border-top-color: #454545;
    padding: 0.4rem 0.4rem max(0.4rem, env(safe-area-inset-bottom));
  }
  .bottom button {
    font-size: 0.6rem;
    min-height: 49px;
    border-radius: 8px;
    color: #bbbbbb;
    gap: 0.3rem;
  }
  .bottom button.active {
    background: #393939;
    color: #fff;
  }
  .bottom button.active .icon {
    color: #ed5b1a;
  }
  .bottom .icon {
    width: 18px;
    height: 18px;
  }
  .home-context,
  .home-exceptions,
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .card {
    padding: 1.1rem;
  }
  .intelligent-management {
    padding: 0.85rem 0.95rem;
  }
  .assistant-heading {
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .assistant-heading > div {
    flex: 1;
    min-width: 150px;
  }
  .assistant-status {
    margin-left: 43px;
  }
  .assistant-details {
    margin-left: 43px;
  }
  .assistant-heading h2 {
    font-size: 0.84rem;
  }
  .assistant-heading p {
    font-size: 0.72rem;
  }
  .section-intro {
    margin-top: 1.5rem;
  }
  .section-intro h2,
  .section-intro h3 {
    font-size: 1.07rem;
  }
  .section-note {
    display: none;
  }
  .context-card {
    padding: 1.1rem;
  }
  .context-detail {
    font-size: 0.78rem;
  }
  .context-lead {
    font-size: 0.87rem;
  }
  .service-phase {
    padding: 1rem;
  }
  .service-context h2 {
    font-size: 1.1rem;
  }
  .checklist-row,
  .checklist-heading {
    grid-template-columns: 1.25rem minmax(0, 1fr);
  }
  .checklist-row > div:last-child {
    grid-column: 2;
    padding-top: 0.15rem;
  }
  .checklist-heading > span:last-child {
    display: none;
  }
  .table td {
    padding: 0.8rem;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
  }
  .table td:first-child {
    background: #f0f0f0;
  }
  .toolbar {
    padding: 0.8rem;
    gap: 0.65rem;
  }
  .toolbar > :is(button, a) {
    flex: 1 1 120px;
  }
  .area-nav {
    gap: 0.25rem;
    padding: 0.3rem;
  }
  .area-nav > :is(a, button) {
    flex: 1 1 auto;
    font-size: 0.72rem;
    padding: 0.5rem 0.6rem;
  }
  .floating-panel {
    padding: 1.1rem;
    border-radius: 12px;
  }
  .business-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .business-calendar .card {
    min-height: 0;
    padding: 0.9rem;
  }
  .business-calendar h3 {
    font-size: 0.82rem;
  }
  .business-calendar p {
    font-size: 0.76rem;
  }
}

.inventory-areas .category-card {
  min-height: 150px;
  justify-content: flex-start;
  gap: 1rem;
  text-align: left;
  transition:
    border-color 150ms,
    box-shadow 150ms,
    transform 150ms;
}
.category-card:hover {
  border-color: #bbbbbb;
  box-shadow: 0 6px 18px rgb(20 23 22 / 6%);
  transform: translateY(-2px);
}
.category-card .category-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  background: #f5f5f5;
  color: #717171;
  flex: 0 0 auto;
}
.category-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.category-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}
.category-card .category-arrow {
  margin-left: auto;
  color: #868686;
}
@media (max-width: 760px) {
  .inventory-areas .category-card {
    min-height: 112px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .category-card:hover {
    transform: none;
  }
}

/* Refinamiento 03: registros legibles y controles consistentes. */
.occurrence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  margin: -0.2rem 0 1rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
  line-height: 1.6;
}
.occurrence-meta > span {
  background: #f3f3f3;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
}
.occurrence-meta .plan-version {
  background: transparent;
  margin-left: auto;
}
.occurrence-meta time,
.record-audit time {
  font-variant-numeric: tabular-nums;
}
.record-audit {
  margin-top: 0.85rem;
  border-top: 1px solid #e2e2e2;
  padding-top: 0.6rem;
}
.record-audit > summary {
  font-size: 0.75rem;
  color: #5f5f5f;
  cursor: pointer;
  padding: 0.35rem 0;
}
.record-audit[open] > summary {
  margin-bottom: 0.5rem;
}
.card[data-occurrence] > .form.card {
  box-shadow: none;
  background: #fbfbfb;
  border: 1px solid #e7e7e7;
  margin-top: 0.8rem;
}
.card[data-occurrence] > details {
  border-top: 1px solid var(--line);
  margin-top: 0.7rem;
  padding-top: 0.4rem;
}
.card[data-occurrence] > details > summary {
  padding: 0.7rem 0;
  font-size: 0.8rem;
}
.form fieldset {
  min-width: 0;
}
input[type='checkbox'],
input[type='radio'] {
  accent-color: #595959;
  flex-shrink: 0;
}
input[type='checkbox']:focus-visible,
input[type='radio']:focus-visible {
  outline: 2px solid #ed5b1a;
  outline-offset: 3px;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
button:disabled,
.button[aria-disabled='true'] {
  cursor: not-allowed;
}
button:not(:disabled):active,
.button:active {
  transform: translateY(1px);
}
.table th {
  white-space: normal;
}
.table a:focus-visible,
a.row:focus-visible,
.category-card:focus-visible {
  outline: 3px solid #ed5b1a;
  outline-offset: 3px;
}
@media (max-width: 640px) {
  .occurrence-meta {
    gap: 0.4rem;
    font-size: 0.72rem;
  }
  .occurrence-meta .plan-version {
    margin-left: 0;
  }
  .record-audit dl {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .record-audit dd {
    margin-bottom: 0.55rem;
    overflow-wrap: anywhere;
  }
  .card[data-occurrence] {
    padding: 1rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  button:not(:disabled):active,
  .button:active {
    transform: none;
  }
}

.ledger-summary {
  margin: 1.25rem 0;
  align-items: stretch;
}
.ledger-summary .card {
  border-top: 3px solid #d6d6d6;
}
.ledger-summary .ledger-label {
  display: block;
  color: var(--ink-soft);
  font-size: 0.78rem;
  margin-bottom: 0.7rem;
}
.ledger-summary strong {
  display: block;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}
.ledger-summary p {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.exception-footer time {
  font-variant-numeric: tabular-nums;
}
.text-action svg {
  vertical-align: middle;
}
.business-form .optional-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1rem;
  padding-top: 0.8rem;
}
.business-form > details > summary {
  grid-column: 1/-1;
  padding: 0.5rem 0;
}
@media (max-width: 760px) {
  .business-form .optional-fields {
    grid-template-columns: 1fr;
  }
}

/* Marca Dímaga's Burger · adaptación del logo proporcionado. */
.brand-logo {
  display: block;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  object-fit: contain;
  border-radius: 50%;
  background: #000;
}
.side .brand {
  align-items: center;
  gap: 0.7rem;
}
.side .brand > span {
  font-size: 0.83rem;
  letter-spacing: 0.08em;
}
.side .brand small {
  font-size: 0.51rem;
  letter-spacing: 0.06em;
}
.login-brand .brand-logo {
  width: 96px;
  height: 96px;
  flex-basis: 96px;
}
@media (max-width: 760px) {
  .mobile-header .brand-logo {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }
  .mobile-header .brand {
    gap: 0.55rem;
  }
  .mobile-header .brand > span {
    font-size: 0.73rem;
  }
  .mobile-header .brand small {
    font-size: 0.46rem;
  }
}

/* Industrial Adaptive: geometría de azulejo y acero, sin alterar la paleta restaurada. */
:root {
  --radius-sm: 4px;
  --radius: 6px;
  --shadow: 0 1px 3px rgb(18 20 20 / 4%);
}
.card,
.service-phase,
.category-card,
.intelligent-management,
.area-nav,
.toolbar,
.table-wrap,
.metric-card,
.analysis-summary,
.row,
.side .nav button,
.bottom button {
  border-radius: 6px;
}
.card,
.category-card,
.service-phase {
  box-shadow: none;
}
.area-nav > :is(a, button),
.profile summary,
.assistant-icon,
.context-icon,
.category-card .category-icon {
  border-radius: 4px;
}
.category-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line-strong);
}
.context-card .context-icon,
.category-card .category-icon {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
}
.occurrence-meta > span,
.badge {
  border-radius: 3px;
}
.result-record {
  border-radius: 0 4px 4px 0;
}
.panel-dialog,
dialog {
  border-radius: 8px;
}
.side {
  border-right: 1px solid #343838;
}
@media (max-width: 760px) {
  .mobile-header {
    border-bottom: 1px solid #343838;
  }
  .bottom {
    border-top: 1px solid #343838;
  }
}

/* Ajuste indicado por Diego: logo y CONTROL debajo, sin nombre duplicado. */
.brand,
.side .brand,
.mobile-header .brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.side .brand {
  width: 100%;
  margin-bottom: 1.6rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid #343838;
}
.brand > .brand-label,
.side .brand > .brand-label,
.mobile-header .brand > .brand-label {
  display: block;
  margin: 0;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.23em;
  line-height: 1;
  padding-left: 0.23em;
  text-align: center;
}
.login-brand .brand {
  align-self: flex-start;
}
.login-brand .brand > .brand-label {
  font-size: 0.95rem;
}
.category-card .category-icon .icon {
  width: 24px;
  height: 24px;
}
/* Industrial Adaptive: naranja solo para acciones principales y selección. */
.form > button:not(.secondary):not(.danger):not([type='button']),
.business-form > button:not(.secondary):not(.danger),
.button:not(.secondary),
button[data-service-action='start'],
.toolbar button[data-count] {
  background: var(--fire);
  border-color: var(--fire);
  color: var(--carbon);
}
.form > button:not(.secondary):not(.danger):not([type='button']):hover:not(:disabled),
.business-form > button:not(.secondary):not(.danger):hover:not(:disabled),
.button:not(.secondary):hover,
button[data-service-action='start']:hover:not(:disabled),
.toolbar button[data-count]:hover:not(:disabled) {
  background: #f47740;
  border-color: #f47740;
  color: var(--carbon);
}
input[type='checkbox'],
input[type='radio'] {
  accent-color: var(--fire);
}
.table td {
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .mobile-header .brand {
    flex: 0 0 auto;
    gap: 5px;
    margin: 0;
  }
  .mobile-header .brand-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
  .mobile-header .brand > .brand-label {
    font-size: 0.57rem;
    letter-spacing: 0.2em;
  }
}

/* Afinado 08: separar calidad de datos, indicadores y lectura de existencias. */
.analysis-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.analysis-heading .eyebrow {
  margin: 0;
}
.analysis-summary .analysis-heading .badge {
  background: #303333;
  border-color: #636867;
  color: #f8f8f5;
}
.analysis-summary h2 {
  max-width: 62ch;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.45;
  margin-bottom: 1.25rem;
}
.completion-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.77rem;
  color: #d2d6d4;
}
.completion-heading strong {
  color: white;
  font-variant-numeric: tabular-nums;
}
.analysis-summary .completion {
  height: 5px;
  border-radius: 0;
}
.analysis-summary .completion > span {
  background: var(--fire);
}
.analysis-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.7rem;
  border-top: 1px solid #454949;
  padding-top: 1rem;
  margin-top: 1.1rem;
  color: #bdc2c0;
  font-size: 0.75rem;
}
.analysis-counts strong {
  color: white;
  margin-right: 0.25rem;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.analysis-no-base {
  color: #d2d6d4;
  font-size: 0.8rem;
}
.metric-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.metric-heading .icon {
  width: 18px;
  height: 18px;
  color: #717775;
  flex-shrink: 0;
}
.metric-card > strong {
  overflow-wrap: anywhere;
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.analysis-services .row {
  gap: 1rem;
}
.analysis-services .row > div {
  min-width: 0;
}
.analysis-services .badge {
  flex-shrink: 0;
}
.stock-table td {
  vertical-align: top;
}
.stock-table .stock-number {
  text-align: right;
}
.stock-table td[data-label='Saldo'] {
  min-width: 185px;
}
.stock-table td[data-label='Saldo'] small {
  max-width: 25ch;
  white-space: normal;
  color: var(--ink-soft);
  margin-left: auto;
}
.stock-table td[data-label='Último recuento'] time {
  display: block;
  max-width: 17ch;
  white-space: normal;
  font-size: 0.75rem;
  line-height: 1.6;
}
.stock-cell-value {
  min-width: 0;
}
.stock-table td[data-label='Referencia'] a {
  display: inline-block;
  margin-bottom: 0.35rem;
}
@media (max-width: 760px) {
  .analysis-heading {
    align-items: flex-start;
  }
  .analysis-summary h2 {
    font-size: 1.05rem;
  }
  .analysis-counts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }
  .analysis-counts > span:last-child {
    grid-column: 1/-1;
  }
  .analysis-filter label {
    flex-basis: calc(50% - 0.75rem);
  }
  .analysis-services .row {
    flex-wrap: wrap;
  }
  .stock-table td {
    align-items: flex-start;
  }
  .stock-table td::before {
    flex: 0 0 32%;
    padding-top: 0.1rem;
  }
  .stock-cell-value {
    flex: 1;
    overflow-wrap: anywhere;
  }
  .stock-table td[data-label='Saldo'] {
    min-width: 0;
  }
  .stock-table td[data-label='Referencia'] .stock-cell-value {
    text-align: right;
  }
  .stock-table td[data-label='Último recuento'] time {
    max-width: none;
  }
}

.stock-cell-value > a {
  text-decoration: none;
}
.area-nav > :is(a, button).active {
  background: var(--surface-raised);
  border-color: var(--line);
  box-shadow: inset 0 -2px 0 var(--fire);
  color: var(--ink);
}

/* Recuento como acción principal; reposición como destino secundario. */
.toolbar button[data-go='reposicion'] {
  background: var(--surface-raised);
  border-color: var(--line);
  color: var(--ink);
}
.toolbar button[data-go='reposicion']:hover:not(:disabled) {
  background: var(--surface-subtle);
  border-color: var(--line-strong);
}

/* Afinado 11: filtros legibles y movimientos con importe separado. */
.ledger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-block: 1.1rem;
}
.toolbar.ledger-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 0.9rem 1rem;
  padding: 1.1rem;
}
.ledger-filters label {
  min-width: 0;
  line-height: 1.45;
}
.ledger-filters > button {
  justify-self: end;
  min-width: 132px;
}
.ledger-summary .card {
  margin-bottom: 0;
}
.ledger-list {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  overflow: hidden;
}
.ledger-list .ledger-movement {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 1.05rem 1.2rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-decoration: none;
}
.ledger-list .ledger-movement:last-child {
  border-bottom: 0;
}
.ledger-movement:hover {
  background: var(--surface);
}
.ledger-movement:focus-visible {
  outline-offset: -3px;
}
.movement-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}
.movement-copy > strong {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}
.movement-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.75rem;
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.6;
}
.movement-meta time {
  font-variant-numeric: tabular-nums;
}
.movement-value {
  display: grid;
  gap: 0.2rem;
  text-align: right;
}
.movement-value > span {
  color: var(--ink-soft);
  font-size: 0.73rem;
}
.movement-value > strong {
  color: var(--ink);
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ledger-list > p {
  margin: 0;
  padding: 1.2rem;
  color: var(--ink-soft);
}
@media (max-width: 760px) {
  .toolbar.ledger-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0.9rem;
  }
  .ledger-filters > button {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
  .ledger-list .ledger-movement {
    padding: 0.95rem;
    align-items: start;
  }
}
@media (max-width: 400px) {
  .toolbar.ledger-filters {
    grid-template-columns: minmax(0, 1fr);
  }
  .ledger-actions > a {
    flex: 1 1 100%;
  }
  .ledger-list .ledger-movement {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.65rem;
  }
  .movement-value {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
  }
}

/* Hoy: primero las situaciones a revisar; contexto y asistente después. */
.attention-section.home-priorities {
  margin-top: 0;
}
.home-priorities .priority-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 1rem;
  margin-top: 0;
  padding: 1.2rem 1.3rem;
  border: 1px solid #343838;
  border-radius: var(--radius);
  background: var(--carbon);
  color: var(--surface-raised);
}
.priority-intro .eyebrow {
  color: #b9bfbd;
}
.priority-intro .count {
  align-self: center;
  padding: 0.35rem 0.6rem;
  border: 1px solid #555b59;
  border-radius: 3px;
  background: var(--graphite);
  color: #f8f8f5;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.priority-intro .section-description {
  grid-column: 1 / -1;
  margin: 0;
  max-width: 70ch;
  color: #bdc2c0;
}
.home-overview {
  margin-block: 2rem;
}
.home-priorities .home-exceptions > .state {
  grid-column: 1 / -1;
}
@media (max-width: 560px) {
  .home-priorities .priority-intro {
    grid-template-columns: minmax(0, 1fr);
    padding: 1rem;
    gap: 0.65rem;
  }
  .priority-intro .count {
    justify-self: start;
  }
}

/* Fechas de calendario: orientación semanal también en la lista móvil. */
.business-calendar .calendar-date {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  line-height: 1.3;
}
.calendar-date-day {
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}
.calendar-date-meta {
  display: grid;
  gap: 0.1rem;
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 550;
  letter-spacing: 0;
}
.calendar-date-meta > span:first-child {
  color: var(--ink);
  font-weight: 650;
}
.preparation-stock time {
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .business-calendar .calendar-date {
    gap: 0.75rem;
  }
  .calendar-date-meta {
    font-size: 0.75rem;
  }
}

/* Recorrido operativo: una tarea visible, datos reutilizados y revisión explícita. */
.daily-work {
  border-top: 3px solid var(--fire);
}
.daily-work h2 {
  margin-bottom: 0.55rem;
  font-size: 1.35rem;
}
.daily-work p {
  max-width: 68ch;
  color: var(--ink-soft);
}
.daily-work .actions,
.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.service-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.service-steps button[aria-current='step'] {
  border-color: var(--line-strong);
  box-shadow: inset 0 -3px 0 var(--fire);
  background: var(--surface-raised);
}
.service-step > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0;
  list-style: none;
}
.service-step > summary::-webkit-details-marker {
  display: none;
}
.service-step > summary h2 {
  flex: 1;
  margin: 0;
  border: 0;
}
.service-step .step-hint {
  color: var(--ink-soft);
  font-size: 0.73rem;
  white-space: nowrap;
}
.service-step[open] > summary .step-hint {
  display: none;
}
.step-content {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-top: 1rem;
}
.step-description {
  color: var(--ink-soft);
  max-width: 70ch;
}
.step-actions,
.close-review {
  border-top: 1px solid var(--line);
  margin-top: 1.2rem;
  padding-top: 1rem;
}
.step-actions > button:not(.secondary),
.close-review > button,
.replenishment-guide form > button {
  background: var(--fire);
  color: var(--carbon);
  border-color: var(--fire);
}
.replenishment-guide .row > span {
  min-width: 0;
}
.replenishment-guide .row input {
  width: 9rem;
  max-width: 100%;
}
.request-card > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.request-card p {
  margin: 0.45rem 0;
}
@media (max-width: 560px) {
  .service-steps {
    gap: 0.3rem;
  }
  .service-steps button {
    padding-inline: 0.45rem;
    font-size: 0.75rem;
  }
  .daily-work .actions > a,
  .step-actions > button,
  .close-review > button,
  .replenishment-guide .row input {
    width: 100%;
  }
}

/* Hoy esencial: siguiente paso y avisos; trazabilidad bajo demanda. */
.home-priorities .priority-intro {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0.9rem 1rem;
}
.home-priorities .exception-footer {
  justify-content: flex-end;
  border-top: 0;
  padding-top: 0.35rem;
}
.home-priorities .priority-intro .count {
  justify-self: end;
}
@media (max-width: 400px) {
  .home-priorities .priority-intro h2 {
    font-size: 0.95rem;
  }
}

/* Captura observada y revisión local antes de registrar un recuento. */
.count-flow > fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
.count-flow [data-count-summary] {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.count-review-row {
  overflow-wrap: anywhere;
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.count-review-row small {
  color: var(--ink-soft);
}
.receipt-optional {
  display: grid;
  gap: 1rem;
  padding-top: 0.7rem;
}

.daily-queue {
  align-items: end;
  margin-block: 1rem;
}
.daily-queue [role='status'] {
  flex-basis: 100%;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
