:root {
  --bg: #f5f7f7;
  --surface: #ffffff;
  --surface-strong: #fdf6f2;
  --line: #d8dfdf;
  --line-strong: #b9c5c5;
  --text: #172427;
  --muted: #637477;
  --accent: #e94718;
  --accent-dark: #b73312;
  --teal: #08756f;
  --danger: #dc281f;
  --shadow: 0 18px 42px rgba(23, 36, 39, 0.1);
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

.native-startup-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #050607;
  opacity: 1;
  transition: opacity 220ms ease;
}

.native-startup-intro.is-dismissing {
  opacity: 0;
}

.native-startup-intro video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050607;
}

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

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

.filter-button {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--line);
}

.filter-button:hover {
  background: #f3f7f7;
}

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

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

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-panel {
  width: min(100%, 430px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 30px;
}

.login-logo {
  display: block;
  width: min(260px, 100%);
  height: auto;
  margin: 0 auto 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1.1;
}

.login-copy {
  color: var(--muted);
  margin-bottom: 26px;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.login-form select,
.login-form input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 0 12px;
}


/* "Mostrar PIN" sits beside the field as a secondary button, so "Entrar" is the only main button. */
.pin-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.pin-reveal {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  padding: 0 12px;
}

.pin-reveal:hover {
  background: var(--surface-strong);
}

.login-submit {
  min-height: 48px;
  margin-top: 10px;
}

.orders-view {
  min-height: 100vh;
}

.workspace-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 100vh;
}

.orders-view.is-single-order .workspace-layout {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 22px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.filter-row.is-driver-filter {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter-button {
  min-height: 44px;
  padding: 0 8px;
  font-size: 14px;
}

.filter-button.is-active {
  border-color: var(--teal);
  background: #e9f5f4;
  color: var(--teal);
}

.order-list {
  display: grid;
  gap: 12px;
}

.order-list-item {
  position: relative;
  width: 100%;
  min-height: 132px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 54px;
  grid-template-rows: auto minmax(72px, 1fr);
  align-items: center;
  gap: 12px;
  text-align: left;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.order-list-item:hover {
  border-color: var(--accent);
  background: var(--surface-strong);
}

.order-list-item.is-active {
  border-color: var(--accent);
  background: linear-gradient(135deg, #fff2ec 0%, #ffffff 72%);
  box-shadow: inset 6px 0 0 var(--accent), 0 14px 28px rgba(233, 71, 24, 0.18);
}

.order-list-item.is-active .assignment-van {
  background: var(--accent);
}

.order-list-item.is-own-assignment {
  border-color: var(--teal);
  background: #e9f5f4;
  box-shadow: inset 4px 0 0 var(--teal);
}

.order-list-item.is-own-assignment:hover {
  border-color: var(--accent);
  background: var(--surface-strong);
}

.order-list-item.is-own-assignment.is-active {
  border-color: var(--accent);
  background: linear-gradient(135deg, #fff2ec 0%, #ffffff 72%);
  box-shadow: inset 6px 0 0 var(--accent), 0 14px 28px rgba(233, 71, 24, 0.18);
}

.order-list-item.has-change-highlight {
  border-color: #f28a1d;
  background: #fff6e8;
  box-shadow: inset 4px 0 0 #f28a1d;
}

.order-list-item.has-change-highlight.is-active,
.order-list-item.has-change-highlight:hover {
  border-color: #d86d00;
  background: #fff0d8;
}

.assignment-status {
  position: relative;
  grid-column: 3;
  grid-row: 2;
  justify-self: center;
  align-self: center;
  width: 34px;
  height: 34px;
  display: block;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  pointer-events: none;
}

.assignment-status::before,
.assignment-status::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 3px;
  width: 28px;
  height: 5px;
  border-radius: 4px;
  background: #d72b1f;
}

.assignment-status::before {
  transform: rotate(45deg);
}

.assignment-status::after {
  transform: rotate(-45deg);
}

.order-list-item.is-equipment-sent .assignment-status::before {
  top: 2px;
  left: 10px;
  width: 14px;
  height: 25px;
  border-right: 5px solid #138044;
  border-bottom: 5px solid #138044;
  border-radius: 0 0 3px 0;
  background: transparent;
  transform: rotate(45deg);
}

.order-list-item.is-equipment-sent .assignment-status::after {
  display: none;
}

.assignment-preparer {
  grid-column: 3;
  grid-row: 2;
  align-self: end;
  justify-self: center;
  width: 54px;
  margin-top: 34px;
  color: #137742;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.assignment-preparer.is-pending {
  color: #b42318;
  overflow-wrap: normal;
}

.assignment-van {
  grid-column: 1;
  grid-row: 2;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  font-size: 25px;
  font-weight: 900;
}

.assignment-meta {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 32px;
  flex-wrap: wrap;
}

.assignment-date,
.assignment-selected-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.assignment-date {
  position: static;
  pointer-events: none;
}

.assignment-date {
  min-width: 66px;
  min-height: 24px;
  padding: 0 10px;
  background: rgba(8, 117, 111, 0.1);
  color: var(--teal);
  border: 1px solid rgba(8, 117, 111, 0.24);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.assignment-date.is-today {
  min-width: 74px;
  min-height: 32px;
  background: #d92d20;
  color: #ffffff;
  border-color: #d92d20;
  font-size: 18px;
  box-shadow: 0 10px 22px rgba(217, 45, 32, 0.28);
}

.assignment-date.is-tomorrow {
  min-width: 78px;
  min-height: 22px;
  background: #eef7f6;
  color: #08756f;
  border-color: rgba(8, 117, 111, 0.3);
  font-size: 10px;
}

.assignment-selected-label {
  min-height: 24px;
  padding: 0 10px;
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
  box-shadow: 0 8px 18px rgba(233, 71, 24, 0.22);
}

.assignment-owner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 19px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--teal);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.assignment-guide-confirmed {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #138044;
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(19, 128, 68, 0.24);
}

.assignment-team {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.assignment-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.assignment-person {
  display: block;
  overflow-wrap: anywhere;
}

.assignment-person small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.assignment-person strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.15;
}

.order-area {
  padding: 26px;
  overflow: auto;
}

.empty-state,
.service-order {
  max-width: 1040px;
  margin: 0 auto;
}

.empty-state {
  max-width: none;
  min-height: calc(100dvh - 128px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: clamp(10px, 3vw, 34px);
  text-align: center;
  background: transparent !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.empty-sleep-lottie {
  width: min(96vw, 860px);
  height: min(72dvh, 860px);
  min-height: 340px;
  filter: drop-shadow(0 22px 46px rgba(0, 0, 0, 0.18));
}

.empty-state-copy {
  max-width: min(520px, calc(100vw - 40px));
  padding: 16px 20px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.1);
}

.empty-state h2 {
  margin: 0 0 8px;
}

.empty-state p {
  color: var(--muted);
  margin: 0;
}

.service-order {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 26px;
}

.document-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  justify-items: center;
  text-align: center;
  border-bottom: 2px solid var(--text);
  padding-bottom: 20px;
  margin-bottom: 18px;
}

.document-header img {
  width: min(260px, 76%);
  max-width: 100%;
  height: auto;
}

.document-header h2 {
  margin-bottom: 5px;
  font-size: 24px;
}

.document-header p {
  margin-bottom: 3px;
  color: #334246;
  font-size: 14px;
}

.crew-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
  margin-bottom: 18px;
  scroll-margin-top: 12px;
}

.operation-actions {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.operation-actions button {
  width: 100%;
  min-height: 52px;
  text-transform: uppercase;
}

.operation-save-button {
  background: var(--teal);
}

.operation-save-button:hover {
  background: #075f5a;
}

.operation-cancel-button {
  color: #ffffff;
  background: #c43428;
}

.operation-cancel-button:hover {
  background: #a92c22;
}

.operation-cancel-button:disabled,
.operation-save-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.operation-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.crew-strip > div:not([hidden]) {
  min-width: 0;
  background: #ffffff;
  padding: 12px;
}

.crew-strip > div > span,
.detail-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.crew-strip > div > strong,
.detail-row strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.operation-assignment-control {
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--teal);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

.operation-assignment-control {
  min-height: 38px;
  padding: 6px 30px 6px 8px;
}

.operation-assignment-control:focus-visible,
.operation-guide-option:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--teal) 24%, transparent);
  outline-offset: 2px;
}

.operation-assignment-control:disabled,
.operation-guide-dropdown[data-disabled="true"] {
  cursor: wait;
  opacity: 0.68;
}

.operation-guide-dropdown {
  position: relative;
  width: 100%;
}

.operation-guide-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}

.operation-guide-toggle:hover {
  background: var(--surface);
}

.operation-guide-toggle::after {
  content: "▾";
  flex: 0 0 auto;
  color: currentColor;
  font-size: 13px;
}

.operation-guide-toggle[aria-expanded="true"]::after {
  content: "▴";
}

.operation-guide-toggle #operation-guide-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-guide-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 1px);
  right: 0;
  left: 0;
  display: grid;
  gap: 0;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  padding: 4px;
}

.operation-guide-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  padding: 7px 8px;
  cursor: pointer;
  text-align: left;
}

.operation-guide-option:hover,
.operation-guide-option:focus-visible {
  background: color-mix(in srgb, var(--line-strong) 65%, transparent);
}

.operation-guide-option[aria-selected="true"] {
  background: color-mix(in srgb, var(--line-strong) 88%, transparent);
}

.operation-guide-option-check {
  visibility: hidden;
  color: var(--teal);
  font-weight: 900;
}

.operation-guide-option[aria-selected="true"] .operation-guide-option-check {
  visibility: visible;
}

.payment-section [data-payment-option].is-payment-amount-highlighted strong {
  color: var(--danger);
}

.urgency-choice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 12, 0.72);
  padding: 18px;
}

.urgency-choice-dialog {
  width: min(100%, 440px);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  padding: 24px;
}

.urgency-choice-dialog h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.urgency-choice-dialog p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.45;
}

.urgency-choice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.urgency-choice-actions button,
.urgency-choice-cancel {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.urgency-choice-actions button {
  background: var(--accent);
  color: #071212;
}

.urgency-choice-cancel {
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.guide-inline-confirm {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  margin-top: 8px;
  border-radius: 999px;
  background: #138044;
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(19, 128, 68, 0.24);
}

.guide-confirm-section {
  border-color: rgba(19, 128, 68, 0.28);
  background: #f1fbf5;
}

.guide-confirm-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  cursor: pointer;
}

.guide-confirm-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.guide-confirm-box {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(19, 128, 68, 0.36);
  border-radius: 10px;
  background: #ffffff;
  color: transparent;
  font-size: 24px;
  font-weight: 950;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.guide-confirm-toggle input:checked + .guide-confirm-box {
  border-color: #138044;
  background: #138044;
  color: #ffffff;
  transform: scale(1.04);
}

.guide-confirm-toggle strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.guide-confirm-toggle small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.3;
}

.guide-start-section {
  border-color: rgba(0, 120, 112, 0.28);
  background: #effaf9;
}

.guide-start-button {
  width: 100%;
  position: relative;
  min-height: 96px;
  display: grid;
  gap: 5px;
  justify-items: center;
  align-content: center;
  padding: 16px 132px 16px 132px;
  color: #ffffff;
  border: 1px solid rgba(0, 106, 96, 0.24);
  border-radius: 12px;
  background: linear-gradient(135deg, #0f766e, #0b5f58);
  box-shadow: 0 16px 30px rgba(9, 95, 88, 0.14);
  text-align: center;
  overflow: hidden;
}

.guide-start-button::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.guide-start-eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  padding: 0 9px;
  text-transform: uppercase;
}

.guide-start-label {
  position: relative;
  font-size: 21px;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
}

.guide-start-button small {
  position: relative;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.guide-start-countdown {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 88px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  line-height: 1;
  padding: 13px 12px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.guide-start-countdown::after {
  content: "min";
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.guide-start-countdown.is-hidden {
  display: none;
}

.guide-start-button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: #e6edf2;
  box-shadow: none;
}

.guide-start-button:disabled small {
  color: var(--muted);
}

.guide-start-button.is-started {
  color: #ffffff;
  background: linear-gradient(135deg, #138044, #0f6b38);
  border-color: rgba(19, 128, 68, 0.45);
  cursor: default;
}

.guide-start-button.is-started:disabled {
  color: #ffffff;
}

.guide-start-button.is-started small,
.guide-start-button.is-started:disabled small {
  color: rgba(255, 255, 255, 0.9);
}

.guide-start-button.is-ready:not(:disabled) {
  background: linear-gradient(135deg, #159447, #0b6f38);
  border-color: rgba(21, 148, 71, 0.5);
  box-shadow: 0 14px 28px rgba(21, 148, 71, 0.2);
}

.guide-start-button.is-ready:not(:disabled) .guide-start-label {
  font-size: 18px;
  line-height: 1.18;
  max-width: 100%;
}

.guide-start-button.is-ready:not(:disabled) .guide-start-countdown {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.58);
}

.guide-start-button.is-error:not(:disabled) {
  background: linear-gradient(135deg, #c94032, #8f2019);
  border-color: rgba(143, 32, 25, 0.5);
  box-shadow: 0 14px 28px rgba(143, 32, 25, 0.18);
}

.guide-start-button.is-error:not(:disabled) .guide-start-eyebrow {
  background: rgba(255, 255, 255, 0.2);
}

.guide-start-button.is-countdown:disabled {
  color: #6a4211;
  background: linear-gradient(135deg, #fff3cf, #ffe2a2);
  border-color: rgba(211, 139, 25, 0.42);
  box-shadow: 0 14px 28px rgba(160, 103, 8, 0.1);
}

.guide-start-button.is-countdown:disabled .guide-start-eyebrow {
  background: rgba(171, 102, 8, 0.12);
  color: #8a560f;
}

.guide-start-button.is-countdown:disabled .guide-start-label,
.guide-start-button.is-countdown:disabled small {
  color: #66420f;
}

.guide-start-button.is-countdown:disabled .guide-start-countdown {
  border-color: rgba(138, 86, 15, 0.26);
  background: #ffffff;
  color: #8a560f;
}

.guide-start-button.is-countdown:disabled .guide-start-countdown::after {
  color: #9b6c24;
}

.guide-start-button.is-waiting:disabled {
  color: #755118;
  background: #fff6df;
  border-color: rgba(225, 164, 46, 0.58);
}

.guide-start-button.is-waiting:disabled small {
  color: #6d5a35;
}

.guide-start-button.is-waiting:disabled .guide-start-eyebrow {
  background: rgba(171, 102, 8, 0.12);
  color: #8a560f;
}

.guide-start-button.is-expired:disabled {
  color: #0f5f45;
  padding-left: 18px;
  padding-right: 18px;
  background: linear-gradient(135deg, #eefaf3, #e2f5ea);
  border-color: rgba(19, 128, 68, 0.34);
}

.guide-start-button.is-expired:disabled .guide-start-eyebrow {
  background: rgba(19, 128, 68, 0.12);
  color: #0f5f45;
}

.guide-start-button.is-expired:disabled .guide-start-label,
.guide-start-button.is-expired:disabled small {
  color: #0f5f45;
}

.operation-editable {
  min-height: 26px;
  border: 1px dashed var(--teal);
  border-radius: 6px;
  background: #f2fbf9;
  padding: 4px 6px;
  cursor: text;
}

a.operation-editable {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
}

.operation-editable:focus,
.is-operation-row [contenteditable="true"]:focus {
  outline: 3px solid rgba(0, 120, 112, 0.2);
  outline-offset: 1px;
}

.order-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 16px;
  overflow: hidden;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  background: #f8fbfb;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.section-title h3 {
  margin: 0;
  font-size: 20px;
  text-align: right;
}

.service-details-section .section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}

.service-details-section .section-title .eyebrow {
  margin: 0;
}

.service-details-section .section-title h3 {
  grid-column: 2;
  text-align: center;
}

.booking-badge {
  justify-self: end;
  align-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--teal) 45%, var(--line));
  border-radius: 999px;
  padding: 5px 10px;
  background: color-mix(in srgb, var(--teal) 12%, #fff);
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.booking-badge:empty {
  display: none;
}

.comments-section .section-title {
  justify-content: center;
}

.equipment-section .section-title {
  justify-content: center;
}

.equipment-section .section-title h3 {
  text-align: center;
}

.equipment-toggle-section {
  margin-top: 16px;
}

.equipment-toggle-button {
  width: 100%;
  min-height: 62px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(47, 112, 221, 0.24);
  border-radius: 10px;
  background: linear-gradient(135deg, #2f70dd, #2fb8bd);
  color: #ffffff;
  font-size: 22px;
  font-weight: 1000;
  padding: 12px 18px;
  box-shadow: 0 12px 26px rgba(47, 112, 221, 0.18);
}

.equipment-toggle-button small {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  color: inherit;
  font-size: 12px;
  font-weight: 1000;
  padding: 5px 10px;
  text-transform: uppercase;
}

.equipment-toggle-button:hover,
.equipment-toggle-button[aria-expanded="true"] {
  background: linear-gradient(135deg, #2584d8, #21bcae);
}

.equipment-toggle-section.is-guide-equipment .equipment-toggle-button {
  display: flex;
}

.equipment-toggle-section.is-collapsed .equipment-panel-body {
  display: none;
}

.equipment-toggle-section:not(.is-guide-equipment) {
  margin-top: 0;
}

.equipment-toggle-section:not(.is-guide-equipment) .equipment-panel-body {
  display: block;
}

.review-launch-section,
.review-qr-launch-section,
.sobre-launch-section,
.ticket-launch-section {
  border: 0;
  overflow: visible;
  background: transparent;
}

.sobre-open-button,
.ticket-open-button,
.review-qr-open-button,
.review-toggle-button {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 1000;
  padding: 12px 18px;
}

.sobre-open-button {
  background: linear-gradient(135deg, #08756f, #07655e);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(0, 120, 112, 0.2);
}

.ticket-open-button {
  background: linear-gradient(135deg, #f2b84b, #df7d1a);
  color: #1c1204;
  box-shadow: 0 12px 26px rgba(223, 125, 26, 0.2);
}

.review-toggle-button {
  background: linear-gradient(135deg, #bb6bd9, #7c3bb3);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(124, 59, 179, 0.2);
}

.review-qr-open-button {
  background: linear-gradient(135deg, #24d6c2, #078577);
  color: #071111;
  box-shadow: 0 12px 26px rgba(7, 133, 119, 0.22);
}

.review-toggle-button[data-review-enabled="false"] {
  background: linear-gradient(135deg, #dc281f, #9c1d16);
  box-shadow: 0 12px 26px rgba(220, 40, 31, 0.2);
}

.sobre-open-button small,
.review-qr-open-button small,
.review-toggle-button small {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  color: inherit;
  font-size: 12px;
  font-weight: 1000;
  padding: 5px 10px;
  text-transform: uppercase;
}

.ticket-button-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  color: inherit;
  font-size: 12px;
  font-weight: 1000;
  padding: 5px 10px;
  text-transform: uppercase;
}

.ticket-button-status.is-hidden,
.ticket-open-button.is-locked .ticket-camera-badge {
  display: none;
}

.ticket-camera-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-width: 48px;
  min-height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  color: inherit;
}

.ticket-camera-badge svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.sobre-open-button:disabled,
.ticket-open-button:disabled,
.review-qr-open-button:disabled,
.review-toggle-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.detail-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-row:not([hidden]) {
  min-height: 64px;
  background: #ffffff;
  padding: 12px 14px;
}

.is-order-field-changed {
  background: #fff4df;
  box-shadow: inset 4px 0 0 #f28a1d;
}

.detail-row-wide {
  grid-column: 1 / -1;
}

.detail-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--teal);
  text-decoration: none;
}

.detail-row a:hover {
  text-decoration: underline;
}

.equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.equipment-grid-split {
  align-items: start;
}

.equipment-column {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.equipment-row {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(42px, max-content);
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: var(--text);
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
}

.equipment-row[data-equipment-special="fin-size"] {
  grid-column: 1 / -1;
}

.equipment-row:hover:not(:disabled) {
  background: #eff8f5;
}

.equipment-row.is-readonly {
  cursor: default;
}

.equipment-row.is-readonly:hover:not(:disabled) {
  background: #ffffff;
}

.equipment-row.is-picked {
  background: #d8f1de;
  box-shadow: inset 5px 0 0 #138044;
}

.equipment-row.is-picked strong {
  border-color: #138044;
  background: #138044;
  color: #ffffff;
}

.equipment-row.is-empty {
  cursor: default;
  color: #7c8a8d;
}

.equipment-row.is-operation-row {
  cursor: default;
}

.equipment-row.is-operation-row:hover {
  background: #ffffff;
}

.equipment-row.is-operation-row span,
.equipment-row.is-operation-row strong {
  border: 1px dashed var(--teal);
  border-radius: 6px;
  background: #f2fbf9;
  color: var(--text);
  padding: 4px 6px;
  cursor: text;
}

.equipment-row span {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.equipment-row strong {
  justify-self: end;
  min-width: 42px;
  max-width: 100%;
  min-height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fbfdfd;
  padding: 0 8px;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
}

.comment-box {
  min-height: 124px;
  margin: 0;
  padding: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.prep-comment-section .section-title,
.prep-entry-section .section-title {
  justify-content: center;
}

.prep-comment-display {
  min-height: 86px;
}

.prep-comment-input {
  width: 100%;
  min-height: 118px;
  display: block;
  border: 0;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  padding: 16px;
  resize: vertical;
}

.prep-comment-input:focus {
  outline: 3px solid rgba(0, 120, 112, 0.18);
  outline-offset: -3px;
}

.prep-comment-input.is-locked,
.prep-comment-input:disabled {
  background: #f3f7f7;
  color: var(--muted);
  cursor: not-allowed;
}

.payment-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-section.is-paid-closed {
  border: 0;
  overflow: visible;
  background: transparent;
}

.payment-section.is-paid-closed .section-title {
  min-height: 62px;
  align-items: center;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #159447, #0b6f38);
  color: #ffffff;
  padding: 12px 18px;
  box-shadow: 0 12px 26px rgba(21, 148, 71, 0.18);
}

.payment-section.is-paid-closed .section-title h3 {
  margin-right: auto;
  color: inherit;
  font-size: 22px;
  text-align: left;
}

.payment-section.is-paid-closed .payment-grid {
  display: none;
}

.payment-section.is-paid-closed .payment-status[data-status="paid"] {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.payment-section.is-paid-closed .cash-paid-button {
  min-height: 34px;
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: none;
}

.payment-section.is-paid-closed .cash-paid-button:hover:not(:disabled) {
  background: #ffffff;
  color: #0f6b38;
}

.payment-method-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 4px 10px;
}

.payment-method-row span,
.payment-method-row strong {
  grid-column: 1;
}

.payment-method-edit {
  grid-column: 1;
  margin-top: 4px;
}

.cash-paid-button {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-height: 44px;
  border: 1px solid #128044;
  border-radius: 999px;
  background: #e7f8ef;
  color: #08703a;
  font-size: 13px;
  font-weight: 950;
  padding: 0 14px;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(19, 128, 68, 0.1);
}

.cash-paid-button:hover:not(:disabled) {
  background: #128044;
  color: #ffffff;
}

.cash-paid-button[data-next-status="unpaid"] {
  border-color: #b94e15;
  background: #fff1e4;
  color: #8d3508;
  box-shadow: 0 8px 18px rgba(185, 78, 21, 0.1);
}

.cash-paid-button[data-next-status="unpaid"]:hover:not(:disabled) {
  background: #b94e15;
  color: #ffffff;
}

.cash-paid-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.cash-paid-button.is-hidden {
  display: none;
}

.cash-payment-modal {
  position: fixed;
  inset: 0;
  z-index: 1220;
  display: grid;
  place-items: center;
  padding: 18px;
}

.cash-payment-modal.is-hidden {
  display: none;
}

.cash-payment-backdrop {
  position: absolute;
  inset: 0;
  min-height: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.62);
  padding: 0;
}

.cash-payment-panel {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.cash-payment-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.cash-payment-toolbar h2 {
  margin: 0;
  font-size: 24px;
}

.cash-payment-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.panel-close {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.panel-close:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.account-alert-count:not([hidden]) {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem;
  min-height: 1.5rem;
  padding-inline: .35rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--surface);
  font-size: 12px;
}

.cash-payment-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.cash-payment-summary article,
.cash-payment-selected,
.cash-payment-mix label {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  padding: 12px;
}

.cash-payment-summary span,
.cash-payment-mix label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cash-payment-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.cash-payment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.cash-payment-options.is-hidden {
  display: none;
}

.cash-payment-options button {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 1000;
}

.cash-payment-options button.is-active {
  border-color: rgba(13, 143, 129, 0.7);
  background: rgba(45, 207, 196, 0.18);
  color: var(--teal);
}

.cash-payment-selected {
  margin-bottom: 12px;
}

.cash-payment-selected span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cash-payment-selected strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}

.cash-payment-selected small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cash-payment-mix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.cash-payment-mix.is-hidden {
  display: none;
}

.cash-payment-mix input {
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 18px;
  font-weight: 950;
  padding: 8px 10px;
}

.cash-payment-actions {
  display: grid;
  gap: 8px;
}

.cash-payment-save {
  min-height: 50px;
  border-radius: 10px;
  background: linear-gradient(135deg, #08756f, #07655e);
  color: #ffffff;
  font-size: 17px;
  font-weight: 1000;
}

.cash-payment-save:disabled {
  cursor: wait;
  opacity: 0.7;
}

.cash-payment-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.payment-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid currentColor;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  padding: 0 12px;
  text-transform: uppercase;
}

.payment-status-edit {
  display: none;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  padding: 0 10px;
  text-transform: uppercase;
}

.payment-status-edit.is-visible {
  display: inline-flex;
}

.payment-status[data-status="paid"] {
  background: #e4f5eb;
  color: #137742;
}

.payment-status[data-status="unpaid"] {
  background: #fff0e6;
  color: #b04418;
}

.payment-status[data-status="partial"] {
  background: #fff7d6;
  color: #7a5b00;
}

.payment-divider {
  grid-column: 1 / -1;
  min-height: 42px;
  display: flex;
  align-items: center;
  background: #f8fbfb;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  padding: 10px 14px;
  text-transform: uppercase;
}

.payment-priority {
  box-shadow: inset 5px 0 0 var(--teal);
}

.send-action {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-bottom: 4px;
}

.send-button {
  width: 100%;
  min-height: 54px;
  border-radius: 8px;
  font-size: 18px;
  text-transform: uppercase;
}

.send-button:disabled {
  background: #cbd4d4;
  color: #657173;
  cursor: not-allowed;
}

.send-button:not(:disabled) {
  background: #138044;
}

.send-button:not(:disabled):hover {
  background: #0f6938;
}

.send-button.is-sent {
  background: #08756f;
  color: #ffffff;
}

.send-action p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.page-toolbar {
  max-width: 1040px;
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 auto 12px;
}

.prep-stats-open,
.operation-refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  background: var(--teal);
  color: #ffffff;
  padding: 0 22px;
}

.operation-refresh-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.notification-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin: 0;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
  padding: 0 18px;
}

.notification-toggle:hover {
  background: var(--surface-strong);
}

.notification-toggle.is-active {
  background: #e9f5f4;
  color: var(--teal);
  border-color: var(--teal);
}

.notification-toggle:disabled {
  cursor: default;
  opacity: 0.85;
}

.notification-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-size: 13px;
}

.notification-reset:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.notification-reset:disabled {
  cursor: default;
  opacity: 0.7;
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-size: 13px;
}

.logout-button:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.account-stats-button,
.account-service-button,
.account-bodega-button,
.account-calendar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(13, 143, 129, 0.45);
  border-radius: 999px;
  background: rgba(13, 143, 129, 0.12);
  color: var(--teal);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
}

.account-stats-button:hover,
.account-service-button:hover,
.account-bodega-button:hover,
.account-calendar-button:hover {
  background: rgba(13, 143, 129, 0.2);
}

.notification-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.notification-diagnostic {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.network-status-banner,
.app-setup-card {
  width: min(1040px, 100%);
  margin: 0 auto 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(23, 36, 39, 0.08);
}

.network-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  color: #6a4200;
  background: #fff3cf;
  border-color: #f4c86b;
  font-size: 13px;
  font-weight: 900;
}

.network-status-banner span {
  min-width: 0;
}

.network-status-banner button {
  min-height: 34px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: inherit;
  font-size: 12px;
  font-weight: 1000;
  padding: 0 12px;
  white-space: nowrap;
}

.network-status-banner button:active {
  transform: translateY(1px);
}

.network-status-banner.is-offline {
  color: #8a1c15;
  background: #fff0ed;
  border-color: #f0a49d;
}

.network-status-banner.is-pending {
  color: #075f5a;
  background: #e8fbf8;
  border-color: #77d9d1;
}

.network-status-banner.is-update {
  color: #9f1510;
  background: #fff0ed;
  border-color: #ef6c61;
  box-shadow: 0 12px 28px rgba(220, 40, 31, 0.18);
}

.sync-status-line {
  width: min(1040px, 100%);
  margin: -4px auto 12px;
  border: 1px solid #c8e5e2;
  border-radius: 999px;
  background: #f2fbfa;
  color: #075f5a;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.sync-status-line.is-offline {
  color: #8a1c15;
  background: #fff0ed;
  border-color: #f0a49d;
}

.sync-status-line.is-pending {
  color: #6a4200;
  background: #fff3cf;
  border-color: #f4c86b;
}

.sync-status-line.is-update {
  color: #9f1510;
  background: #fff0ed;
  border-color: #ef6c61;
}

.app-setup-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.app-setup-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: start;
  gap: 10px;
}

.app-setup-head h2 {
  margin: 0;
  font-size: 22px;
}

.app-setup-dismiss {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
  padding: 0;
}

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

.app-permission-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  padding: 10px;
}

.app-permission-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(13, 143, 129, 0.14);
  color: var(--teal);
  font-size: 11px;
  font-weight: 1000;
}

.app-permission-row strong,
.app-permission-row small {
  display: block;
}

.app-permission-row strong {
  font-size: 14px;
}

.app-permission-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.app-permission-row button {
  grid-column: 1 / -1;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  padding: 0 12px;
}

.app-permission-row.is-ready {
  border-color: rgba(19, 128, 68, 0.42);
  background: rgba(19, 128, 68, 0.1);
}

.app-permission-row.is-ready .app-permission-icon,
.app-permission-row.is-ready button {
  border-color: rgba(19, 128, 68, 0.45);
  background: rgba(19, 128, 68, 0.14);
  color: #137742;
}

.app-permission-row.is-blocked {
  border-color: rgba(220, 40, 31, 0.38);
  background: rgba(220, 40, 31, 0.08);
}

.app-setup-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.app-setup-status.is-update {
  color: #b21b14;
}

.account-status-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  padding: 10px;
}

.account-status-card:empty {
  display: none;
}

.account-status-card div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.account-status-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-status-card strong {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  text-align: right;
  overflow-wrap: anywhere;
}

.account-menu {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(44px, 1fr) auto minmax(44px, 1fr);
  align-items: start;
  row-gap: 8px;
  margin-left: 0;
  z-index: 20;
  pointer-events: none;
}

.assignment-tour,
.assignment-pickup {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
  min-width: 0;
}

.assignment-tour {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
}

.assignment-pickup {
  font-size: 12px;
  line-height: 1.4;
}

.account-toggle {
  grid-column: 2;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 0 16px;
  box-shadow: 0 8px 22px rgba(23, 36, 39, 0.08);
  pointer-events: auto;
}

.driver-ticket-camera {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  border: 1px solid rgba(255, 72, 44, 0.55);
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6a36, #cf1919);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(207, 25, 25, 0.18);
  padding: 0;
  pointer-events: auto;
}

.driver-ticket-camera svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.driver-ticket-camera:hover {
  filter: brightness(1.05);
}

.driver-ticket-camera:disabled {
  cursor: not-allowed;
  filter: grayscale(0.2);
  opacity: 0.45;
}

.driver-ticket-camera.is-hidden {
  display: none;
}

.account-toggle:hover,
.account-toggle[aria-expanded="true"] {
  background: var(--surface-strong);
}

.account-panel {
  grid-column: 1 / -1;
  justify-self: center;
  position: static;
  margin-top: 0;
  transform: none;
  width: min(300px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.account-label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.account-name {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.account-setting {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.account-setting > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.account-theme-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.account-theme-buttons button {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 900;
}

.account-theme-buttons button:hover,
.account-theme-buttons button.is-active {
  border-color: rgba(13, 143, 129, 0.7);
  background: rgba(13, 143, 129, 0.18);
  color: var(--teal);
}

.account-panel {
  width: min(348px, calc(100vw - 28px));
  gap: 12px;
  border-radius: 18px;
  padding: 12px;
  pointer-events: auto;
}

.account-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}



.account-role {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

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

.account-section-label {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-section-head {
  display: grid;
  gap: 2px;
}

.account-section-head-inline {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.account-section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.15;
}

.account-mini-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 1000;
}

.account-mini-button:hover {
  border-color: rgba(8, 117, 111, 0.28);
  background: rgba(8, 117, 111, 0.1);
  color: var(--teal);
}

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

.account-notification-item,
.account-notification-empty {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 10px;
}

.account-notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.account-notification-item strong,
.account-notification-item small,
.account-notification-item time {
  display: block;
}

.account-notification-item strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.account-notification-item small,
.account-notification-item time,
.account-notification-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.account-notification-item time {
  white-space: nowrap;
}

.account-notification-item.is-service_order_payment {
  border-color: #f0a49d;
  background: #fff0ed;
}

.account-notification-empty.is-error {
  color: #9f1510;
  background: #fff0ed;
  border-color: #f0a49d;
}

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

button.account-action {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  justify-content: stretch;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
  text-align: left;
}

button.account-action:hover {
  background: var(--surface-strong);
}

.account-action-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(13, 143, 129, 0.12);
  color: var(--teal);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0;
}

.account-action-svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-action-icon.is-service {
  background: rgba(242, 138, 29, 0.14);
  color: #b55205;
}

.account-action-icon.is-stats {
  background: rgba(34, 197, 94, 0.13);
  color: #168247;
}

.account-action-icon.is-bodega,
.account-action-icon.is-support {
  background: rgba(126, 79, 209, 0.12);
  color: #6f43be;
}

.account-action-icon.is-inventory {
  background: rgba(242, 138, 29, 0.14);
  color: #b55205;
}

.account-action-icon.is-danger {
  background: rgba(220, 40, 31, 0.1);
  color: var(--danger);
}

.account-action strong,
.account-action small {
  display: block;
  min-width: 0;
}

.account-action strong {
  color: inherit;
  font-size: 14px;
  line-height: 1.12;
}

.account-action small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.account-action-arrow {
  color: var(--muted);
  font-size: 24px;
  font-weight: 600;
  text-align: right;
}

.account-panel .account-theme-buttons {
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 5px;
}

.account-panel .account-theme-buttons button {
  min-height: 44px;
  border-color: transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}

.account-panel .account-theme-buttons button:hover,
.account-panel .account-theme-buttons button.is-active {
  border-color: transparent;
  background: var(--teal);
  color: #ffffff;
}

.account-panel .app-setup-card,
.account-panel .app-alerts-card,
.account-panel .app-debug-card {
  width: 100%;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: none;
  padding: 10px;
}

.account-panel .app-setup-card.is-collapsed,
.account-panel .app-alerts-card.is-collapsed,
.account-panel .app-debug-card.is-collapsed {
  padding: 0;
}

.app-permissions-toggle,
.app-alerts-toggle,
.app-debug-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.account-panel .app-permissions-toggle,
.account-panel .app-alerts-toggle,
.account-panel .app-debug-toggle {
  min-height: 58px;
  align-items: center;
  border-radius: 13px;
  padding: 10px;
}

.account-panel .app-permissions-toggle:hover,
.account-panel .app-alerts-toggle:hover,
.account-panel .app-debug-toggle:hover {
  background: var(--surface-strong);
}

.app-permissions-state,
.app-alerts-state,
.app-debug-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.app-permissions-state small,
.app-alerts-state small,
.app-debug-state small {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 14%, transparent);
  color: var(--teal);
  font-size: 11px;
  font-weight: 1000;
  padding: 0 9px;
  text-transform: uppercase;
}

.app-permissions-state .account-action-arrow,
.app-alerts-state .account-action-arrow,
.app-debug-state .account-action-arrow {
  transition: transform 160ms ease;
}

.app-permissions-toggle[aria-expanded="true"] .account-action-arrow,
.app-alerts-toggle[aria-expanded="true"] .account-action-arrow,
.app-debug-toggle[aria-expanded="true"] .account-action-arrow {
  transform: rotate(90deg);
}

.app-setup-card.is-collapsed .app-permission-list {
  display: none;
}

.app-debug-card.is-collapsed .app-debug-body {
  display: none;
}

.app-alerts-card.is-collapsed .app-alerts-body {
  display: none;
}

.app-debug-body {
  margin-top: 8px;
}

.app-alerts-body {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.app-alerts-body-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.app-alerts-body-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.account-panel .app-permission-list {
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 8px;
}

.account-panel .app-permission-row {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px;
}

.account-panel .app-permission-icon {
  width: 34px;
  height: 34px;
  font-size: 10px;
}

.account-panel .app-permission-row strong {
  font-size: 13px;
}

.account-panel .app-permission-row small {
  font-size: 11px;
}

.account-panel .app-permission-row button {
  grid-column: auto;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.account-panel .notification-toggle {
  display: none;
}

.account-panel .notification-reset {
  display: none;
}

.account-panel .logout-button {
  border-color: rgba(220, 40, 31, 0.34);
  background: rgba(220, 40, 31, 0.07);
  color: #a72820;
}

.sobre-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 22px;
}

.sobre-backdrop {
  position: absolute;
  inset: 0;
  min-height: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.6);
  padding: 0;
}

.sobre-panel {
  --sobre-panel-pad: 18px;
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: var(--sobre-panel-pad) var(--sobre-panel-pad) 0;
}

.sobre-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: start;
  gap: 16px;
  margin-bottom: 14px;
}

.sobre-toolbar h2 {
  margin: 0;
  font-size: 24px;
}

.sobre-meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 800;
}


.sobre-total-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  padding: 14px;
  margin-bottom: 12px;
}

.sobre-total-card label,
.sobre-history-head label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sobre-total-card input,
.sobre-history-head input,
.sobre-cost-card input {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  padding: 0 12px;
}

.sobre-total-card > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  padding: 7px 12px;
  text-transform: uppercase;
}

.sobre-total-card > span.is-edited {
  border-color: color-mix(in srgb, var(--teal) 60%, var(--line));
  background: color-mix(in srgb, var(--teal) 14%, transparent);
  color: var(--teal);
}

.sobre-money-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.sobre-money-summary article {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  padding: 12px 14px;
}

.sobre-money-summary article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
}

.sobre-money-summary article:first-child {
  border-color: #53bfb8;
  background: #e8fbf8;
}

.sobre-money-summary article:first-child::before {
  background: #0b8f86;
}

.sobre-money-summary article:first-child span,
.sobre-money-summary article:first-child strong {
  color: #075f5a;
}

.sobre-money-summary article:nth-child(2) {
  border-color: #f0b23a;
  background: #fff1c9;
  box-shadow: inset 0 0 0 1px rgba(240, 178, 58, 0.25);
}

.sobre-money-summary article:nth-child(2)::before {
  background: #f0a000;
}

.sobre-money-summary article:nth-child(2) span {
  color: #76500a;
}

.sobre-money-summary article:nth-child(2) strong {
  color: #3b2600;
}

.sobre-money-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.sobre-money-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 20px;
}

.sobre-money-summary strong.is-negative {
  color: var(--danger);
}

.sobre-costs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sobre-cost-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 12px;
}

.sobre-cost-card span {
  color: var(--text);
  font-size: 16px;
  font-weight: 1000;
}

.sobre-cost-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sobre-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  gap: 8px;
  margin: 12px calc(var(--sobre-panel-pad) * -1) 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface) 82%, transparent),
    var(--surface) 22%
  );
  padding: 12px var(--sobre-panel-pad) calc(var(--sobre-panel-pad) + env(safe-area-inset-bottom, 0px));
  backdrop-filter: blur(10px);
}

.sobre-save {
  min-height: 48px;
  color: #071111;
  font-size: 17px;
  font-weight: 1000;
}

.sobre-save:disabled {
  opacity: 0.65;
}

.sobre-actions p,
.sobre-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ticket-modal {
  position: fixed;
  inset: 0;
  z-index: 1120;
  display: grid;
  place-items: center;
  padding: 22px;
}

.ticket-backdrop {
  position: absolute;
  inset: 0;
  min-height: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.66);
  padding: 0;
}

.ticket-panel {
  --ticket-panel-pad: 16px;
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(92dvh, 860px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: var(--ticket-panel-pad);
}

.ticket-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.ticket-toolbar h2 {
  margin: 0;
  font-size: 24px;
}

.ticket-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}


.ticket-camera-shell {
  display: inline-grid;
  place-items: center;
  width: min(100%, 520px);
  min-height: 150px;
  justify-self: center;
  align-self: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), #078577);
  color: #071111;
  padding: 18px;
  touch-action: manipulation;
  cursor: pointer;
  gap: 8px;
}

.ticket-camera-shell:hover:not(:disabled),
.ticket-camera-shell:focus-visible {
  background: linear-gradient(135deg, var(--teal), #078577);
  color: #071111;
}

.ticket-camera-shell.is-disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.ticket-camera-shell input {
  display: none;
}

.ticket-camera-glyph {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.ticket-camera-glyph svg {
  width: 30px;
  height: 30px;
  display: block;
  fill: currentColor;
}

.ticket-camera-shell strong {
  margin: 0;
  font-size: 22px;
  font-weight: 1000;
  text-align: center;
}

.ticket-file-button,
.ticket-finish {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 1000;
}

.ticket-file-button {
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  color: var(--text);
}

.ticket-camera-shell.ticket-file-button {
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--teal), #078577);
  color: #071111;
}

.ticket-file-button input {
  display: none;
}

.ticket-photo-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-right: 2px;
}

.ticket-photo-card {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  padding: 6px;
}

.ticket-photo-preview {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
  border: 0;
  border-radius: 7px;
  background: #111827;
  color: inherit;
  padding: 0;
  overflow: hidden;
  box-shadow: none;
}

.ticket-photo-preview img {
  grid-area: 1 / 1;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  border-radius: 7px;
  object-fit: cover;
  background: #111827;
}

.ticket-photo-preview:hover,
.ticket-photo-preview:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--teal) 68%, #ffffff);
  outline-offset: 2px;
}

.ticket-photo-card small {
  grid-column: 1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.ticket-photo-state {
  grid-column: 1;
  justify-self: center;
  width: 100%;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  line-height: 1.2;
  padding: 5px 7px;
  text-align: center;
}

.ticket-photo-state.is-ready {
  background: #e8fbf8;
  color: #075f5a;
}

.ticket-photo-state.is-uploading {
  background: #fff3cf;
  color: #6a4200;
}

.ticket-photo-state.is-uploaded {
  background: #eaf8ef;
  color: #12642f;
}

.ticket-photo-state.is-queued {
  background: #edf2ff;
  color: #264178;
}

.ticket-photo-state.is-error {
  background: #fff0ed;
  color: #8a1c15;
}

.ticket-photo-delete {
  grid-area: 1 / 1;
  align-self: start;
  justify-self: end;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #dc281f;
  color: #ffffff;
  font-size: 28px;
  font-weight: 1000;
  line-height: 1;
  padding: 0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.26);
}

.ticket-photo-delete:hover,
.ticket-photo-delete:focus-visible {
  background: #b91f18;
  color: #ffffff;
}

.ticket-preview {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
}

.ticket-preview.is-hidden {
  display: none;
}

.ticket-preview-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(8, 11, 13, 0.82);
  padding: 0;
}

.ticket-preview-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-height: calc(100dvh - 24px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  padding: 10px;
}

.ticket-preview-frame img {
  min-height: 0;
  width: 100%;
  max-height: 72dvh;
  display: block;
  border-radius: 10px;
  object-fit: contain;
  background: #111827;
  touch-action: pinch-zoom;
}

.ticket-preview-frame figcaption {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.ticket-preview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ticket-preview-actions button {
  min-height: 50px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 1000;
}

.ticket-preview-keep {
  background: linear-gradient(135deg, var(--teal), #078577);
  color: #071111;
}

.ticket-preview-retake {
  background: linear-gradient(135deg, #f2b84b, #df7d1a);
  color: #1c1204;
}

.ticket-preview-actions button:disabled,
.ticket-preview-close:disabled {
  cursor: wait;
  opacity: 0.62;
}

.ticket-preview-close {
  justify-self: end;
}

.review-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: grid;
  place-items: center;
  padding: 18px;
}

.review-qr-modal.is-hidden {
  display: none;
}

.review-qr-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 13, 18, 0.72);
}

.review-qr-panel {
  position: relative;
  width: min(100%, 390px);
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.38);
}

.review-qr-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.review-qr-kicker {
  margin: 0 0 4px;
  color: #078577;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.review-qr-toolbar h2 {
  margin: 0;
  color: #111820;
  font-size: 24px;
  line-height: 1.1;
}


.review-qr-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dde6e8;
  border-radius: 16px;
  background: #f7fafb;
  text-align: center;
}

.review-qr-card img {
  width: min(100%, 240px);
  aspect-ratio: 1;
  display: block;
  border: 1px solid #d8e3e6;
  border-radius: 10px;
  background: #ffffff;
}

.ticket-photo-empty {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  padding: 18px;
  text-align: center;
}

.ticket-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 8px;
  margin: 0 calc(var(--ticket-panel-pad) * -1) calc(var(--ticket-panel-pad) * -1);
  border-top: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface) 82%, transparent),
    var(--surface) 22%
  );
  padding: 12px var(--ticket-panel-pad) calc(var(--ticket-panel-pad) + env(safe-area-inset-bottom, 0px));
  backdrop-filter: blur(10px);
}

.ticket-finish {
  background: linear-gradient(135deg, #f2b84b, #df7d1a);
  color: #1c1204;
}

.ticket-finish:disabled,
.ticket-file-button.is-disabled {
  opacity: 0.65;
}

.ticket-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.shared-ticket-modal {
  position: fixed;
  inset: 0;
  z-index: 1130;
  display: grid;
  place-items: center;
  padding: 22px;
}

.shared-ticket-modal.is-hidden {
  display: none;
}

.shared-ticket-backdrop {
  position: absolute;
  inset: 0;
  min-height: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.66);
  padding: 0;
}

.shared-ticket-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(90dvh, 720px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.shared-ticket-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.shared-ticket-kicker {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.shared-ticket-toolbar h2 {
  margin: 0;
  font-size: 24px;
}


.shared-ticket-meta,
.shared-ticket-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.shared-ticket-status.is-error {
  color: #dc281f;
}

.shared-ticket-status.is-success {
  color: #087b45;
}

.shared-ticket-list {
  display: grid;
  gap: 10px;
}

.shared-ticket-order {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 12px;
  text-align: left;
}

.shared-ticket-order strong,
.shared-ticket-order span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.shared-ticket-order strong {
  font-size: 16px;
}

.shared-ticket-order span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.shared-ticket-order::after {
  content: ">";
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  justify-self: end;
  color: var(--teal);
  font-size: 24px;
  font-weight: 1000;
}

.shared-ticket-order:disabled {
  cursor: wait;
  opacity: 0.62;
}

.sobre-history {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.sobre-history-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.sobre-history-head h3 {
  margin: 0;
  font-size: 18px;
}

.sobre-history-table {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sobre-history-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sobre-history-table th,
.sobre-history-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

.sobre-history-table th {
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.sobre-history-table tr:last-child td {
  border-bottom: 0;
}

.prep-stats-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 28px;
}

.prep-stats-backdrop {
  position: absolute;
  inset: 0;
  min-height: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.58);
  padding: 0;
}

.prep-stats-panel {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  max-width: 1040px;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.prep-stats-modal.is-employee-stats .prep-stats-panel {
  width: min(520px, 100%);
  max-width: 520px;
}

.prep-stats-modal.is-employee-stats .prep-stats-export,
.prep-stats-modal.is-employee-stats .prep-stats-header {
  display: none;
}

.prep-stats-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 16px;
}

.prep-stats-toolbar h2 {
  margin: 0;
  font-size: 24px;
}

.prep-stats-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.prep-stats-export {
  min-height: 44px;
}

.prep-stats-close {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.prep-stats-close:hover {
  background: var(--surface-strong);
}

.prep-stats-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.prep-stats-header h2 {
  margin: 0;
  font-size: 24px;
}

.prep-stats-header label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.prep-stats-header input {
  height: 40px;
  min-width: 164px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 0 10px;
}

.prep-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.prep-stats-modal.is-employee-stats .prep-stats-grid {
  grid-template-columns: 1fr;
}

.prep-stats-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.prep-stats-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--surface-strong);
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.prep-stats-card h3 {
  margin: 0;
  font-size: 17px;
}

.prep-stats-card header strong {
  min-width: 38px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--teal);
  color: #ffffff;
  font-size: 16px;
}

.prep-stats-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.prep-stats-card th,
.prep-stats-card td {
  border-bottom: 1px solid var(--line);
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

.prep-stats-card th:last-child,
.prep-stats-card td:last-child {
  text-align: right;
}

.prep-stats-card tfoot td {
  border-bottom: 0;
  color: var(--text);
  font-weight: 900;
}

.prep-stats-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.guide-service-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: grid;
  place-items: center;
  padding: 22px;
}

.guide-service-modal.is-hidden {
  display: none;
}

.guide-service-backdrop {
  position: absolute;
  inset: 0;
  min-height: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.58);
  padding: 0;
}

.guide-service-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.guide-service-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.guide-service-toolbar h2 {
  margin: 0;
  font-size: 26px;
}



.guide-service-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.guide-service-header label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-service-header input,
.guide-service-header select {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  padding: 0 12px;
}

.guide-service-grid {
  display: grid;
  gap: 8px;
}

.guide-service-day {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  padding: 10px;
}

.guide-service-day.has-services {
  border-color: rgba(13, 143, 129, 0.55);
  background: rgba(13, 143, 129, 0.12);
}

.guide-service-day.is-today {
  outline: 2px solid #dc281f;
  outline-offset: 2px;
}

.guide-service-day.is-empty-month {
  opacity: 0.35;
}

.guide-service-total-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(217, 119, 6, 0.72);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.96), rgba(253, 230, 138, 0.72));
  box-shadow: inset 5px 0 0 rgba(217, 119, 6, 0.9);
  padding: 12px;
}

.guide-service-total-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.guide-service-total-copy strong {
  color: #92400e;
  font-size: 15px;
}

.guide-service-total-copy span {
  color: #7c2d12;
  font-size: 12px;
  font-weight: 1000;
}

.guide-service-total-card .guide-service-pay {
  color: #92400e;
}

.guide-service-total-card .guide-service-pay-iva {
  color: #7c2d12;
}

.guide-service-day-number {
  display: grid;
  align-content: center;
  gap: 4px;
  border-right: 1px solid var(--line);
  padding-right: 10px;
}

.guide-service-day-number strong {
  font-size: 26px;
  line-height: 1;
}

.guide-service-day-number span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-service-day-services {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.guide-service-row-service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(13, 143, 129, 0.25);
  border-radius: 10px;
  background: rgba(13, 143, 129, 0.1);
  padding: 8px 10px;
}

.guide-service-row-main {
  min-width: 0;
}

.guide-service-row-main strong,
.guide-service-row-main span {
  display: block;
}

.guide-service-row-main strong {
  font-size: 15px;
}

.guide-service-row-main span,
.guide-service-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.guide-service-pay {
  color: #0d8f81;
  font-size: 15px;
  white-space: nowrap;
}

.guide-service-pay-box {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: max-content;
  text-align: right;
}

.guide-service-pay-iva {
  color: #b45309;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.guide-service-list {
  display: none;
}

.guide-service-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(13, 143, 129, 0.08);
  padding: 10px 12px;
}

.guide-service-item strong,
.guide-service-item span {
  display: block;
}

.guide-service-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.guide-service-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.account-calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: grid;
  place-items: center;
  padding: 22px;
}

.account-calendar-modal.is-hidden {
  display: none;
}

.account-calendar-backdrop {
  position: absolute;
  inset: 0;
  min-height: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.58);
  padding: 0;
}

.account-calendar-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
  border: 1px solid rgba(13, 143, 129, 0.45);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.account-calendar-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.account-calendar-toolbar > div {
  min-width: 0;
}

.account-calendar-toolbar h2 {
  margin: 0;
  font-size: 26px;
  overflow-wrap: anywhere;
}

.account-calendar-user {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}


.account-calendar-nav,
.account-calendar-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.account-calendar-nav button,
.account-calendar-tabs button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 1000;
}

.account-calendar-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-calendar-tabs button.is-active,
.account-calendar-nav button:hover {
  border-color: rgba(13, 143, 129, 0.7);
  background: rgba(13, 143, 129, 0.18);
  color: var(--teal);
}

.account-calendar-range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.account-calendar-range > div {
  min-width: 0;
}

.account-calendar-range strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.account-calendar-range span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.account-calendar-auto-accept {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 1000;
  white-space: nowrap;
}

.account-calendar-auto-accept input {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
}

.account-calendar-auto-accept span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.account-calendar-auto-accept:has(input:checked) {
  border-color: rgba(13, 143, 129, 0.7);
  background: rgba(13, 143, 129, 0.18);
  color: var(--teal);
}

.account-calendar-view {
  display: none;
}

.account-calendar-view.is-active {
  display: block;
}

.account-calendar-week {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.account-calendar-day {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  padding: 10px;
}

.account-calendar-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.account-calendar-day-head strong {
  font-size: 16px;
}

.account-calendar-day-head span,
.account-calendar-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-calendar-events {
  display: grid;
  gap: 8px;
}

.account-calendar-event {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(13, 143, 129, 0.6);
  border-radius: 10px;
  background: rgba(13, 143, 129, 0.22);
  padding: 9px 10px;
}

.account-calendar-event.is-accepted {
  border-color: rgba(45, 180, 115, 0.62);
  background: rgba(45, 180, 115, 0.16);
}

.account-calendar-event.is-rejected {
  border-color: rgba(220, 40, 31, 0.68);
  background: rgba(220, 40, 31, 0.13);
}

.account-calendar-event strong {
  display: block;
  font-size: 15px;
}

.account-calendar-event p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.account-calendar-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.account-calendar-event-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #08131a;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 1000;
}

.account-calendar-response-row,
.account-calendar-availability-row {
  display: grid;
  grid-template-columns: 1fr repeat(2, minmax(86px, auto));
  align-items: center;
  gap: 6px;
}

.account-calendar-availability-row {
  grid-template-columns: 1fr minmax(138px, auto);
  margin-top: 8px;
}

.account-calendar-response-state,
.account-calendar-availability {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.account-calendar-response-state.is-accepted,
.account-calendar-availability.is-available {
  color: #14a15b;
}

.account-calendar-response-state.is-rejected,
.account-calendar-availability.is-unavailable {
  color: #dc281f;
}

.account-calendar-response-row button,
.account-calendar-availability-row button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 1000;
}

.account-calendar-response-row button.is-accept {
  border-color: rgba(45, 180, 115, 0.7);
  background: rgba(45, 180, 115, 0.18);
}

.account-calendar-response-row button.is-reject {
  border-color: rgba(220, 40, 31, 0.72);
  background: rgba(220, 40, 31, 0.14);
}

.account-calendar-two,
.account-calendar-month {
  display: grid;
  gap: 8px;
}

.account-calendar-two {
  grid-template-columns: 1fr;
}

.account-calendar-mini-day {
  display: grid;
  gap: 4px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 10px;
  text-align: left;
}

.account-calendar-mini-day.has-work {
  border-color: rgba(13, 143, 129, 0.82);
  background: rgba(13, 143, 129, 0.26);
  box-shadow: inset 4px 0 0 rgba(13, 143, 129, 0.9);
}

.account-calendar-day.is-unavailable,
.account-calendar-mini-day.is-unavailable,
.account-calendar-month-cell.is-unavailable {
  border-color: rgba(220, 40, 31, 0.86);
  background: rgba(220, 40, 31, 0.22);
  box-shadow: inset 4px 0 0 rgba(220, 40, 31, 0.92);
}

.account-calendar-day:has(.account-calendar-event) {
  border-color: rgba(13, 143, 129, 0.72);
  background: rgba(13, 143, 129, 0.12);
}

.account-calendar-mini-day:not(:disabled),
.account-calendar-month-cell:not(:disabled) {
  cursor: pointer;
}

.account-calendar-mini-day:disabled,
.account-calendar-month-cell:disabled {
  cursor: default;
  opacity: 1;
}

.account-calendar-mini-day span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-calendar-month {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.account-calendar-month-label,
.account-calendar-month-cell {
  min-height: 46px;
  border-radius: 8px;
  text-align: center;
  min-width: 0;
}

.account-calendar-month-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.account-calendar-month-cell {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  padding: 6px 3px;
  overflow: hidden;
}

.account-calendar-month-cell.is-muted {
  opacity: 0.35;
}

.account-calendar-month-cell.has-work {
  border-color: rgba(13, 143, 129, 0.82);
  background: rgba(13, 143, 129, 0.28);
  box-shadow: inset 0 -4px 0 rgba(13, 143, 129, 0.88);
}

.account-calendar-month-number {
  font-size: 16px;
  font-weight: 1000;
  line-height: 1;
}

.account-calendar-month-note {
  display: block;
  max-width: 100%;
  color: var(--teal);
  font-size: 10px;
  font-weight: 1000;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-calendar-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.account-calendar-status.is-error {
  color: #dc281f;
}

.bodega-check-modal {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: grid;
  place-items: center;
  padding: 22px;
}

.bodega-check-modal.is-hidden {
  display: none;
}

.bodega-check-backdrop {
  position: absolute;
  inset: 0;
  min-height: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.58);
  padding: 0;
}

.bodega-check-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  border: 1px solid rgba(13, 143, 129, 0.45);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.bodega-check-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.bodega-check-toolbar h2 {
  margin: 0;
  font-size: 26px;
}


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

.bodega-check-field {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(13, 143, 129, 0.4);
  border-radius: 10px;
  background: rgba(13, 143, 129, 0.1);
  padding: 10px;
}

.bodega-check-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.bodega-check-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 24px;
  font-weight: 1000;
  padding: 0 12px;
}

.bodega-check-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.bodega-check-status.is-success {
  color: var(--teal);
}

.bodega-check-status.is-error {
  color: var(--danger);
}

.bodega-check-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

body.is-inventory-open {
  overflow: hidden;
}

.inventory-modal {
  position: fixed;
  inset: 0;
  z-index: 1070;
  display: grid;
  place-items: center;
  padding: 18px;
}

.inventory-modal.is-hidden {
  display: none;
}

.inventory-backdrop {
  position: absolute;
  inset: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.68);
  padding: 0;
}

.inventory-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(92dvh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow);
}

.inventory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 16px;
}

.inventory-toolbar h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.1;
}


.inventory-loading {
  display: grid;
  min-height: 300px;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
  padding: 24px;
  text-align: center;
}

.inventory-loading.is-error {
  color: var(--danger);
}

.inventory-count-view {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.inventory-progress {
  display: grid;
  gap: 8px;
}

.inventory-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.inventory-progress strong {
  color: var(--teal);
}

.inventory-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-strong);
}

.inventory-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 180ms ease;
}

.inventory-context {
  display: grid;
  grid-template-columns: minmax(92px, max-content) minmax(0, 1fr) minmax(92px, max-content);
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.inventory-context button,
.inventory-review-head button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  padding: 0 12px;
}

.inventory-context button:disabled {
  opacity: 0.38;
}

.inventory-context span {
  min-width: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 1000;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-item {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(18px, 5vw, 34px);
  text-align: center;
}

.inventory-item > p:first-child {
  margin: 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}

.inventory-item h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.08;
}

.inventory-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.inventory-specs div {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.inventory-specs div + div {
  border-left: 1px solid var(--line);
}

.inventory-specs span,
.inventory-item > label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.inventory-specs strong {
  font-size: 18px;
}

.inventory-count-control {
  display: grid;
  grid-template-columns: 56px minmax(90px, 140px) 56px;
  justify-content: center;
  gap: 10px;
}

.inventory-count-control button {
  width: 56px;
  min-width: 56px;
  min-height: 56px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: rgba(13, 143, 129, 0.12);
  color: var(--teal);
  font-size: 30px;
  font-weight: 900;
  padding: 0;
}

.inventory-count-control output {
  min-width: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-strong);
  font-size: 34px;
  font-weight: 1000;
  font-variant-numeric: tabular-nums;
}

.inventory-item > textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  line-height: 1.4;
  padding: 10px 12px;
  text-align: left;
}

.inventory-confirm {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #151515;
  font-size: 17px;
  font-weight: 1000;
}

.inventory-save-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inventory-save-status.is-saved {
  color: var(--teal);
}

.inventory-save-status.is-pending {
  color: #d59618;
}

.inventory-save-status.is-error {
  color: var(--danger);
}

.inventory-footer {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inventory-footer strong {
  color: var(--text);
}

.inventory-review {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.inventory-review-head {
  display: grid;
  grid-template-columns: minmax(90px, max-content) minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 16px;
}

.inventory-review-head button {
  grid-row: 1 / 4;
}

.inventory-review-head p,
.inventory-review-head h3,
.inventory-review-head span {
  margin: 0;
}

.inventory-review-head p {
  color: var(--teal);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.inventory-review-head h3 {
  font-size: 20px;
}

.inventory-review-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.inventory-review-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
}

.inventory-review-summary div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.inventory-review-summary div + div {
  border-left: 1px solid var(--line);
}

.inventory-review-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-review-summary strong {
  font-size: 18px;
}

.inventory-review-tools {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(110px, 1fr));
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 10px 16px;
}

.inventory-review-tools label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-review-tools input,
.inventory-review-tools select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  padding: 0 12px;
}

.inventory-group-totals {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
  padding: 10px 16px;
}

.inventory-group-totals > strong {
  color: var(--text);
  font-size: 12px;
}

.inventory-group-totals > div {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.inventory-group-totals span {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto;
  grid-template-areas: "category total" "label total";
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px 10px;
}

.inventory-group-totals small {
  grid-area: category;
  color: var(--teal);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-group-totals b {
  grid-area: label;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.inventory-group-totals em {
  grid-area: total;
  align-self: center;
  color: var(--text);
  font-size: 22px;
  font-style: normal;
  font-weight: 1000;
}

.inventory-review-category > h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--teal);
  font-size: 12px;
  letter-spacing: 0;
  padding: 9px 16px;
  text-transform: uppercase;
}

.inventory-review-category > h4 span {
  color: var(--muted);
}

.inventory-review-empty {
  margin: 0;
  color: var(--muted);
  padding: 24px 16px;
  text-align: center;
}

.inventory-review-list {
  min-height: 0;
  overflow: auto;
  background: var(--bg);
}

.inventory-review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "copy control" "comment control" "badge control";
  align-items: center;
  gap: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 16px;
}

.inventory-review-row.is-pending {
  background: var(--surface-strong);
}

.inventory-review-copy {
  grid-area: copy;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.inventory-review-copy strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.inventory-review-comment {
  grid-area: comment;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.inventory-review-comment textarea {
  width: 100%;
  min-height: 54px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  line-height: 1.35;
  padding: 8px 10px;
  text-transform: none;
}

.inventory-review-copy span {
  color: var(--muted);
  font-size: 11px;
}

.inventory-review-control {
  grid-area: control;
  display: grid;
  grid-template-columns: 38px 64px 38px;
  gap: 5px;
}

.inventory-review-control button,
.inventory-review-control input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  padding: 0;
}

.inventory-review-control button {
  color: var(--teal);
}

.inventory-review-badge {
  grid-area: badge;
  width: max-content;
  color: var(--teal);
  font-size: 10px;
  font-weight: 1000;
}

.inventory-review-row.is-pending .inventory-review-badge {
  color: #d59618;
}

.inventory-review-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, max-content);
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 16px max(12px, env(safe-area-inset-bottom, 0px));
}

.inventory-review-action div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.inventory-review-action small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.inventory-review-action button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #081313;
  font-weight: 1000;
  padding: 0 18px;
}

.inventory-review-action button:disabled {
  background: var(--line-strong);
  color: var(--muted);
}

:root[data-theme="dark"] .account-action-icon.is-inventory,
:root[data-internal-os-theme="dark"] .account-action-icon.is-inventory {
  background: rgba(255, 190, 64, 0.16);
  color: #ffd78a;
}

@media (max-width: 640px) {
  .inventory-modal {
    padding: 0;
    place-items: stretch;
  }

  .inventory-panel {
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .inventory-count-view {
    padding: 12px;
  }

  .inventory-toolbar {
    padding:
      max(10px, env(safe-area-inset-top, 0px))
      max(12px, env(safe-area-inset-right, 0px))
      10px
      max(12px, env(safe-area-inset-left, 0px));
  }

  .inventory-context {
    grid-template-columns: 96px minmax(0, 1fr) 90px;
    gap: 6px;
  }

  .inventory-context button {
    padding: 0 8px;
  }

  .inventory-item {
    padding: 18px 12px;
  }

  .inventory-review-head,
  .inventory-review-row,
  .inventory-review-action {
    padding-right: 12px;
    padding-left: 12px;
  }

  .inventory-review-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "control" "comment" "badge";
  }

  .inventory-review-tools {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .inventory-search {
    grid-column: 1 / -1;
  }

  .inventory-review-control {
    grid-template-columns: 44px minmax(80px, 1fr) 44px;
  }
}

:root[data-theme="dark"],
:root[data-internal-os-theme="dark"] {
  --bg: #101113;
  --surface: #181b1f;
  --surface-strong: #20252b;
  --line: #2d343c;
  --line-strong: #43505c;
  --text: #f3f6f7;
  --muted: #a5b0ba;
  --accent: #ff6a2c;
  --accent-dark: #e94718;
  --teal: #2dcfc4;
  --danger: #ff6b61;
  --shadow: 0 22px 58px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

:root[data-theme="dark"] body,
:root[data-internal-os-theme="dark"] body {
  background: var(--bg);
}

:root[data-theme="dark"] .login-panel,
:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .service-order,
:root[data-theme="dark"] .order-list-item,
:root[data-theme="dark"] .crew-strip > div,
:root[data-theme="dark"] .detail-row,
:root[data-theme="dark"] .equipment-row,
:root[data-theme="dark"] .prep-comment-input,
:root[data-internal-os-theme="dark"] .login-panel,
:root[data-internal-os-theme="dark"] .sidebar,
:root[data-internal-os-theme="dark"] .empty-state,
:root[data-internal-os-theme="dark"] .service-order,
:root[data-internal-os-theme="dark"] .order-list-item,
:root[data-internal-os-theme="dark"] .crew-strip > div,
:root[data-internal-os-theme="dark"] .detail-row,
:root[data-internal-os-theme="dark"] .equipment-row,
:root[data-internal-os-theme="dark"] .prep-comment-input {
  background: var(--surface);
}

:root[data-theme="dark"] .assignment-preparer.is-pending,
:root[data-internal-os-theme="dark"] .assignment-preparer.is-pending {
  color: var(--danger);
}

:root[data-theme="dark"] .empty-state-copy,
:root[data-internal-os-theme="dark"] .empty-state-copy {
  background: rgba(24, 27, 31, 0.92);
}

:root[data-theme="dark"] .section-title,
:root[data-theme="dark"] .payment-divider,
:root[data-internal-os-theme="dark"] .section-title,
:root[data-internal-os-theme="dark"] .payment-divider {
  background: var(--surface-strong);
}

:root[data-theme="dark"] .filter-button,
:root[data-theme="dark"] .login-form select,
:root[data-theme="dark"] .login-form input,
:root[data-theme="dark"] .prep-stats-header input,
:root[data-theme="dark"] .guide-service-header input,
:root[data-theme="dark"] .guide-service-header select,
:root[data-theme="dark"] .bodega-check-field input,
:root[data-theme="dark"] .sobre-total-card input,
:root[data-theme="dark"] .sobre-history-head input,
:root[data-theme="dark"] .sobre-cost-card input,
:root[data-theme="dark"] .payment-status-edit,
:root[data-theme="dark"] .ticket-file-button,
:root[data-internal-os-theme="dark"] .filter-button,
:root[data-internal-os-theme="dark"] .login-form select,
:root[data-internal-os-theme="dark"] .login-form input,
:root[data-internal-os-theme="dark"] .prep-stats-header input,
:root[data-internal-os-theme="dark"] .guide-service-header input,
:root[data-internal-os-theme="dark"] .guide-service-header select,
:root[data-internal-os-theme="dark"] .bodega-check-field input,
:root[data-internal-os-theme="dark"] .sobre-total-card input,
:root[data-internal-os-theme="dark"] .sobre-history-head input,
:root[data-internal-os-theme="dark"] .sobre-cost-card input,
:root[data-internal-os-theme="dark"] .payment-status-edit,
:root[data-internal-os-theme="dark"] .ticket-file-button {
  background: #20252b;
  color: var(--text);
  border-color: var(--line-strong);
}

:root[data-theme="dark"] .cash-paid-button,
:root[data-internal-os-theme="dark"] .cash-paid-button {
  background: rgba(35, 197, 94, 0.15);
  border-color: rgba(74, 222, 128, 0.62);
  color: #9ef0bc;
  box-shadow: none;
}

:root[data-theme="dark"] .payment-section.is-paid-closed .section-title,
:root[data-internal-os-theme="dark"] .payment-section.is-paid-closed .section-title {
  background: linear-gradient(135deg, #15803d, #0f5f45);
  color: #ffffff;
}

:root[data-theme="dark"] .payment-section.is-paid-closed .payment-status[data-status="paid"],
:root[data-theme="dark"] .payment-section.is-paid-closed .cash-paid-button,
:root[data-internal-os-theme="dark"] .payment-section.is-paid-closed .payment-status[data-status="paid"],
:root[data-internal-os-theme="dark"] .payment-section.is-paid-closed .cash-paid-button {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

:root[data-theme="dark"] .cash-paid-button:hover:not(:disabled),
:root[data-internal-os-theme="dark"] .cash-paid-button:hover:not(:disabled) {
  background: #16824a;
  color: #ffffff;
}

:root[data-theme="dark"] .cash-paid-button[data-next-status="unpaid"],
:root[data-internal-os-theme="dark"] .cash-paid-button[data-next-status="unpaid"] {
  background: rgba(251, 146, 60, 0.15);
  border-color: rgba(251, 146, 60, 0.66);
  color: #fdba74;
  box-shadow: none;
}

:root[data-theme="dark"] .cash-paid-button[data-next-status="unpaid"]:hover:not(:disabled),
:root[data-internal-os-theme="dark"] .cash-paid-button[data-next-status="unpaid"]:hover:not(:disabled) {
  background: #b94e15;
  color: #ffffff;
}

:root[data-theme="dark"] .sobre-money-summary article:first-child,
:root[data-internal-os-theme="dark"] .sobre-money-summary article:first-child {
  border-color: rgba(45, 207, 196, 0.55);
  background: rgba(45, 207, 196, 0.14);
}

:root[data-theme="dark"] .sobre-money-summary article:first-child span,
:root[data-theme="dark"] .sobre-money-summary article:first-child strong,
:root[data-internal-os-theme="dark"] .sobre-money-summary article:first-child span,
:root[data-internal-os-theme="dark"] .sobre-money-summary article:first-child strong {
  color: #a8fff8;
}

:root[data-theme="dark"] .sobre-money-summary article:nth-child(2),
:root[data-internal-os-theme="dark"] .sobre-money-summary article:nth-child(2) {
  border-color: rgba(255, 190, 64, 0.7);
  background: rgba(255, 190, 64, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 190, 64, 0.14);
}

:root[data-theme="dark"] .sobre-money-summary article:nth-child(2) span,
:root[data-internal-os-theme="dark"] .sobre-money-summary article:nth-child(2) span {
  color: #ffd78a;
}

:root[data-theme="dark"] .sobre-money-summary article:nth-child(2) strong,
:root[data-internal-os-theme="dark"] .sobre-money-summary article:nth-child(2) strong {
  color: #fff3d1;
}

:root[data-theme="dark"] .sobre-money-summary strong.is-negative,
:root[data-internal-os-theme="dark"] .sobre-money-summary strong.is-negative {
  color: var(--danger);
}

:root[data-theme="dark"] .ticket-photo-card,
:root[data-theme="dark"] .ticket-photo-empty,
:root[data-internal-os-theme="dark"] .ticket-photo-card,
:root[data-internal-os-theme="dark"] .ticket-photo-empty {
  background: var(--surface);
  border-color: var(--line-strong);
}

:root[data-theme="dark"] .filter-button:hover,
:root[data-theme="dark"] .filter-button.is-active,
:root[data-theme="dark"] .order-list-item:hover,
:root[data-theme="dark"] .order-list-item.is-active,
:root[data-internal-os-theme="dark"] .filter-button:hover,
:root[data-internal-os-theme="dark"] .filter-button.is-active,
:root[data-internal-os-theme="dark"] .order-list-item:hover,
:root[data-internal-os-theme="dark"] .order-list-item.is-active {
  background: #223b3d;
}

:root[data-theme="dark"] .order-list-item.is-active,
:root[data-internal-os-theme="dark"] .order-list-item.is-active {
  border-color: #ff7a45;
  background: linear-gradient(135deg, rgba(255, 122, 69, 0.2) 0%, #172427 78%);
  box-shadow: inset 6px 0 0 #ff7a45, 0 16px 30px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .order-list-item.is-active .assignment-van,
:root[data-internal-os-theme="dark"] .order-list-item.is-active .assignment-van {
  background: #ff7a45;
  color: #1f120c;
}

:root[data-theme="dark"] .assignment-selected-label,
:root[data-internal-os-theme="dark"] .assignment-selected-label {
  background: #ff7a45;
  color: #1f120c;
  border-color: #ff9b73;
}

:root[data-theme="dark"] .order-list-item.is-own-assignment,
:root[data-internal-os-theme="dark"] .order-list-item.is-own-assignment {
  background: #172f31;
  border-color: var(--teal);
}

:root[data-theme="dark"] .order-list-item.is-own-assignment.is-active,
:root[data-internal-os-theme="dark"] .order-list-item.is-own-assignment.is-active {
  border-color: #ff7a45;
  background: linear-gradient(135deg, rgba(255, 122, 69, 0.2) 0%, #172427 78%);
  box-shadow: inset 6px 0 0 #ff7a45, 0 16px 30px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .order-list-item.has-change-highlight,
:root[data-internal-os-theme="dark"] .order-list-item.has-change-highlight {
  background: rgba(242, 138, 29, 0.14);
  border-color: #f2a84d;
  box-shadow: inset 4px 0 0 #f2a84d;
}

:root[data-theme="dark"] .order-list-item.has-change-highlight.is-active,
:root[data-theme="dark"] .order-list-item.has-change-highlight:hover,
:root[data-internal-os-theme="dark"] .order-list-item.has-change-highlight.is-active,
:root[data-internal-os-theme="dark"] .order-list-item.has-change-highlight:hover {
  background: rgba(242, 138, 29, 0.2);
  border-color: #ffbd68;
}

:root[data-theme="dark"] .assignment-date,
:root[data-internal-os-theme="dark"] .assignment-date {
  background: rgba(45, 207, 196, 0.14);
  border-color: rgba(45, 207, 196, 0.32);
}

:root[data-theme="dark"] .assignment-date.is-today,
:root[data-internal-os-theme="dark"] .assignment-date.is-today {
  background: #f04438;
  color: #ffffff;
  border-color: #f04438;
}

:root[data-theme="dark"] .assignment-date.is-tomorrow,
:root[data-internal-os-theme="dark"] .assignment-date.is-tomorrow {
  background: rgba(45, 207, 196, 0.14);
  color: #8ff3eb;
  border-color: rgba(45, 207, 196, 0.32);
}

:root[data-theme="dark"] .guide-confirm-section,
:root[data-internal-os-theme="dark"] .guide-confirm-section {
  background: rgba(19, 128, 68, 0.16);
  border-color: rgba(34, 197, 94, 0.32);
}

:root[data-theme="dark"] .guide-confirm-box,
:root[data-internal-os-theme="dark"] .guide-confirm-box {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(34, 197, 94, 0.44);
}

:root[data-theme="dark"] .guide-start-section,
:root[data-internal-os-theme="dark"] .guide-start-section {
  background: rgba(45, 207, 196, 0.11);
  border-color: rgba(45, 207, 196, 0.28);
}

:root[data-theme="dark"] .guide-start-button:disabled,
:root[data-internal-os-theme="dark"] .guide-start-button:disabled {
  color: #8b98a8;
  background: #20252b;
}

:root[data-theme="dark"] .guide-start-eyebrow,
:root[data-internal-os-theme="dark"] .guide-start-eyebrow {
  background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .guide-start-button:disabled small,
:root[data-internal-os-theme="dark"] .guide-start-button:disabled small {
  color: #8b98a8;
}

:root[data-theme="dark"] .guide-start-button.is-started:disabled,
:root[data-internal-os-theme="dark"] .guide-start-button.is-started:disabled {
  color: #ffffff;
  background: linear-gradient(135deg, #16824a, #0f6337);
  border-color: rgba(68, 214, 129, 0.45);
}

:root[data-theme="dark"] .guide-start-button.is-started:disabled small,
:root[data-internal-os-theme="dark"] .guide-start-button.is-started:disabled small {
  color: rgba(255, 255, 255, 0.9);
}

:root[data-theme="dark"] .guide-start-button.is-waiting:disabled,
:root[data-internal-os-theme="dark"] .guide-start-button.is-waiting:disabled {
  color: #ffe1a3;
  background: #332813;
  border-color: rgba(247, 191, 76, 0.5);
}

:root[data-theme="dark"] .guide-start-button.is-waiting:disabled small,
:root[data-internal-os-theme="dark"] .guide-start-button.is-waiting:disabled small {
  color: #f4d491;
}

:root[data-theme="dark"] .guide-start-button.is-countdown:disabled,
:root[data-internal-os-theme="dark"] .guide-start-button.is-countdown:disabled {
  color: #ffe1a3;
  background: linear-gradient(135deg, #3b2b12, #2a2114);
  border-color: rgba(247, 191, 76, 0.5);
  box-shadow: none;
}

:root[data-theme="dark"] .guide-start-button.is-countdown:disabled .guide-start-eyebrow,
:root[data-internal-os-theme="dark"] .guide-start-button.is-countdown:disabled .guide-start-eyebrow {
  background: rgba(247, 191, 76, 0.16);
  color: #ffd78a;
}

:root[data-theme="dark"] .guide-start-button.is-countdown:disabled .guide-start-label,
:root[data-theme="dark"] .guide-start-button.is-countdown:disabled small,
:root[data-internal-os-theme="dark"] .guide-start-button.is-countdown:disabled .guide-start-label,
:root[data-internal-os-theme="dark"] .guide-start-button.is-countdown:disabled small {
  color: #ffe8b2;
}

:root[data-theme="dark"] .guide-start-button.is-countdown:disabled .guide-start-countdown,
:root[data-internal-os-theme="dark"] .guide-start-button.is-countdown:disabled .guide-start-countdown {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(247, 191, 76, 0.4);
  color: #fff2cc;
}

:root[data-theme="dark"] .guide-start-button.is-expired:disabled,
:root[data-internal-os-theme="dark"] .guide-start-button.is-expired:disabled {
  color: #9ce5b7;
  background: linear-gradient(135deg, #143324, #10271d);
  border-color: rgba(68, 214, 129, 0.38);
}

:root[data-theme="dark"] .guide-start-button.is-expired:disabled .guide-start-eyebrow,
:root[data-internal-os-theme="dark"] .guide-start-button.is-expired:disabled .guide-start-eyebrow {
  background: rgba(68, 214, 129, 0.14);
  color: #a9efbf;
}

:root[data-theme="dark"] .guide-start-button.is-expired:disabled .guide-start-label,
:root[data-theme="dark"] .guide-start-button.is-expired:disabled small,
:root[data-internal-os-theme="dark"] .guide-start-button.is-expired:disabled .guide-start-label,
:root[data-internal-os-theme="dark"] .guide-start-button.is-expired:disabled small {
  color: #b9f2c9;
}

:root[data-theme="dark"] .operation-editable,
:root[data-theme="dark"] .equipment-row.is-operation-row span,
:root[data-theme="dark"] .equipment-row.is-operation-row strong,
:root[data-internal-os-theme="dark"] .operation-editable,
:root[data-internal-os-theme="dark"] .equipment-row.is-operation-row span,
:root[data-internal-os-theme="dark"] .equipment-row.is-operation-row strong {
  background: #172f31;
}

:root[data-theme="dark"] .equipment-row:not(.is-picked):not(.is-operation-row) strong,
:root[data-internal-os-theme="dark"] .equipment-row:not(.is-picked):not(.is-operation-row) strong {
  background: #20252b;
  border-color: var(--line-strong);
  color: var(--text);
}

:root[data-theme="dark"] .equipment-row:hover:not(:disabled),
:root[data-internal-os-theme="dark"] .equipment-row:hover:not(:disabled) {
  background: #1f3031;
}

:root[data-theme="dark"] .equipment-row.is-readonly:hover:not(:disabled),
:root[data-internal-os-theme="dark"] .equipment-row.is-readonly:hover:not(:disabled) {
  background: var(--surface);
}

:root[data-theme="dark"] .equipment-row.is-operation-row:hover,
:root[data-internal-os-theme="dark"] .equipment-row.is-operation-row:hover {
  background: var(--surface);
}

:root[data-theme="dark"] .equipment-row.is-picked,
:root[data-internal-os-theme="dark"] .equipment-row.is-picked {
  background: #193526;
}

:root[data-theme="dark"] .prep-comment-input.is-locked,
:root[data-theme="dark"] .prep-comment-input:disabled,
:root[data-internal-os-theme="dark"] .prep-comment-input.is-locked,
:root[data-internal-os-theme="dark"] .prep-comment-input:disabled {
  background: #20252b;
}

:root[data-theme="dark"] .document-header p,
:root[data-internal-os-theme="dark"] .document-header p {
  color: var(--muted);
}

:root[data-theme="dark"] .payment-status[data-status="paid"],
:root[data-internal-os-theme="dark"] .payment-status[data-status="paid"] {
  background: #193526;
  color: #73e0a0;
}

:root[data-theme="dark"] .payment-status[data-status="unpaid"],
:root[data-internal-os-theme="dark"] .payment-status[data-status="unpaid"] {
  background: #3a241b;
  color: #ff9b72;
}

:root[data-theme="dark"] .payment-status[data-status="partial"],
:root[data-internal-os-theme="dark"] .payment-status[data-status="partial"] {
  background: #3a3218;
  color: #ffe07a;
}

:root[data-theme="dark"] .booking-badge,
:root[data-internal-os-theme="dark"] .booking-badge {
  border-color: rgba(45, 207, 196, 0.5);
  background: rgba(45, 207, 196, 0.14);
  color: #8ff3eb;
}

:root[data-theme="dark"] .network-status-banner,
:root[data-internal-os-theme="dark"] .network-status-banner {
  color: #ffe3a3;
  background: rgba(77, 57, 20, 0.96);
  border-color: rgba(255, 198, 76, 0.48);
  box-shadow: none;
}

:root[data-theme="dark"] .network-status-banner.is-offline,
:root[data-internal-os-theme="dark"] .network-status-banner.is-offline {
  color: #ffc7bf;
  background: rgba(76, 27, 27, 0.96);
  border-color: rgba(255, 111, 97, 0.5);
}

:root[data-theme="dark"] .network-status-banner.is-pending,
:root[data-internal-os-theme="dark"] .network-status-banner.is-pending {
  color: #a8fff8;
  background: rgba(45, 207, 196, 0.14);
  border-color: rgba(45, 207, 196, 0.46);
}

:root[data-theme="dark"] .network-status-banner.is-update,
:root[data-internal-os-theme="dark"] .network-status-banner.is-update {
  color: #ffb7af;
  background: rgba(220, 40, 31, 0.18);
  border-color: rgba(255, 111, 97, 0.58);
}

:root[data-theme="dark"] .network-status-banner button,
:root[data-internal-os-theme="dark"] .network-status-banner button {
  background: rgba(18, 23, 30, 0.78);
}

:root[data-theme="dark"] .sync-status-line,
:root[data-internal-os-theme="dark"] .sync-status-line {
  color: #a8fff8;
  background: rgba(45, 207, 196, 0.12);
  border-color: rgba(45, 207, 196, 0.36);
}

:root[data-theme="dark"] .sync-status-line.is-offline,
:root[data-internal-os-theme="dark"] .sync-status-line.is-offline {
  color: #ffc7bf;
  background: rgba(76, 27, 27, 0.96);
  border-color: rgba(255, 111, 97, 0.5);
}

:root[data-theme="dark"] .sync-status-line.is-pending,
:root[data-internal-os-theme="dark"] .sync-status-line.is-pending {
  color: #ffe3a3;
  background: rgba(77, 57, 20, 0.96);
  border-color: rgba(255, 198, 76, 0.48);
}

:root[data-theme="dark"] .sync-status-line.is-update,
:root[data-internal-os-theme="dark"] .sync-status-line.is-update {
  color: #ffb7af;
  background: rgba(220, 40, 31, 0.18);
  border-color: rgba(255, 111, 97, 0.58);
}

:root[data-theme="dark"] .app-setup-status.is-update,
:root[data-internal-os-theme="dark"] .app-setup-status.is-update {
  color: #ffb7af;
}

:root[data-theme="dark"] .app-setup-card,
:root[data-theme="dark"] .account-status-card,
:root[data-theme="dark"] .account-notification-item,
:root[data-theme="dark"] .account-notification-empty,
:root[data-theme="dark"] .app-permission-row,
:root[data-internal-os-theme="dark"] .app-setup-card,
:root[data-internal-os-theme="dark"] .account-status-card,
:root[data-internal-os-theme="dark"] .account-notification-item,
:root[data-internal-os-theme="dark"] .account-notification-empty,
:root[data-internal-os-theme="dark"] .app-permission-row {
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: none;
}

:root[data-theme="dark"] .app-setup-dismiss,
:root[data-theme="dark"] .app-permission-row button,
:root[data-theme="dark"] .account-mini-button,
:root[data-internal-os-theme="dark"] .app-setup-dismiss,
:root[data-internal-os-theme="dark"] .app-permission-row button {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--line-strong);
}

:root[data-internal-os-theme="dark"] .account-mini-button {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--line-strong);
}

:root[data-theme="dark"] .account-notification-item.is-service_order_payment,
:root[data-theme="dark"] .account-notification-empty.is-error,
:root[data-internal-os-theme="dark"] .account-notification-item.is-service_order_payment,
:root[data-internal-os-theme="dark"] .account-notification-empty.is-error {
  background: rgba(255, 107, 97, 0.12);
  border-color: rgba(255, 107, 97, 0.34);
  color: #ffb7af;
}

:root[data-theme="dark"] .is-order-field-changed,
:root[data-internal-os-theme="dark"] .is-order-field-changed {
  background: rgba(242, 138, 29, 0.13);
  box-shadow: inset 4px 0 0 #f2a84d;
}

:root[data-theme="dark"] .app-permission-row.is-ready,
:root[data-internal-os-theme="dark"] .app-permission-row.is-ready {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.34);
}

:root[data-theme="dark"] .app-permission-row.is-ready .app-permission-icon,
:root[data-theme="dark"] .app-permission-row.is-ready button,
:root[data-internal-os-theme="dark"] .app-permission-row.is-ready .app-permission-icon,
:root[data-internal-os-theme="dark"] .app-permission-row.is-ready button {
  color: #9ef0bc;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.36);
}

:root[data-theme="dark"] .app-permission-row.is-blocked,
:root[data-internal-os-theme="dark"] .app-permission-row.is-blocked {
  background: rgba(255, 107, 97, 0.12);
  border-color: rgba(255, 107, 97, 0.34);
}

:root[data-theme="dark"] .account-panel,
:root[data-internal-os-theme="dark"] .account-panel {
  background: #12171e;
  border-color: #2e3743;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.42);
}

:root[data-theme="dark"] .account-panel-close,
:root[data-internal-os-theme="dark"] .account-panel-close {
  background: #1c232d;
  color: #eef4f4;
  border-color: #34404d;
}

:root[data-theme="dark"] .account-panel-close:hover,
:root[data-internal-os-theme="dark"] .account-panel-close:hover {
  background: rgba(45, 207, 196, 0.12);
  color: #57ddd4;
  border-color: rgba(45, 207, 196, 0.32);
}

:root[data-theme="dark"] button.account-action,
:root[data-theme="dark"] .account-panel .account-theme-buttons,
:root[data-theme="dark"] .account-panel .app-setup-card,
:root[data-theme="dark"] .account-panel .app-alerts-card,
:root[data-theme="dark"] .account-panel .app-debug-card,
:root[data-internal-os-theme="dark"] button.account-action,
:root[data-internal-os-theme="dark"] .account-panel .account-theme-buttons,
:root[data-internal-os-theme="dark"] .account-panel .app-setup-card,
:root[data-internal-os-theme="dark"] .account-panel .app-alerts-card,
:root[data-internal-os-theme="dark"] .account-panel .app-debug-card {
  background: #1c232d;
  border-color: #2e3743;
}

:root[data-theme="dark"] button.account-action:hover,
:root[data-internal-os-theme="dark"] button.account-action:hover {
  background: #222b37;
}

:root[data-theme="dark"] .account-action-icon,
:root[data-internal-os-theme="dark"] .account-action-icon {
  background: rgba(45, 207, 196, 0.14);
  color: #8ff3eb;
}

:root[data-theme="dark"] .account-action-icon.is-service,
:root[data-internal-os-theme="dark"] .account-action-icon.is-service {
  background: rgba(255, 190, 64, 0.16);
  color: #ffd78a;
}

:root[data-theme="dark"] .account-action-icon.is-stats,
:root[data-internal-os-theme="dark"] .account-action-icon.is-stats {
  background: rgba(74, 222, 128, 0.15);
  color: #a7f3c0;
}

:root[data-theme="dark"] .account-action-icon.is-inventory,
:root[data-internal-os-theme="dark"] .account-action-icon.is-inventory {
  background: rgba(255, 190, 64, 0.16);
  color: #ffd78a;
}

:root[data-theme="dark"] .account-action-icon.is-bodega,
:root[data-theme="dark"] .account-action-icon.is-support,
:root[data-internal-os-theme="dark"] .account-action-icon.is-bodega,
:root[data-internal-os-theme="dark"] .account-action-icon.is-support {
  background: rgba(170, 130, 255, 0.16);
  color: #d7c2ff;
}

:root[data-theme="dark"] .account-action-icon.is-danger,
:root[data-internal-os-theme="dark"] .account-action-icon.is-danger {
  background: rgba(255, 107, 97, 0.13);
  color: #ff9a92;
}

:root[data-theme="dark"] .account-panel .logout-button,
:root[data-internal-os-theme="dark"] .account-panel .logout-button {
  border-color: rgba(255, 107, 97, 0.36);
  background: rgba(255, 107, 97, 0.1);
  color: #ffc7c2;
}

:root[data-theme="dark"] .guide-service-total-card,
:root[data-internal-os-theme="dark"] .guide-service-total-card {
  border-color: rgba(255, 190, 64, 0.66);
  background: linear-gradient(135deg, rgba(71, 52, 15, 0.96), rgba(47, 38, 22, 0.96));
  box-shadow: inset 5px 0 0 rgba(255, 190, 64, 0.86);
}

:root[data-theme="dark"] .guide-service-total-copy strong,
:root[data-theme="dark"] .guide-service-total-card .guide-service-pay,
:root[data-internal-os-theme="dark"] .guide-service-total-copy strong,
:root[data-internal-os-theme="dark"] .guide-service-total-card .guide-service-pay {
  color: #ffe8b2;
}

:root[data-theme="dark"] .guide-service-total-copy span,
:root[data-theme="dark"] .guide-service-total-card .guide-service-pay-iva,
:root[data-internal-os-theme="dark"] .guide-service-total-copy span,
:root[data-internal-os-theme="dark"] .guide-service-total-card .guide-service-pay-iva {
  color: #ffd78a;
}

:root[data-theme="dark"] .account-calendar-event-meta span,
:root[data-internal-os-theme="dark"] .account-calendar-event-meta span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

@media (max-width: 860px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .prep-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-service-grid {
    grid-template-columns: 1fr;
  }

  .bodega-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .crew-strip,
  .detail-grid,
  .detail-grid.compact {
    grid-template-columns: 1fr;
  }

  .equipment-grid:not(.equipment-grid-split) {
    grid-template-columns: 1fr;
  }

  .equipment-grid-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 520px) {
  .orders-view {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .login-view,
  .order-area,
  .sidebar {
    padding: 16px;
  }

  .page-toolbar {
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 12px 16px;
    margin-bottom: 0;
  }

  .account-menu {
    padding: 0;
  }

  .prep-stats-open,
  .operation-refresh-button {
    min-height: 38px;
    padding: 0 14px;
    font-size: 13px;
  }

  .guide-start-button {
    min-height: 104px;
    padding-left: 18px;
    padding-right: 112px;
  }

  .guide-start-label {
    font-size: 19px;
  }

  .guide-start-countdown {
    right: 12px;
    min-width: 76px;
    font-size: 21px;
    padding: 12px 9px;
  }

  .account-toggle {
    min-height: 44px;
    padding: 0 14px;
    font-size: 13px;
  }

  .account-panel {
    left: auto;
    right: auto;
    transform: none;
    width: min(348px, calc(100vw - 20px));
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 66px);
    overflow: auto;
    border-radius: 18px;
  }

  .account-panel-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  button.account-action {
    min-height: 56px;
  }

  .network-status-banner,
  .app-setup-card {
    margin-bottom: 10px;
  }

  .app-setup-card {
    padding: 12px;
  }

  .app-setup-head h2 {
    font-size: 20px;
  }

  .app-permission-list {
    grid-template-columns: 1fr;
  }

  .login-panel,
  .service-order {
    padding: 18px;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .prep-stats-panel {
    padding: 14px;
  }

  .prep-stats-modal {
    padding: 12px;
  }

  .guide-service-modal {
    padding: 10px;
  }

  .guide-service-panel {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
    padding: 14px;
  }

  .guide-service-header {
    align-items: stretch;
    flex-direction: column;
  }

  .guide-service-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .guide-service-grid {
    grid-template-columns: 1fr;
  }

  .guide-service-day {
    grid-template-columns: 56px minmax(0, 1fr);
    padding: 8px;
  }

  .guide-service-day-number {
    padding-right: 8px;
  }

  .guide-service-day-number strong {
    font-size: 22px;
  }

  .guide-service-total-card {
    grid-template-columns: 1fr;
  }

  .guide-service-row-service {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .guide-service-pay-box {
    justify-items: start;
    min-width: 0;
    text-align: left;
  }

  .account-calendar-modal {
    padding: 0;
    place-items: stretch;
  }

  .account-calendar-panel {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 10px max(10px, env(safe-area-inset-bottom, 0px));
  }

  .account-calendar-toolbar {
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 10px;
    padding-bottom: 8px;
    margin-bottom: 10px;
  }

  .account-calendar-toolbar h2 {
    font-size: 24px;
    line-height: 1.05;
  }

  .account-calendar-user {
    font-size: 12px;
    line-height: 1.25;
  }

  .account-calendar-close {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    font-size: 38px;
  }

  .account-calendar-nav {
    justify-content: stretch;
    gap: 6px;
    margin-bottom: 8px;
  }

  .account-calendar-nav button {
    flex: 1;
    min-height: 38px;
    padding: 0 8px;
  }

  .account-calendar-range {
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }

  .account-calendar-range strong {
    font-size: 17px;
    line-height: 1.15;
  }

  .account-calendar-range span {
    font-size: 12px;
    line-height: 1.2;
  }

  .account-calendar-auto-accept {
    flex: 0 0 auto;
    gap: 6px;
    min-height: 32px;
    padding: 0 10px;
    font-size: 11px;
  }

  .account-calendar-auto-accept input {
    width: 15px;
    height: 15px;
  }

  .account-calendar-two {
    grid-template-columns: 1fr;
  }

  .account-calendar-tabs {
    gap: 6px;
    margin-bottom: 8px;
  }

  .account-calendar-tabs button {
    min-height: 38px;
    padding: 0 8px;
  }

  .account-calendar-view.is-active {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .account-calendar-week {
    height: 100%;
    max-height: none;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
  }

  .account-calendar-two,
  .account-calendar-month {
    max-height: 100%;
    overflow: auto;
  }

  .account-calendar-day {
    padding: 9px;
  }

  .account-calendar-event {
    gap: 7px;
    padding: 9px;
  }

  .account-calendar-response-row,
  .account-calendar-availability-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-calendar-response-state,
  .account-calendar-availability {
    grid-column: 1 / -1;
  }

  .account-calendar-month-label,
  .account-calendar-month-cell {
    min-height: 40px;
  }

  .account-calendar-status {
    margin-top: 8px;
    text-align: center;
  }

  .bodega-check-modal {
    padding: 10px;
  }

  .bodega-check-panel {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
    padding: 14px;
  }

  .bodega-check-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .bodega-check-grid {
    grid-template-columns: 1fr;
  }

  .cash-payment-modal,
  .sobre-modal,
  .ticket-modal,
  .shared-ticket-modal {
    align-items: end;
    padding: 10px;
  }

  .cash-payment-panel,
  .sobre-panel,
  .ticket-panel,
  .shared-ticket-panel {
    --sobre-panel-pad: 14px;
    --ticket-panel-pad: 14px;
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
  }

  .sobre-toolbar {
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: start;
    gap: 10px;
  }

  .sobre-history-head {
    flex-direction: column;
    align-items: stretch;
  }

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

  .sobre-money-summary {
    grid-template-columns: 1fr;
  }

  .sobre-costs {
    grid-template-columns: 1fr;
  }

  .ticket-panel {
    gap: 10px;
  }

  .ticket-camera-shell {
    min-height: 230px;
    max-height: 42dvh;
  }

  .ticket-photo-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sobre-open-button,
  .ticket-open-button,
  .review-qr-open-button,
  .review-toggle-button {
    min-height: 56px;
    font-size: 20px;
  }

  .prep-stats-toolbar {
    flex-direction: column;
  }

  .prep-stats-actions {
    width: 100%;
  }

  .prep-stats-actions button:not(.panel-close) {
    flex: 1 1 auto;
  }

  .prep-stats-header {
    align-items: stretch;
    flex-direction: column;
  }

  .prep-stats-header label,
  .guide-service-header label {
    width: 100%;
  }

  .prep-stats-header input,
  .guide-service-header input,
  .guide-service-header select {
    width: 100%;
    min-width: 0;
  }

  .prep-stats-grid {
    grid-template-columns: 1fr;
  }

  .order-area {
    padding: 10px;
  }

  .service-order {
    border-radius: 6px;
    padding: 12px;
  }

  .document-header {
    gap: 10px;
    padding-bottom: 14px;
  }

  .document-header img {
    width: 170px;
  }

  .document-header h2 {
    font-size: 20px;
  }

  .document-header p {
    font-size: 12px;
  }

  .section-title {
    padding: 12px;
  }

  .service-details-section .section-title {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .service-details-section .section-title h3 {
    grid-column: 1;
    font-size: 18px;
  }

  .booking-badge {
    justify-self: center;
    white-space: normal;
    text-align: center;
  }

  .service-details-section .section-title .eyebrow {
    text-align: center;
  }

  .detail-row {
    min-height: 58px;
    padding: 10px 12px;
  }

  .detail-row strong {
    font-size: 16px;
  }

  .equipment-row {
    grid-template-columns: minmax(0, 1fr) minmax(34px, max-content);
    gap: 6px;
    min-height: 48px;
    padding: 8px;
  }

  .equipment-row span {
    font-size: 13px;
  }

  .equipment-row strong {
    min-width: 34px;
    min-height: 28px;
    padding: 0 6px;
  }

  .prep-stats-modal,
  .guide-service-modal,
  .account-calendar-modal,
  .bodega-check-modal,
  .cash-payment-modal,
  .sobre-modal,
  .ticket-modal,
  .shared-ticket-modal {
    padding: 0;
    place-items: stretch;
    align-items: stretch;
  }

  .prep-stats-panel,
  .prep-stats-modal.is-employee-stats .prep-stats-panel,
  .guide-service-panel,
  .bodega-check-panel,
  .cash-payment-panel,
  .sobre-panel,
  .ticket-panel,
  .shared-ticket-panel {
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: 100dvh;
    overflow: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding:
      max(12px, env(safe-area-inset-top, 0px))
      max(10px, env(safe-area-inset-right, 0px))
      max(10px, env(safe-area-inset-bottom, 0px))
      max(10px, env(safe-area-inset-left, 0px));
  }

  .ticket-panel {
    display: flex;
    flex-direction: column;
  }

  .shared-ticket-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.tour-cat-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(16, 17, 19, 0);
  opacity: 0;
  transition: opacity 0.28s ease, background 0.28s ease;
}

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

.tour-cat-overlay.is-visible {
  opacity: 1;
  background: rgba(16, 17, 19, 0.54);
  backdrop-filter: blur(2px);
}

.tour-cat-lottie {
  width: min(82vmin, 880px);
  height: min(82vmin, 880px);
  filter: drop-shadow(0 24px 54px rgba(0, 0, 0, 0.34));
  transform: scale(0.94);
  transition: transform 0.28s ease;
}

.tour-cat-overlay.is-visible .tour-cat-lottie {
  transform: scale(1);
}

@media (max-width: 640px) {
  .empty-state {
    min-height: calc(100dvh - 88px);
    padding: 8px;
  }

  .empty-sleep-lottie {
    width: min(98vw, 560px);
    height: min(64dvh, 560px);
    min-height: 300px;
  }

  .empty-state-copy {
    max-width: calc(100vw - 24px);
    padding: 14px 16px;
  }

  .tour-cat-lottie {
    width: min(92vw, 560px);
    height: min(92vw, 560px);
  }

}

@media print {
  body {
    background: #ffffff;
  }

  body.print-prep-stats {
    color: #111111;
  }

  body.print-prep-stats .login-view,
  body.print-prep-stats .orders-view,
  body.print-prep-stats .prep-stats-backdrop,
  body.print-prep-stats .prep-stats-actions {
    display: none !important;
  }

  body.print-prep-stats .prep-stats-modal {
    position: static;
    display: block !important;
    padding: 0;
  }

  body.print-prep-stats .prep-stats-panel {
    width: auto;
    max-width: none;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  body.print-prep-stats .prep-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.print-prep-stats .prep-stats-card {
    break-inside: avoid;
  }

  .sidebar,
  .empty-state {
    display: none !important;
  }

  .workspace-layout,
  .orders-view,
  .order-area {
    display: block;
    min-height: auto;
    padding: 0;
  }

  .service-order {
    max-width: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .order-section,
  .document-header,
  .crew-strip {
    break-inside: avoid;
  }
}

