/* The screens' frames, drawn from the boards under docs/design/. Ground,
   spacing and sizes are local to each medium and never tokens (ADR-0003). */
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--type-text);
  line-height: 1.45;
}

h1,
p {
  margin: 0;
}

a {
  color: var(--teal);
}

img {
  display: block;
}

.wordmark {
  font-weight: 750;
  letter-spacing: 0.01em;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.soft {
  color: var(--ink-soft);
}

/* --- S1, the login: the phone's dark front door, the desktop's card ------ */
body.login {
  background: var(--ink);
  font-size: 16px;
}

.login-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 16px 40px;
}

.login-bar img {
  width: 200px;
  height: auto;
}

.login-bar .wordmark {
  margin-top: 10px;
  font-size: 24px;
  color: var(--teal-on-dark);
}

.login main {
  padding: 0 16px 32px;
}

.login-form {
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  background: var(--paper);
  border-radius: 12px;
}

.login-form h1 {
  margin-bottom: 18px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 750;
}

.login-form label {
  margin-bottom: 8px;
  font-weight: 700;
}

.login-form input {
  box-sizing: border-box;
  width: 100%;
  height: 60px;
  margin-bottom: 18px;
  padding: 0 14px;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--edge);
  border-radius: 9px;
}

.login-form input[aria-invalid="true"] {
  border-color: var(--high);
}

.refusal {
  margin-bottom: 16px;
  padding: 11px 14px;
  font-weight: 600;
  color: var(--high-strong);
  background: var(--high-tint);
  border-radius: 8px;
}

.primary {
  height: 64px;
  margin-top: 6px;
  font: inherit;
  font-size: 19px;
  font-weight: 700;
  color: var(--paper);
  background: var(--teal);
  border: 0;
  border-radius: 9px;
}

.primary:active {
  background: var(--teal-pressed);
}

.note {
  margin: 24px 4px 0;
  line-height: 1.5;
  color: var(--dim-on-dark);
}

@media (min-width: 720px) {
  body.login {
    min-height: 100vh;
    font-size: 14px;
    background: var(--ground);
  }

  .login-bar {
    flex-direction: row;
    gap: 10px;
    height: 54px;
    box-sizing: border-box;
    padding: 0 32px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .login-bar img {
    width: auto;
    height: 32px;
  }

  .login-bar .wordmark {
    margin-top: 0;
    font-size: 17px;
    color: var(--teal);
  }

  .login main {
    display: flex;
    justify-content: center;
    padding: 120px 16px 32px;
  }

  .login .card {
    box-sizing: border-box;
    width: 420px;
    padding: 32px 36px 30px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
  }

  .login-form {
    padding: 0;
    border-radius: 0;
  }

  .login-form h1 {
    font-size: 21px;
    font-weight: 650;
  }

  .login-form label {
    margin-bottom: 6px;
    font-weight: 600;
  }

  .login-form input {
    height: 44px;
    margin-bottom: 16px;
    padding: 0 12px;
    font-size: 15px;
    border-width: 1.5px;
    border-radius: 8px;
  }

  .login-form .primary {
    height: 44px;
    margin-top: 4px;
    font-size: 15px;
    border-radius: 8px;
  }

  .login .note {
    margin: 20px 0 0;
    color: var(--ink-soft);
  }
}

/* --- The phone shell: the operator's, worked at the base --------------- */
body.phone {
  font-size: 16px;
}

.phone-head {
  position: sticky;
  top: 0;
  padding: 0 16px 14px;
  color: var(--paper);
  background: var(--ink);
}

.phone-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.phone-bar img {
  height: 24px;
  width: auto;
}

.phone-bar .wordmark {
  font-size: 17px;
  color: var(--teal-on-dark);
}

.phone-head .back {
  display: flex;
  align-items: center;
  height: 60px;
  font-size: 17px;
  font-weight: 700;
  color: var(--teal-on-dark);
  text-decoration: none;
}

.phone-head .back::before {
  content: "‹";
  margin-right: 8px;
  font-size: 28px;
  line-height: 1;
}

.phone-head h1 {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 750;
}

.phone-head .who {
  margin-top: 4px;
  font-size: 15px;
  color: var(--dim-on-dark);
}

.phone-bar .mine {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 4px 0 16px;
  font-weight: 700;
  color: var(--teal-on-dark);
  text-decoration: none;
}

.phone .tabs {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  background: var(--ink);
  border-top: 1px solid var(--ink-soft);
}

.phone .tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dim-on-dark);
  text-decoration: none;
}

.phone .tabs a[aria-current="page"] {
  font-weight: 700;
  color: var(--paper);
  box-shadow: inset 0 -4px 0 var(--teal-on-dark);
}

.phone main {
  display: flex;
  flex-direction: column;
  padding: 28px 16px;
}

.phone .lead {
  font-size: 21px;
  font-weight: 750;
  line-height: 1.3;
}

.phone .lead + .soft {
  margin-top: 8px;
  font-size: 17px;
}

.secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 60px;
  margin-top: 28px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 9px;
  text-decoration: none;
}

/* --- The desktop shell: the client's and management's ------------------ */
body.desktop {
  min-height: 100vh;
  font-size: 14px;
  background: var(--ground);
}

.desk-bar {
  display: flex;
  align-items: center;
  column-gap: 28px;
  height: 54px;
  box-sizing: border-box;
  padding: 0 32px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.desk-bar img {
  height: 30px;
  width: auto;
}

.desk-bar .wordmark {
  font-size: 17px;
  color: var(--teal);
}

.desk-bar .party {
  padding-left: 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  border-left: 1px solid var(--line);
}

.desk-bar .tabs {
  display: flex;
  align-self: stretch;
  flex: 1;
  gap: 4px;
}

.desk-bar .tabs :is(a, button) {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 12px;
  font: inherit;
  font-weight: 500;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.desk-bar .tabs :is(a, button)[aria-current="page"] {
  font-weight: 650;
  color: var(--ink);
  border-bottom-color: var(--teal);
}

.desk-bar .who {
  color: var(--ink-soft);
}

.desk-bar .mine {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.desktop main {
  max-width: 1200px;
  padding: 32px;
}

.desktop .card {
  box-sizing: border-box;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  max-width: 560px;
  padding: 28px 32px;
}

.desktop .card h1 {
  font-size: 21px;
  line-height: 1.25;
  font-weight: 650;
}

.desktop .card p {
  margin-top: 4px;
}

.desktop .card h1 + p {
  margin-top: 12px;
}

.desktop .card p:last-child {
  margin-top: 20px;
  font-weight: 600;
}

/* --- Lists, gate forms and the pinned act (O3, O4, O13) -------------------- */
.band {
  margin: 0 -16px;
  padding: 14px 16px 12px;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--band);
}

.phone main > .band:first-child,
.phone .gate-form > .band:first-child,
.phone main > section:first-child > .band:first-child {
  margin-top: -28px;
}

.rows {
  margin: 0 -16px;
  padding: 0;
  list-style: none;
}

.rows li {
  border-bottom: 1px solid var(--hairline);
}

.rows .row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 60px;
  padding: 14px 16px;
  color: var(--ink);
  text-decoration: none;
}

.rows strong {
  font-size: 19px;
  font-weight: 750;
}

.rows .waits {
  background: var(--medium-wash);
  box-shadow: inset 4px 0 0 var(--medium-bar);
}

.rows .short {
  font-weight: 650;
  color: var(--medium-strong);
}

.lines .row {
  flex-direction: row;
  gap: 18px;
}

.lines .position {
  padding-top: 3px;
  min-width: 1.6em;
  font-weight: 700;
}

.lines span {
  display: flex;
  flex-direction: column;
}

.lines .identification {
  font-weight: 700;
}

.facts {
  margin: 0 -16px;
}

.facts .fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--hairline);
}

.facts dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.empty {
  padding: 12px 0 28px;
}

.aside {
  margin-top: 36px;
}

.aside h2 {
  margin: 0 0 6px;
  font-size: 19px;
}

.aside .secondary {
  width: 100%;
  margin-top: 16px;
  font: inherit;
  font-weight: 700;
}

.gate-form {
  display: flex;
  flex-direction: column;
}

.gate-field {
  margin: 0 -16px;
  padding: 18px 16px;
  border: 0;
  border-bottom: 1px solid var(--hairline);
}

.gate-field legend,
.gate-field label:not(.option) {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 10px;
  padding: 0;
  font-size: 17px;
  font-weight: 700;
}

.gate-field legend {
  float: left;
}

.gate-field legend + * {
  clear: both;
}

.gate-field .optional {
  font-weight: 400;
  color: var(--muted);
}

.gate-field .hint {
  clear: both;
  margin: -4px 0 10px;
  font-size: 15px;
  color: var(--ink-soft);
}

.gate-field .field-note {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-soft);
}

.gate-field input[type="text"],
.gate-field input[type="date"] {
  box-sizing: border-box;
  width: 100%;
  height: 60px;
  padding: 0 14px;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--edge);
  border-radius: 9px;
}

.gate-field input[aria-invalid="true"] {
  border-color: var(--high);
}

.with-unit {
  position: relative;
}

.with-unit .unit {
  position: absolute;
  top: 18px;
  right: 16px;
  font-weight: 700;
}

.option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 14px;
  min-height: 60px;
  margin-top: 10px;
  padding: 8px 14px;
  box-sizing: border-box;
  border: 2px solid var(--edge);
  border-radius: 9px;
}

.option:has(input:checked) {
  background: var(--select-tint);
  border-color: var(--teal);
}

.option input {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--teal);
}

.option .option-name {
  font-size: 18px;
  font-weight: 700;
}

.option .option-note {
  grid-column: 2;
  color: var(--ink-soft);
}

.ends {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.ends .option {
  grid-template-columns: 1fr;
  justify-items: center;
  row-gap: 4px;
  margin-top: 0;
  padding: 8px 4px;
}

.problem {
  margin-top: 8px;
  font-weight: 650;
  color: var(--high-strong);
}

.pinned {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px -16px -28px;
  padding: 16px;
  background: var(--paper);
  border-top: 1px solid var(--hairline);
}

.pinned .primary,
.pinned .secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font: inherit;
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
}

.pinned .primary {
  height: 64px;
}

.secondary.add {
  margin-top: 16px;
}

/* --- The operator's jobs and items (O2, O5, O6) --------------------------- */
.rows .row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.rows .row-state,
.rows .progress {
  font-weight: 650;
}

.phone .status {
  margin: -28px -16px 0;
  padding: 16px;
  font-size: 19px;
  font-weight: 700;
  border-bottom: 1px solid var(--hairline);
}

.instructions {
  font-style: italic;
}

.phone .status + .instructions {
  margin: 0 -16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
}

.rows li > .resume {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 0 16px 16px;
  padding: 10px 16px;
  font-weight: 400;
}

.resume strong {
  font-size: 18px;
}

.rows .recorded::before,
.step-state.recorded::before {
  content: "✓ ";
  font-weight: 700;
}

/* --- The step screen (O7) ------------------------------------------------ */
/* The record a step's kind asks for: a joint's connection, a piece read back. */
.connections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.connections .option {
  margin-top: 0;
}

.joint-record.apart {
  background: var(--medium-wash);
  box-shadow: inset 4px 0 0 var(--medium-bar);
}

.joint-record.apart .hint {
  font-weight: 650;
  color: var(--medium-strong);
}

.read-back {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.step-description {
  margin: -28px -16px 0;
  padding: 16px;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--hairline);
}

.step-state {
  margin: 0 -16px;
  padding: 16px;
  font-size: 18px;
  font-weight: 700;
  border-bottom: 1px solid var(--hairline);
}

.phone .step-state + .gate-form > .band:first-child {
  margin-top: 0;
}

.step-state.waits {
  color: var(--medium-strong);
  background: var(--medium-wash);
  box-shadow: inset 4px 0 0 var(--medium-bar);
}

.gate-field textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--edge);
  border-radius: 9px;
}

.step-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
}

.step-nav .secondary {
  margin: 0;
  padding: 0 16px;
}

.step-nav .previous {
  justify-content: flex-start;
}

.step-nav .previous::before {
  content: "‹";
  margin-right: 10px;
}

.step-nav .next {
  justify-content: flex-end;
}

.step-nav .next::after {
  content: "›";
  margin-left: 10px;
}

.pinned .lacking {
  margin: 0;
  color: var(--ink-soft);
}

.pinned label.primary {
  cursor: pointer;
}

/* --- The entry note's evidence and seal (O3, O12) ------------------------ */
.sign-refusal {
  margin: -28px -16px 0;
}

.sign-refusal .refusal {
  margin: 0;
  padding: 14px 16px;
  border-radius: 0;
}

.sign-refusal ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sign-refusal .to-field {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 10px 16px;
  box-sizing: border-box;
  font-weight: 700;
  color: var(--high-strong);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}

.gate-field .field-label {
  display: flex;
  justify-content: space-between;
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tile {
  margin: 0;
}

.tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  background: var(--band);
}

.tile figcaption {
  margin-top: 4px;
  font-size: 15px;
  color: var(--ink-soft);
}

.tile.missing {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  margin: 0;
  padding: 8px;
  box-sizing: border-box;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  color: var(--high-strong);
  background: var(--high-wash);
  border: 2px dashed var(--high);
  border-radius: 6px;
}

.gate-field .secondary {
  width: 100%;
  margin-top: 12px;
  font: inherit;
  font-weight: 700;
}

.gate-form .secondary.add {
  margin-bottom: 16px;
}

.gate-field label.picker {
  position: relative;
  justify-content: center;
  margin-bottom: 0;
}

.picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.picker.busy {
  color: var(--muted);
  border-color: var(--muted);
}

.signature-row {
  margin: 0 -16px;
  border-bottom: 1px solid var(--hairline);
}

.signature-row button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-height: 60px;
  padding: 16px;
  font: inherit;
  text-align: left;
  color: var(--ink);
  background: none;
  border: 0;
}

.signature-row strong {
  font-size: 19px;
}

.signature-row span {
  color: var(--ink-soft);
}

.signature-row img {
  height: 64px;
}

.signature-row.refused {
  background: var(--high-wash);
  box-shadow: inset 4px 0 0 var(--high-bar);
}

.signature-row .problem {
  margin: -8px 16px 0;
  padding-bottom: 16px;
}

.receiver {
  margin: 20px 0 0;
  color: var(--ink-soft);
}

.receiver strong {
  color: var(--ink);
}

.received {
  display: flex;
  flex-direction: column;
  margin: 0 -16px;
  padding: 16px;
}

.received strong {
  font-size: 18px;
}

.facts .drawn-signature {
  height: 64px;
}

.signature-pad {
  position: relative;
  height: 240px;
  box-sizing: border-box;
  border: 2px dashed var(--edge);
  border-radius: 9px;
}

.signature-pad::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: 56px;
  left: 20px;
  border-top: 1px solid var(--rule);
  pointer-events: none;
}

.signature-pad canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  color: var(--ink);
  touch-action: none;
}

.signature-pad .prompt {
  position: absolute;
  right: 0;
  bottom: 66px;
  left: 0;
  text-align: center;
  color: var(--muted);
  pointer-events: none;
}

.signature-pad img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.drawn .signature-pad .prompt {
  visibility: hidden;
}

.desktop main > .subtitle {
  margin: 4px 0 16px;
}

/* --- S2, Mi cuenta: full-bleed bands on the phone, cards on the desktop -- */
.account h2 {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.account .facts {
  margin: 0;
}

.account .facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.account .facts dt {
  color: var(--ink-soft);
}

.account .facts dd {
  margin: 0;
  min-width: 0;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.account .done,
.account .refusal {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account .done {
  background: var(--select-tint);
}

.account .refusal span {
  font-weight: 400;
  color: var(--ink);
}

.account .field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.account .field input {
  box-sizing: border-box;
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--edge);
  border-radius: 9px;
}

.account .field input[aria-invalid="true"] {
  border-color: var(--high);
}

.account .field-error {
  margin-top: 8px;
  font-weight: 700;
  color: var(--high-strong);
}

.account .mail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account .mail label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.account .mail input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--teal);
}

.account .primary {
  margin-top: 0;
}

.account .secondary {
  margin-top: 0;
  padding: 0 20px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.phone main:has(> .account) {
  padding: 0;
}

.phone .account {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 135px);
}

.phone .account h2 {
  padding: 14px 16px 10px;
  background: var(--band);
}

.phone .account .facts div {
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
}

.phone .account .done,
.phone .account .refusal {
  margin: 0;
  padding: 14px 16px;
  border-radius: 0;
}

.phone .account .password {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px;
  border-bottom: 1px solid var(--hairline);
}

.phone .account .field input {
  height: 60px;
  padding: 0 14px;
  font-size: 18px;
}

.phone .account .no-mail {
  padding: 16px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--hairline);
}

.phone .account .log-out {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  padding: 24px 16px 28px;
}

.desktop main:has(> .account) {
  max-width: 680px;
  margin: 0 auto;
}

.desktop .account h1 {
  margin-bottom: 8px;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 650;
}

.desktop .account section {
  margin-top: 28px;
}

.desktop .account h2 {
  margin-bottom: 12px;
}

.desktop .account .facts,
.desktop .account .mail,
.desktop .account .password {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.desktop .account .facts div {
  padding: 14px 24px;
}

.desktop .account .facts div + div {
  border-top: 1px solid var(--line);
}

.desktop .account .done {
  margin-top: 16px;
  padding: 14px 20px;
  border-radius: 8px;
}

.desktop .account .mail,
.desktop .account .password {
  padding: 20px 24px;
}

.desktop .account .password {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.desktop .account .field input {
  height: 44px;
  padding: 0 12px;
  font-size: 15px;
  border-width: 1.5px;
  border-radius: 8px;
}

.desktop .account .secondary,
.desktop .account .primary {
  align-self: flex-start;
  height: 44px;
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
  border-width: 1.5px;
  border-radius: 8px;
}

.desktop .account .log-out {
  margin-top: 28px;
}

/* --- A desktop page: its way back, heading, acts, tables and forms ------- */
.desktop main > .back {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.desktop main > .back::before {
  content: "← ";
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.desktop .page-head h1 {
  font-size: 21px;
  line-height: 1.25;
  font-weight: 650;
}

.desktop .page-head h1 .soft {
  font-weight: 500;
  color: var(--muted);
}

.desktop .page-head ~ h2 {
  margin: 32px 0 12px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.desktop .page-head ~ h2 .count {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.desktop .act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 40px;
  margin: 0;
  padding: 0 16px;
  font: inherit;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
  background: var(--paper);
  border: 1.5px solid var(--ink-soft);
  border-radius: 9px;
  cursor: pointer;
}

.desktop .act.primary {
  color: var(--paper);
  background: var(--teal);
  border: 0;
}

.desktop .act.primary:hover {
  background: var(--teal-pressed);
}

.desktop .act.danger {
  color: var(--high);
  border-color: var(--high);
}

.subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.desktop .subtabs a {
  margin-bottom: -1px;
  padding: 10px 12px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.desktop .subtabs a[aria-current="page"] {
  font-weight: 650;
  color: var(--ink);
  border-bottom-color: var(--teal);
}

table.list {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.list th {
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--ground);
  border-bottom: 1px solid var(--line);
}

.list td {
  padding: 12px 14px;
  vertical-align: middle;
  border-top: 1px solid var(--line);
}

.list tr:first-child td {
  border-top: 0;
}

.list :is(td, th):first-child {
  padding-left: 20px;
}

.list .name {
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.desktop .list tr.retired td,
.desktop .list td.soft {
  color: var(--muted);
}

.list .acts {
  text-align: right;
}

.list td.acts form {
  display: inline;
}

.list td.acts .act {
  margin-left: 8px;
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 7px;
}

.footnote {
  margin-top: 12px;
  color: var(--muted);
}

.desktop .sheet {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.desktop .sheet.adding {
  flex-direction: row;
  align-items: flex-end;
  max-width: none;
  margin-top: 20px;
}

.sheet .field,
.sheet fieldset {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.sheet.adding .field {
  flex: 1;
}

.sheet .field label,
.sheet legend {
  padding: 0;
  font-weight: 600;
}

.desktop .sheet .field input {
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 8px;
}

.sheet .field input.short {
  max-width: 240px;
}

.sheet .field input::placeholder {
  color: var(--muted);
}

.sheet .field input[aria-invalid="true"] {
  border: 2px solid var(--high);
}

.sheet .field-error {
  font-size: 13px;
  font-weight: 600;
  color: var(--high);
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 6px;
}

.desktop .sheet .choice input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--teal);
}

.sheet .choice > span {
  display: flex;
  flex-direction: column;
}

.sheet .buttons {
  display: flex;
  gap: 12px;
}

.desktop .page-head + .refusal {
  margin-bottom: 16px;
}

/* --- M10, Administración's users: a password shown once ------------------ */
.shown-once {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--medium-bar);
  border-radius: 10px;
}

.desktop .shown-once h2 {
  font-size: 16px;
  font-weight: 700;
}

.desktop .shown-once .password {
  padding: 10px 16px;
  font-family: var(--type-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1.5px dashed var(--ink-soft);
  border-radius: 8px;
}

.desktop .list tr.chosen td {
  background: var(--select-tint);
}

.desktop .list tr.chosen td:first-child {
  box-shadow: inset 4px 0 0 var(--teal);
}

.list td.acts .soft {
  font-size: 12.5px;
}

.desktop div.footnote > .act {
  margin-bottom: 12px;
}

.sheet .choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.desktop .sheet .field select {
  box-sizing: border-box;
  max-width: 360px;
  height: 40px;
  padding: 0 12px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 8px;
}

.sheet .field select[aria-invalid="true"] {
  border: 2px solid var(--high);
}

.sheet .about {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: var(--band);
  border-radius: 9px;
}

/* --- M11, undelivered mail: hue spent on what needs attention ------------- */
.desktop .subtabs a .count {
  font-weight: 650;
  color: var(--high);
}

.desktop .intro {
  margin: 0 0 20px;
  color: var(--ink-soft);
}

.desktop .list tr.undelivered td {
  vertical-align: top;
  background: var(--high-wash);
}

.desktop .list tr.undelivered td:first-child {
  box-shadow: inset 4px 0 0 var(--high-bar);
}

.list tr.undelivered .soft {
  display: block;
  font-size: 12.5px;
}

.list td.error {
  font-weight: 650;
  color: var(--high);
}

.desktop .all-sent {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.desktop .all-sent h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}

.desktop .all-sent h2 + p {
  margin: 0;
  color: var(--muted);
}

/* --- Trabajos and the job order (C4, C5) ---------------------------------- */
.desktop .page-head:has(+ .lede) {
  margin-bottom: 4px;
}

.desktop .lede {
  margin-bottom: 24px;
  color: var(--muted);
}

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.desktop .filters .search,
.desktop .filters .filter,
.desktop .order .field select,
.desktop .order .field textarea {
  box-sizing: border-box;
  height: 40px;
  padding: 0 12px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 8px;
}

.desktop .filters .search {
  flex: 1;
}

.desktop .filters .search::placeholder {
  color: var(--muted);
}

.list.jobs tr.awaits td {
  background: var(--medium-wash);
}

.list.jobs tr.awaits td:first-child {
  box-shadow: inset 4px 0 0 var(--medium-bar);
}

.list.jobs tr.awaits .state {
  font-weight: 650;
  color: var(--medium);
}

.desktop .order h2 {
  margin: 28px 0 10px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.desktop .order .sheet {
  max-width: none;
}

.desktop .order .order-head {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.order .field.wide {
  grid-column: 1 / -1;
}

.desktop .order .field select {
  width: 100%;
  max-width: none;
}

.desktop .order .field textarea {
  width: 100%;
  height: auto;
  padding: 10px 12px;
  resize: vertical;
}

.order .field label .soft {
  font-weight: 400;
}

.order :is(select, input)[aria-invalid="true"] {
  border: 2px solid var(--high);
}

.desktop .order .sheet.buttons {
  flex-direction: row;
  align-items: center;
  margin-top: 24px;
}

.order .buttons .plain {
  font-weight: 600;
}

.order .buttons .danger {
  margin-left: auto;
}

/* --- O14 Stock: the lookup at the rack and a component's page ------------ */
.lookup {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -28px -16px 0;
  padding: 16px;
  border-bottom: 1px solid var(--hairline);
}

.lookup-client,
.lookup-query {
  box-sizing: border-box;
  height: 60px;
  padding: 0 14px;
  font: inherit;
  font-size: 18px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--edge);
  border-radius: 9px;
}

.lookup-client {
  flex: 0 1 40%;
  min-width: 0;
  font-weight: 700;
}

.lookup-query {
  flex: 1 1 50%;
  min-width: 0;
}

.lookup-act {
  flex-basis: 100%;
  margin: 0;
  min-height: 60px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.lookup-hint {
  margin: 12px 0 20px;
}

.found-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.found-state {
  font-weight: 600;
  color: var(--ink-soft);
}

.found .identification {
  font-size: 18px;
  font-weight: 750;
}

.facts .identified {
  flex-direction: column;
  gap: 4px;
}

.facts .identified dd {
  font-size: 26px;
  font-weight: 750;
  text-align: left;
}

.whereabouts {
  margin: 0 -16px 20px;
  padding: 0;
  list-style: none;
}

.whereabouts li {
  padding: 16px 16px 16px 44px;
  box-shadow: inset 22px 0 0 -20px var(--rule);
}

.whereabouts .row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
}

.arrived-on {
  font-weight: 400;
  color: var(--ink-soft);
}

.whereabouts .not-yet {
  color: var(--ink-soft);
}

/* --- The client's stock, component and remito (C2, C3, C12) ------------------ */
.desktop .pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.desktop .pills a {
  padding: 7px 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 999px;
}

.desktop .pills a[aria-current="true"] {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.desktop .list .identification {
  font-weight: 650;
}

.desktop .list .figure {
  text-align: right;
  white-space: nowrap;
}

.desktop .sides {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.desktop .sides h2 {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.desktop .sides h2 .count {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.desktop .sides aside h2 ~ h2 {
  margin-top: 28px;
}

.desktop .panel {
  margin: 0 0 16px;
  padding: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.desktop .ficha {
  margin: 0;
}

.desktop .ficha > * {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
}

.desktop .ficha > * + * {
  border-top: 1px solid var(--line);
}

.desktop .ficha dt {
  color: var(--ink-soft);
}

.desktop .ficha dd {
  margin: 0;
  font-weight: 650;
  text-align: right;
}

.desktop .life {
  list-style: none;
}

.desktop .life li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
}

.desktop .life li + li {
  border-top: 1px solid var(--line);
}

.desktop .photographs {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
}

.desktop .thumbs {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.desktop .thumb {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.desktop .thumb img {
  width: 88px;
  height: 66px;
  object-fit: cover;
  background: var(--placeholder);
  border-radius: 6px;
}

.desktop .signatures {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
}

.desktop .signatures .drawn-signature {
  max-width: 100%;
  height: 96px;
  margin-bottom: 12px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.desktop .signatures .signer {
  font-size: 15px;
  font-weight: 650;
}

.desktop .pdf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  text-decoration: none;
}

.desktop .pdf-badge {
  padding: 1px 5px;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-soft);
  border: 1.5px solid var(--ink-soft);
  border-radius: 4px;
}

.desktop .page-head:has(+ .subtitle) {
  margin-bottom: 0;
}

.desktop .page-head + .subtitle {
  margin-bottom: 28px;
}

/* --- M7 and M8, management's Remitos and Stock ---------------------------- */
.desktop .page-head .client-tag {
  padding: 2px 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  vertical-align: middle;
  background: var(--band);
  border-radius: 5px;
}

.desktop .unwanted {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px 20px;
}

.desktop .sides .sheet {
  max-width: none;
}

.desktop .sheet .field textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 8px;
}

.sheet .field textarea[aria-invalid="true"] {
  border: 2px solid var(--high);
}

.sheet .about ul {
  margin: 0;
  padding-left: 20px;
}

/* A voided note: the ink stamp by its number and the ruled notice (C12, M7). */
.stamp {
  display: inline-block;
  padding: 1px 8px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--ink);
  vertical-align: middle;
  border: 2px solid var(--ink);
  transform: rotate(-3deg);
}

.void-notice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 24px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
}

.void-notice .stamp {
  margin-right: 6px;
}

/* C11: a document's stamp beside its PDF, the remito still unsigned in hue. */
.list.documents .pdf + .stamp {
  margin-left: 10px;
}

.list.documents .awaiting {
  font-weight: 650;
  color: var(--medium);
}

/* A signed note's rows registered in error, under its lines. */
.footnotes {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--ink-soft);
}

/* O4's correction, which management takes on the desktop too (M8). */
.desktop .gate-form {
  max-width: 720px;
}

.desktop .gate-form .pinned {
  margin: 24px 0 0;
  border-radius: 10px;
}

/* --- C5's items and C6, the picker: pieces in joining order ------------- */
.desktop .order .item {
  margin-bottom: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.desktop .item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--ground);
  border-bottom: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
}

.desktop .item-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.desktop .item-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 24px 24px;
}

.desktop .item-body > .field {
  align-self: stretch;
}

.desktop .order button.link {
  padding: 0;
  font: inherit;
  font-weight: 650;
  color: var(--teal);
  background: none;
  border: 0;
  cursor: pointer;
}

.desktop .item-head button.link {
  font-size: 14px;
}

.desktop :is(.pieces, .enrosque) {
  align-self: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.desktop :is(.pieces, .enrosque) .piece {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
}

.desktop .ordinal {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 13px;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
}

.desktop .piece-what {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.piece-what .piece-about {
  font-size: 13px;
}

.desktop .piece-acts {
  display: flex;
  gap: 8px;
}

.desktop .piece-acts button.act {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 7px;
}

.desktop .joint {
  margin-left: 12px;
  padding: 6px 0 6px 25px;
  font-size: 13px;
  color: var(--ink-soft);
  border-left: 2px dashed var(--rule);
}

.desktop .joint.apart {
  font-weight: 650;
  color: var(--medium);
  border-left-color: var(--medium-bar);
}

.desktop .order .add-item {
  margin-top: 4px;
}

.desktop .picking .list th.ticks {
  width: 56px;
}

.desktop .tick {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.desktop .tick::before {
  content: "";
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  background: var(--paper);
  border: 2px solid var(--edge);
  border-radius: 5px;
}

.desktop .tick.ticked::before {
  content: "✓";
  font-size: 15px;
  font-weight: 800;
  line-height: 18px;
  color: var(--paper);
  text-align: center;
  background: var(--teal);
  border-color: var(--teal);
}

.desktop .enrosque-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
}

.desktop .enrosque-panel form .act {
  width: 100%;
}

.desktop .enrosque-panel .plain {
  align-self: center;
  font-weight: 650;
}

.desktop .list .held-by {
  font-size: 12.5px;
  white-space: nowrap;
}

/* C7: the job's path, its current state marked; past ones in teal. */
.desktop .job-path {
  padding: 14px 20px;
}

.desktop .path {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.desktop .path .step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 0;
  font-size: 13px;
  color: var(--muted);
}

.desktop .path .step::after {
  content: "";
  width: 18px;
  height: 1px;
  margin-left: 6px;
  background: var(--rule);
}

.desktop .path .step:last-child::after {
  display: none;
}

.desktop .path .dot {
  flex: none;
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--edge);
  border-radius: 50%;
}

.desktop .path .done {
  color: var(--teal);
}

.desktop .path .done .dot {
  background: var(--teal);
  border-color: var(--teal);
}

.desktop .path .now {
  font-weight: 700;
  color: var(--ink);
}

.desktop .path .now .dot {
  width: 14px;
  height: 14px;
  background: var(--teal);
  border: 3px solid var(--select-tint);
  box-shadow: 0 0 0 1.5px var(--teal);
}

.desktop .sides section .list + h2,
.desktop .sides section .panel + h2 {
  margin-top: 28px;
}

.desktop .documents {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 14px 20px;
  list-style: none;
}

.desktop .document {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

/* C10: the purchase orders a later upload replaced, each still readable. */
.desktop .replaced {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 14px 20px;
  list-style: none;
}

.desktop .replaced-upload {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.desktop .acts {
  list-style: none;
}

.desktop .acts .logged {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 20px;
}

.desktop .acts .logged + .logged {
  border-top: 1px solid var(--line);
}

.desktop .ficha .below {
  display: block;
  font-weight: 400;
}

/* --- M2/M13: management's review, the joints it must look at in the medium hue */
.desktop .notice {
  margin: 0 0 24px;
  padding: 14px 20px;
  color: var(--ink);
  background: var(--medium-tint);
  border-radius: 10px;
}

.desktop :is(.notice-title, .notice-line) {
  margin: 0;
}

.desktop .notice-title {
  margin-bottom: 4px;
  font-weight: 700;
  color: var(--medium-strong);
}

.desktop .review .item {
  margin-bottom: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.desktop .review .item.flagged {
  background: var(--medium-wash);
  box-shadow: inset 4px 0 0 var(--medium-bar);
}

.desktop .review .item.flagged .item-head {
  background: none;
}

.desktop .review .item:last-of-type {
  margin-bottom: 28px;
}

.desktop .review-acts {
  padding: 18px 24px;
}

.desktop .review-acts .buttons {
  display: flex;
  gap: 12px;
}

.desktop .what-follows {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
}

/* C5 on a signed order: what saving does, said before the edit. */
.warning {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 24px;
  padding: 12px 16px;
  background: var(--medium-tint);
  border-radius: 8px;
}

.warning strong {
  color: var(--medium-strong);
}

/* An order sent back: management's note, waiting on the client (C5, M13). */
.sent-back {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 24px;
  padding: 12px 16px;
  background: var(--high-tint);
  border-radius: 8px;
}

.sent-back strong {
  color: var(--high-strong);
}

.list.jobs tr.sent-back td {
  background: var(--high-wash);
}

.list.jobs tr.sent-back td:first-child {
  box-shadow: inset 4px 0 0 var(--high-bar);
}

.list.jobs tr.sent-back .state {
  font-weight: 650;
  color: var(--high);
}

/* C7 of a cancelled job: who ended it and why, on the band. */
.ended {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 24px;
  padding: 12px 16px;
  background: var(--band);
  border-radius: 8px;
}

/* Cancelling is a section on the page that offers it (C5, C7). */
.cancelling {
  max-width: 760px;
  margin-top: 32px;
}

.desktop .cancelling .sheet textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}

.head-acts {
  display: flex;
  align-items: center;
  gap: 16px;
}

.desktop .head-acts .plain {
  font-weight: 600;
}

/* M3: the band over a client's shell, then the client's own sections. */
.viewing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 20px;
  row-gap: 6px;
  padding: 10px 32px;
  background: var(--select-tint);
  border-bottom: 2px solid var(--teal);
}

.viewing .leave {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.desktop .viewing button.link {
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  background: none;
  border: 0;
  cursor: pointer;
}

.desktop .shell-tabs {
  max-width: 1200px;
  margin: 0;
  padding: 16px 32px 0;
  box-sizing: border-box;
}

.panel.clients {
  margin: 0;
  padding: 0 24px;
  list-style: none;
}

.panel.clients .client {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.panel.clients .client + .client {
  border-top: 1px solid var(--hairline);
}

.panel.clients .client p {
  margin: 2px 0;
}

.view-as {
  display: inline;
  margin: 0;
}

.desktop .view-as button.link {
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--teal);
  text-decoration: underline;
  background: none;
  border: 0;
  cursor: pointer;
}

/* --- A rejection (O6, O7, O8): the one act painted on the high hue ------- */
.secondary.reject {
  color: var(--high-strong);
  border-color: var(--high-strong);
}

.primary.reject,
.primary.reject:active {
  background: var(--high-strong);
}

.failed {
  font-weight: 650;
  color: var(--high-strong);
}

.released {
  font-weight: 650;
}

.ended.rejected {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: -28px -16px 0;
  padding: 16px;
  background: var(--high-tint);
}

.ended.rejected strong {
  font-size: 21px;
  color: var(--high-strong);
}

/* O6 after a second make-up: one tab per attempt, the one read underlined. */
.phone .subtabs.attempts {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin: -28px -16px 16px;
}

.phone .subtabs.attempts a {
  padding: 14px 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.phone .subtabs.attempts a[aria-current="page"] {
  font-weight: 700;
  color: var(--ink);
  border-bottom-color: var(--teal);
}

.phone .subtabs.attempts + .ended.rejected {
  margin-top: -16px;
}

.ended-next {
  margin: 0 -16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
}

.rows .rejected-here {
  background: var(--high-wash);
  box-shadow: inset 4px 0 0 var(--high-bar);
}

.step-state.rejected {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--high-wash);
  box-shadow: inset 4px 0 0 var(--high-bar);
}

.step-state.rejected > span {
  font-size: 16px;
  font-weight: 400;
}

.step-state.rejected > strong:first-child {
  color: var(--high-strong);
}

.step-state.rejected .field-label {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-soft);
}

.gate-field label.tick {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 18px;
  min-height: 60px;
  margin: 0 0 12px;
  padding: 12px 16px;
  font-weight: 400;
  border: 2px solid var(--edge);
  border-radius: 9px;
}

.gate-field label.tick.refused {
  border-color: var(--high);
}

.phone .reject-form .tick input {
  width: 26px;
  height: 26px;
}

.gate-field label.tick span {
  display: flex;
  flex-direction: column;
}

.phone .reject-form textarea[aria-invalid="true"] {
  border-color: var(--high);
}

.rows .progress.rejected,
.rows .progress .failed {
  color: var(--high-strong);
}

/* --- An outgoing note's lines (M7, O11): grouped, each with its act ------- */
.out-group {
  margin: 0;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--ground);
  border-top: 1px solid var(--line);
}

.out-group:first-child {
  border-top: 0;
}

.out-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.out-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.out-what {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.out-piece {
  padding-left: 10px;
  border-left: 3px solid var(--line);
}

.out-none {
  margin: 0;
  padding: 14px 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.phone .lines-out {
  margin: 0 -16px;
}

.phone .out-line {
  flex-direction: column;
  align-items: stretch;
}

.phone .out-line .secondary {
  width: 100%;
  margin-top: 4px;
}

.phone .outgoing > form .secondary {
  width: 100%;
  margin-top: 16px;
}

.desktop .outgoing .about {
  margin: 0;
  padding: 12px 20px 16px;
}

.phone main > .secondary.add {
  margin-bottom: 20px;
}

/* C7's rejected item row and C8, the client's item: its steps, the
   rejection on the high tint, the pieces and the records at the side. */
.desktop .list tr.rejected td {
  background: var(--high-wash);
}

.desktop .list tr.rejected td:first-child {
  box-shadow: inset 4px 0 0 var(--high-bar);
}

.desktop .list.steps .untouched {
  font-weight: 400;
  color: var(--ink-soft);
}

.desktop .list.steps .thumbs {
  margin-top: 0;
}

.desktop .rejection-note {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 820px;
  margin: 0 0 28px;
  padding: 16px 20px;
  background: var(--high-tint);
  border-radius: 10px;
}

.desktop .rejection-note > strong {
  color: var(--high-strong);
}

.desktop .rejection-note .small {
  font-size: 13.5px;
}

.desktop .ordinal.failed {
  background: var(--high-strong);
}

.desktop .panel .pieces {
  padding: 12px 20px;
}

.desktop .panel .said {
  margin: 0;
  padding: 16px 20px;
}

.desktop .ficha .pdf + .soft {
  align-self: center;
}

/* O9: how each item ended, counted; an item still worked on the high hue. */
.tally .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
}

.tally-what {
  display: flex;
  flex-direction: column;
}

.tally-count {
  font-size: 21px;
}

.tally .lacking {
  background: var(--high-wash);
  box-shadow: inset 4px 0 0 var(--high-bar);
}

.tally .lacking > :not(.tally-what, .tally-count) {
  grid-column: 1 / -1;
}

.locked {
  padding: 14px 16px;
}

/* C9: the remito de trabajo as it prints, then the client user's signature. */
.desktop .remito {
  overflow: hidden;
}

.desktop .remito-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.desktop .remito-head .kind {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.desktop .remito-head .number {
  font-size: 22px;
}

.desktop .remito .list {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.desktop .remito .pending {
  color: var(--medium-strong);
}

.desktop .signing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 18px 20px;
}

.desktop .signer-as {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* O11's La salida: the handover's two answers side by side, each with its
   line, the recipient asked for only on a delivery. */
.salida .handover {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.salida .handover .option {
  margin-top: 0;
}

.salida .when-pickup,
.salida .when-delivery,
.salida:has(input[value="retiro"]:checked) .recipient {
  display: none;
}

.salida:has(input[value="retiro"]:checked) .when-pickup,
.salida:has(input[value="entrega"]:checked) .when-delivery {
  display: block;
}

.signature-pad img.stored {
  position: absolute;
  inset: 0;
}

.drawn .signature-pad img.stored {
  visibility: hidden;
}

/* C2 *Entregados*: each outgoing note heads what left on it, its PDF at the right. */
.desktop .left-on .left-on-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  text-transform: none;
  letter-spacing: 0;
}
.desktop .left-on h2 span {
  font-size: 15px;
  font-weight: 650;
}

/* A drawn signature among the facts on the desktop: as wide as its cell. */
.desktop .ficha .drawn-signature {
  max-width: 220px;
  height: 64px;
  object-fit: contain;
}

/* M1, management's Inicio: Pendientes in one panel grouped under heads, the
   activity by day beside En la base and Esperando al cliente. */
.desktop :is(.pending, .held, .activity) {
  list-style: none;
  overflow: hidden;
}

.desktop .pending .group-head,
.desktop .activity .day {
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink-soft);
  background: var(--ground);
  border-bottom: 1px solid var(--line);
}

.desktop .pending .group-head a {
  color: inherit;
}

.desktop .pending .awaits {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.desktop .pending .awaits:last-child,
.desktop .activity li:last-child {
  border-bottom: 0;
}

.desktop .awaited {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.desktop .job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.desktop .job-head strong {
  font-size: 17px;
}

.desktop :is(.job-head, .held) .client-tag {
  margin-right: 8px;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--band);
  border-radius: 5px;
}

.desktop .awaits .waits {
  font-weight: 650;
  color: var(--medium-strong);
}

.desktop .mail-acts {
  display: flex;
  gap: 12px;
}

.desktop .nothing-pending {
  padding: 20px 28px;
}

.desktop .nothing-pending strong {
  font-size: 17px;
}

.desktop .held .row {
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 20px;
  color: var(--ink);
  text-decoration: none;
}

.desktop .held .row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.desktop .held .more {
  display: block;
  padding: 14px 20px;
  font-weight: 650;
  text-decoration: none;
}

.desktop .activity li:not(.day) {
  display: grid;
  grid-template-columns: 56px 160px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.desktop .pending + .sides,
.desktop .nothing-pending + .sides {
  margin-top: 36px;
}

.desktop .sides h2 .count {
  text-transform: none;
}

/* C1, the client's Inicio: Pendientes, each row with its one act; Actividad
   and En FJF beside it as M1 draws them, without a client column. */
.desktop .home-awaiting {
  margin: 0;
  padding: 0;
  list-style: none;
}

.desktop .home-awaiting + .sides {
  margin-top: 36px;
}

.desktop .home-awaiting .awaits {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
}

.desktop .home-awaiting .awaits + .awaits {
  border-top: 1px solid var(--line);
}

.desktop .home-awaiting .awaits p {
  margin: 4px 0 0;
}

/* Only the line saying what the row waits for carries the hue. */
.desktop .home-awaiting .high {
  font-weight: 650;
  color: var(--high);
}

.desktop .home-awaiting .medium {
  font-weight: 650;
  color: var(--medium);
}

.desktop .home-awaiting p.said {
  max-width: 640px;
  margin-top: 10px;
  padding: 10px 16px;
  color: var(--ink);
  background: var(--high-tint);
  border-radius: 8px;
}

.desktop .home-awaiting .documents-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
}

.desktop .activity.one-client li:not(.day) {
  grid-template-columns: 56px minmax(0, 1fr);
}

/* M3's picker: how many of the client's rows wait on it. */
.desktop .panel.clients strong.awaits {
  font-weight: 650;
  color: var(--medium);
}
