:root {
  --black: #0b0b0b;
  --ink: #171717;
  --muted: #666666;
  --line: #e4e4e4;
  --paper: #f6f6f6;
  --white: #ffffff;
  --orange: #ff7a00;
  --orange-dark: #d96200;
  --danger: #b23b3b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  background: var(--black);
  color: var(--white);
}

.app-logo {
  width: 190px;
  padding: 10px;
  background: var(--white);
  border-radius: 8px;
}

.module-nav {
  display: grid;
  gap: 8px;
}

.nav-item,
.public-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
}

.nav-item.active {
  color: var(--black);
  background: var(--orange);
}

.public-link {
  margin-top: auto;
  border-color: rgba(255, 255, 255, 0.18);
}

.workspace {
  min-width: 0;
  padding: 28px;
}

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

.eyebrow {
  margin: 0 0 4px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 2rem;
}

h2 {
  margin-bottom: 0;
}

.button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}

.button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.primary {
  color: var(--white);
  background: var(--orange);
}

.ghost {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
}

.full {
  width: 100%;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-rows: 88px minmax(0, 1fr);
  overflow: auto;
  background: var(--black);
}

.login-screen.is-hidden {
  display: none;
}

.login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 6vw;
  background: var(--white);
  border-bottom: 4px solid var(--orange);
}

.login-header img {
  width: 190px;
  max-width: 50vw;
}

.login-header a,
.login-back-link {
  color: #1f2937;
  font-weight: 900;
  text-decoration: none;
}

.login-hero {
  min-height: calc(100vh - 88px);
  display: grid;
  place-items: center;
  padding: 42px 18px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.42)),
    url("https://images.unsplash.com/photo-1519641471654-76ce0107ad1b?auto=format&fit=crop&w=1900&q=82") center / cover;
}

.login-card {
  width: min(460px, calc(100% - 16px));
  display: grid;
  gap: 16px;
  padding: 34px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.login-card img {
  width: 190px;
}

.login-card h2 {
  margin-bottom: 2px;
  color: #111827;
  font-size: 2.35rem;
  line-height: 0.98;
}

.login-card input {
  min-height: 52px;
  border-radius: 0;
}

.login-card .button {
  min-height: 52px;
  border-radius: 0;
}

.login-back-link {
  justify-self: center;
  color: var(--muted);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.is-hidden {
  display: none;
}

[hidden] {
  display: none !important;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card,
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: var(--orange);
  font-size: 1.7rem;
}

.panel {
  padding: 18px;
}

.upcoming-panel {
  margin-bottom: 18px;
  border-color: rgba(255, 122, 0, 0.32);
  box-shadow: 0 14px 36px rgba(255, 122, 0, 0.08);
}

.upcoming-panel.is-clear {
  border-color: var(--line);
  box-shadow: none;
}

.upcoming-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  color: var(--white);
  background: var(--orange);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.upcoming-badge.is-clear {
  color: var(--muted);
  background: #f2f2f2;
}

.upcoming-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.upcoming-empty.is-danger {
  margin: -4px 0 12px;
  color: var(--danger);
}

.operations-alert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.operation-alert {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 5px solid #d6d6d6;
  border-radius: 8px;
  background: #fff;
}

.operation-alert.is-danger {
  border-left-color: var(--danger);
  background: #fff7f7;
}

.operation-alert.is-warning {
  border-left-color: var(--orange);
  background: #fffaf5;
}

.operation-alert.is-info {
  border-left-color: #3f6f8f;
  background: #f7fbfd;
}

.operation-alert.is-clear {
  opacity: 0.72;
  background: #fbfbfb;
}

.operation-alert > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.operation-alert strong {
  line-height: 1.2;
}

.operation-alert > div span {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--black);
  font-size: 0.78rem;
  font-weight: 900;
}

.operation-alert.is-clear > div span {
  color: var(--muted);
  background: #eeeeee;
}

.operation-alert p {
  min-height: 38px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.operation-alert .small-button {
  width: fit-content;
}

.upcoming-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.upcoming-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--orange);
  border-radius: 8px;
  background: #fffaf5;
}

.upcoming-card.is-confirmed {
  border-left-color: var(--black);
}

.upcoming-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.upcoming-card strong {
  font-size: 1rem;
}

.upcoming-client {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 900;
}

.upcoming-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.upcoming-date {
  color: var(--orange);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}

.split {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
}

.split > * {
  min-width: 0;
}

.form-panel,
.form-grid {
  display: grid;
  gap: 14px;
}

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

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

textarea {
  padding-top: 10px;
  resize: vertical;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.status.new,
.status.draft,
.status.contracted {
  color: var(--orange-dark);
  background: rgba(255, 122, 0, 0.14);
}

.status.confirmed,
.status.active {
  color: var(--black);
  background: rgba(0, 0, 0, 0.1);
}

.status.cancelled,
.status.closed,
.status.blocked {
  color: var(--danger);
  background: rgba(178, 59, 59, 0.12);
}

.clients-layout {
  grid-template-columns: minmax(320px, 0.46fr) minmax(0, 1.54fr);
  align-items: start;
}

.client-form-card {
  position: sticky;
  top: 18px;
}

.client-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.client-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 14px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.client-search label {
  margin: 0;
}

.client-search input {
  min-height: 42px;
}

.client-search span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.clients-table {
  min-width: 900px;
}

.clients-table th {
  padding: 7px 9px;
}

.clients-table td {
  padding: 8px 9px;
  vertical-align: middle;
}

.clients-table td[data-label="Cliente"],
.clients-table td[data-label="Contacto"] {
  min-width: 190px;
}

.clients-table td[data-label="Estado"] {
  width: 92px;
}

.clients-table td[data-label="Observacion"] {
  width: 220px;
}

.clients-table td[data-label="Acciones"] {
  width: 184px;
}

.clients-table .row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.clients-table .small-button {
  min-height: 28px;
  padding: 0 7px;
  font-size: 0.74rem;
}

.client-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.18;
}

.client-block-reason {
  min-width: 0;
  min-height: 36px;
  max-height: 42px;
  padding-top: 7px;
  font-size: 0.76rem;
  line-height: 1.16;
}

.client-history-panel {
  margin-top: 18px;
}

.client-history-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.client-history-summary div {
  display: grid;
  gap: 4px;
  min-height: 72px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.client-history-summary span,
.client-history-card dt,
.history-mini-row span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.client-history-summary strong {
  font-size: 1rem;
}

.client-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.client-history-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.client-history-card h3 {
  margin: 0;
  font-size: 1rem;
}

.client-history-card dl {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.client-history-card dd {
  margin: 0;
  font-weight: 800;
  word-break: break-word;
}

.wide-history-card {
  grid-column: 1 / -1;
}

.history-mini-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.history-mini-row p {
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edit-action {
  border-color: rgba(255, 122, 0, 0.45);
  color: var(--orange-dark);
  background: rgba(255, 122, 0, 0.1);
}

.small-button.primary-action,
.primary-action {
  min-width: fit-content;
  color: var(--white);
  background: var(--orange);
  border-color: var(--orange);
}

.contract-edit-note {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.contract-digital-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.reception-panel {
  margin-top: 18px;
}

.reception-checks,
.reception-charges,
.reception-payment-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.reception-checks {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reception-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.reception-checks input {
  width: auto;
  min-height: auto;
}

.reception-charges {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reception-payment-box {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-color: #ffd7b0;
  background: #fff8f0;
}

.reception-payment-box.is-clear {
  border-color: var(--line);
  background: #fafafa;
}

.reception-payment-box .section-row,
.reception-charges .section-row {
  grid-column: 1 / -1;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.inline-check input {
  width: auto;
  min-height: auto;
}

.digital-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.signature-pad,
.inspection-pad {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  touch-action: none;
}

.signature-pad {
  height: 150px;
}

.inspection-pad-wrap {
  position: relative;
  aspect-ratio: 1200 / 520;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffef8;
}

.inspection-pad-wrap.is-vertical {
  width: min(100%, 430px);
  max-height: 78vh;
  aspect-ratio: 412 / 920;
  margin: 0 auto;
}

.inspection-pad-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0.9;
  pointer-events: none;
}

.inspection-pad-wrap.is-vertical img {
  inset: auto;
  top: 50%;
  left: 50%;
  width: calc(100% * 920 / 412);
  height: calc(100% * 412 / 920);
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center;
}

.inspection-pad-wrap .inspection-pad {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  pointer-events: none;
  touch-action: pan-y;
}

.inspection-pad-wrap.is-drawing .inspection-pad {
  cursor: crosshair;
  pointer-events: auto;
  touch-action: none;
}

.inspection-modal-card {
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  overscroll-behavior: contain;
}

.inspection-pad-large {
  display: none;
  min-height: 0;
}

.inspection-actions {
  justify-content: flex-end;
}

.guided-inspection {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.inspection-map {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7f7f7);
}

.map-car-image {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(48%, 170px);
  max-height: 252px;
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.16));
  pointer-events: none;
}

.map-shot {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #c8d6c8;
  border-radius: 50%;
  background: #ffffff;
  color: #17663a;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.map-shot:hover,
.map-shot:focus-visible {
  border-color: currentColor;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
  outline: none;
}

.map-shot.is-complete {
  border-color: #17663a;
  background: #eef8f0;
}

.map-camera {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.map-camera::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -5px;
  width: 7px;
  height: 4px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: #fff;
}

.map-camera::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border: 2px solid currentColor;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.map-shot.is-front {
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
}

.map-shot.is-rear {
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
}

.map-shot.is-left {
  left: 18px;
  top: 54%;
  transform: translateY(-50%);
}

.map-shot.is-right {
  right: 18px;
  top: 54%;
  transform: translateY(-50%);
}

.map-shot.is-dashboard {
  right: 18px;
  top: 18px;
  color: var(--orange-dark);
}

.guided-photo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.extra-damage-heading {
  margin-top: 14px;
}

.extra-photo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.guided-photo {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
}

.guided-photo > span {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.extra-photo-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.extra-photo-title span {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.extra-photo-title .small-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.72rem;
}

.guided-photo-preview {
  display: grid;
  min-height: 92px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #cfcfcf;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-align: center;
}

.guided-photo-preview.has-photo {
  cursor: zoom-in;
  border-style: solid;
}

.guided-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guided-photo input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.inspection-photo-card {
  width: min(760px, calc(100vw - 22px));
}

.inspection-photo-card img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101010;
}

.inspection-photo-actions {
  justify-content: flex-end;
}

.inspection-photo-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.guided-photo input {
  min-height: 34px;
  padding: 6px;
  font-size: 0.76rem;
}

.guided-photo textarea {
  min-height: 44px;
  padding-top: 7px;
  font-size: 0.76rem;
}

#toggleInspectionDrawMode.is-active {
  color: #fff;
  background: #111;
  border-color: #111;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.42);
}

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

.modal-card {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.small-button {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  font-weight: 900;
}

.danger-button {
  border-color: #f0c7c7;
  background: #fff3f3;
  color: #b42323;
}

.contract-list,
.fleet-cards {
  display: grid;
  gap: 12px;
}

.fleet-editor-card {
  padding: 16px;
}

.fleet-editor-card header {
  margin-bottom: 12px;
}

.fleet-editor-note {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.fleet-editor-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.fleet-editor-form label {
  min-width: 0;
}

.fleet-editor-form textarea {
  min-height: 138px;
  line-height: 1.45;
  resize: vertical;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.manual-reservation-panel {
  margin: 0 0 18px;
  border: 1px solid rgba(255, 122, 0, 0.28);
  border-radius: 8px;
  background: #fffaf4;
}

.manual-reservation-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.manual-reservation-panel summary::-webkit-details-marker {
  display: none;
}

.manual-reservation-panel summary::after {
  content: "+";
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--black);
  color: #fff;
  font-weight: 900;
}

.manual-reservation-panel[open] summary::after {
  content: "-";
}

.manual-reservation-panel summary strong {
  display: block;
  font-size: 1.05rem;
}

.manual-reservation-panel summary small,
.manual-reservation-footer span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.manual-reservation-form {
  padding: 0 16px 16px;
}

.manual-reservation-check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.manual-reservation-check input {
  width: auto;
  min-height: 0;
}

.manual-reservation-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: #111;
  color: #fff;
}

.manual-reservation-footer strong {
  color: #fff;
}

.manual-reservation-footer span {
  color: rgba(255, 255, 255, 0.72);
}

.manual-price-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 22px;
  margin-top: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.fleet-status-field {
  grid-column: 4;
  grid-row: 3;
}

.fleet-units-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 4px 0 0 #111111;
}

.fleet-units-section .section-row {
  margin-bottom: 0;
}

.fleet-units-section label {
  margin: 0;
}

.fleet-units-section textarea {
  min-height: 88px;
  line-height: 1.45;
  font-family: Arial, Helvetica, sans-serif;
}

.fleet-unit-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f1f1;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.fleet-editor-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  color: var(--muted);
  font-weight: 900;
}

.maintenance-layout {
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
}

.payments-layout {
  grid-template-columns: minmax(300px, 0.68fr) minmax(0, 1.32fr);
}

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

.payment-summary-grid div {
  display: grid;
  gap: 4px;
  min-height: 70px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.payment-summary-grid span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-summary-grid strong {
  font-size: 1rem;
}

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

.payment-card {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.payment-card.is-legacy {
  background: #fbfbfb;
}

.payment-card header,
.payment-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.payment-card header div {
  display: grid;
  gap: 3px;
}

.payment-card header span:not(.status),
.payment-card-footer,
.payment-card p {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.payment-card p {
  margin: 0;
}

.report-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.report-filters .button {
  min-width: 118px;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.report-summary article,
.report-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.report-summary article {
  display: grid;
  gap: 5px;
  min-height: 78px;
  align-content: center;
  padding: 12px;
}

.report-summary span,
.report-row span,
.report-note,
.section-kicker {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.report-summary span,
.section-kicker {
  text-transform: uppercase;
}

.report-summary strong {
  font-size: 1.18rem;
  line-height: 1.15;
}

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

.report-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
}

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

.report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: #fbfbfb;
}

.report-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.report-row > div:last-child {
  text-align: right;
}

.report-row strong {
  line-height: 1.2;
  word-break: break-word;
}

.report-note {
  margin: 12px 0 0;
  line-height: 1.4;
}

.promotions-layout {
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
}

.promotion-side {
  display: grid;
  gap: 12px;
}

.promotion-targets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.promotion-targets legend {
  padding: 0 6px;
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.promotion-targets label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.86rem;
}

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

.promotion-summary {
  padding: 10px 12px;
  border: 1px solid #ffd7b0;
  border-radius: 8px;
  background: #fff7ef;
  color: #9a4a00;
  font-weight: 900;
  line-height: 1.35;
}

.promotion-preview {
  min-height: 160px;
}

.promo-mail-preview {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.promo-mail-preview img {
  max-width: 150px;
  height: auto;
}

.promo-mail-preview span,
.promo-mail-preview small,
.mini-list-row span,
.promotion-history-card p,
.promotion-history-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.promo-mail-preview h3,
.promo-mail-preview p {
  margin: 0;
}

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

.promotion-stats article {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.promotion-stats span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.promotion-stats strong {
  font-size: 1.08rem;
}

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

.mini-list,
.promotion-history {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mini-list-row,
.promotion-history-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mini-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.mini-list-row div,
.promotion-history-card header div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.promotion-history-card {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.promotion-history-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.promotion-history-card p {
  margin: 0;
}

.discount-code-panel {
  display: grid;
  gap: 14px;
}

.discount-code-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.discount-code-form .wide {
  grid-column: 1 / -1;
}

.discount-code-list {
  display: grid;
  gap: 10px;
}

.discount-code-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid #1f8f65;
  border-radius: 8px;
  background: #fff;
}

.discount-code-card.is-muted {
  border-left-color: var(--muted);
  background: #fafafa;
}

.discount-code-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.discount-code-card header div {
  display: grid;
  gap: 3px;
}

.discount-code-card header span:not(.status),
.discount-code-meta {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.discount-code-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.discount-code-meta span {
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f2f2f2;
}

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

.assistant-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.assistant-summary article,
.assistant-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.assistant-summary article {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.assistant-summary span,
.assistant-card header span,
.assistant-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.assistant-summary strong {
  font-size: 1.45rem;
}

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

.assistant-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.assistant-card.is-new {
  border-left: 4px solid var(--brand);
}

.assistant-card.is-in_progress {
  border-left: 4px solid #111;
}

.assistant-card.is-resolved {
  opacity: 0.76;
}

.assistant-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.assistant-card header div {
  display: grid;
  gap: 4px;
}

.assistant-status {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--ink);
  background: #f1f1f1;
}

.assistant-note {
  margin: 0;
}

.audit-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.audit-card > div {
  display: grid;
  gap: 4px;
}

.audit-card span,
.audit-card time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.audit-action {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--black) !important;
  background: #eeeeee;
  font-size: 0.7rem !important;
  text-transform: uppercase;
}

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

.maintenance-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.maintenance-card.is-closed {
  opacity: 0.72;
}

.maintenance-card.is-scheduled {
  border-color: #ffd5ad;
  border-left: 4px solid var(--orange);
  background: #fffdf9;
}

.maintenance-card.is-scheduled .status {
  color: #c75b00;
  background: #ffe6cf;
}

.maintenance-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.maintenance-card header div {
  display: grid;
  gap: 3px;
}

.maintenance-card header span:not(.status),
.maintenance-card p,
.maintenance-meta {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.maintenance-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.maintenance-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f4f4f4;
}

.empty-state {
  color: var(--muted);
  font-weight: 800;
}

.settings-note {
  margin: -8px 0 16px;
  color: var(--muted);
  font-weight: 800;
}

.dropoff-editor {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.dropoff-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.users-layout {
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.permissions-grid legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.permission-group {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #ededed;
  border-radius: 8px;
  background: var(--white);
}

.permission-group h3 {
  margin: 0 0 2px;
  color: var(--black);
  font-size: 0.82rem;
}

.permission-group label {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.permission-group input {
  width: 17px;
  min-width: 17px;
  min-height: 17px;
  padding: 0;
  accent-color: var(--orange);
}

.form-actions {
  display: flex;
  gap: 10px;
}

.form-actions .button {
  flex: 1;
}

.promotion-targets input {
  width: auto;
  min-height: auto;
}

.user-name {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.users-table {
  min-width: 560px;
}

.users-table th,
.users-table td {
  padding: 11px 10px;
}

.permission-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.permission-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #f1f1f1;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.permission-chip.is-admin {
  color: var(--white);
  background: var(--black);
}

.is-locked,
.form-panel.is-locked {
  opacity: 0.68;
  pointer-events: none;
}

.button.danger {
  color: var(--danger);
}

.closed-contracts {
  margin-top: 16px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.closed-contracts summary {
  cursor: pointer;
  font-weight: 900;
}

.closed-list {
  margin-top: 12px;
}

.additional-driver-section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.contract-extra-section {
  padding: 16px;
  border: 1px solid #ffd7b3;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf5 0%, #ffffff 100%);
  box-shadow: inset 4px 0 0 var(--orange);
}

.contract-extra-grid {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  counter-reset: extra;
}

.contract-extra-grid label:nth-child(odd) {
  counter-increment: extra;
  position: relative;
  padding-left: 36px;
}

.contract-extra-grid label:nth-child(odd)::before {
  content: counter(extra);
  position: absolute;
  left: 0;
  top: 28px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.contract-extra-grid label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.contract-extra-grid input {
  background: #fff;
}

.contract-document-section {
  padding: 16px;
  border: 1px solid #ffd7b3;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf5 0%, #ffffff 100%);
  box-shadow: inset 4px 0 0 var(--orange);
}

.contract-document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contract-document-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.contract-document-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.contract-document-preview {
  display: grid;
  min-height: 170px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #cfcfcf;
  border-radius: 8px;
  background: #fafafa;
  color: var(--muted);
  font-weight: 900;
}

.contract-document-preview.has-photo {
  border-style: solid;
  background: #fff;
}

.contract-document-preview img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
}

.contract-document-input {
  gap: 6px;
}

.button.small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.section-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.contract-extra-hint {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.additional-drivers {
  display: grid;
  gap: 10px;
}

.additional-driver {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.additional-driver.is-hidden {
  display: none;
}

.additional-driver legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  color: var(--brand);
  font-weight: 900;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--danger);
  cursor: pointer;
  font-size: 0.95rem;
}

.icon-button:hover {
  border-color: var(--danger);
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.calendar-controls label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-controls select {
  width: auto;
  min-width: 118px;
  min-height: 40px;
  margin: 0;
  padding: 0 30px 0 10px;
}

.calendar-controls strong {
  min-width: 150px;
  text-align: center;
  text-transform: capitalize;
}

.calendar-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.calendar-metric {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.calendar-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-metric strong {
  display: block;
  margin-top: 4px;
  color: var(--orange);
  font-size: 1.65rem;
  line-height: 1;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 999px;
}

.legend-dot.occupied {
  background: var(--orange);
}

.legend-dot.pending {
  background: #777777;
}

.legend-dot.rented {
  background: var(--black);
}

.legend-dot.maintenance {
  background: #3f6f8f;
}

.legend-dot.start {
  background: var(--black);
}

.legend-dot.end {
  background: var(--danger);
}

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

.weekday {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 96px;
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.calendar-day.is-muted {
  opacity: 0.42;
}

.day-number {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 900;
}

.day-count {
  color: var(--orange);
  font-size: 0.82rem;
}

.day-summary {
  display: grid;
  gap: 5px;
}

.summary-chip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px 7px;
  color: var(--white);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.summary-chip.pending {
  background: #777777;
}

.summary-chip.occupied {
  background: var(--orange);
}

.summary-chip.rented {
  background: var(--black);
}

.summary-chip.maintenance {
  background: #3f6f8f;
}

.calendar-agenda-panel {
  margin-top: 18px;
}

.calendar-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.calendar-filters label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-filters select {
  width: auto;
  min-width: 190px;
  min-height: 40px;
  margin: 0;
}

.agenda-table td {
  vertical-align: middle;
}

.calendar-status-new {
  background: #eeeeee;
  color: #555555;
}

.calendar-status-confirmed {
  background: #ffe7d3;
  color: #d85d00;
}

.calendar-status-active {
  background: #111111;
  color: #ffffff;
}

.calendar-status-maintenance {
  background: #e5f0f5;
  color: #24546f;
}

.calendar-status-disabled {
  background: #eef0f3;
  color: #555d68;
}

.calendar-summary-panel {
  margin-top: 18px;
}

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

.plate-status-metric,
.plate-status-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.plate-status-metric {
  display: grid;
  gap: 5px;
  min-height: 72px;
  align-content: center;
  padding: 12px;
}

.plate-status-metric span,
.plate-status-card span,
.plate-status-card p {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.plate-status-metric span {
  text-transform: uppercase;
}

.plate-status-metric strong {
  font-size: 1.45rem;
}

.plate-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.plate-status-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-left: 5px solid #1f9d55;
}

.plate-status-card.is-new {
  border-left-color: #9b9b9b;
}

.plate-status-card.is-confirmed {
  border-left-color: var(--orange);
}

.plate-status-card.is-active {
  border-left-color: #111;
}

.plate-status-card.is-maintenance {
  border-left-color: #3f6f8f;
}

.plate-status-card.is-disabled {
  border-left-color: #8a8f98;
}

.plate-status-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 1rem;
}

.plate-status-card p {
  min-height: 34px;
  margin: 6px 0 0;
  line-height: 1.35;
}

.plate-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e8f7ee;
  color: #17663a;
}

.plate-status-pill.is-new {
  color: #555;
  background: #eee;
}

.plate-status-pill.is-confirmed {
  color: var(--orange-dark);
  background: #ffe7d3;
}

.plate-status-pill.is-active {
  color: #fff;
  background: #111;
}

.plate-status-pill.is-maintenance {
  color: #24546f;
  background: #e5f0f5;
}

.plate-status-pill.is-disabled {
  color: #555d68;
  background: #eef0f3;
}

.vehicle-calendar {
  display: grid;
  gap: 12px;
}

.unit-calendar-shell {
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.unit-calendar-grid {
  display: grid;
  grid-template-columns: minmax(170px, 220px) repeat(var(--days), minmax(28px, 1fr)) 54px;
  min-width: calc(224px + (var(--days) * 30px));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.unit-head-label,
.unit-head-total,
.unit-day-head,
.unit-name,
.unit-day,
.unit-total {
  min-height: 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.unit-head-label,
.unit-head-total,
.unit-day-head {
  display: grid;
  place-items: center;
  background: #f4f4f4;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.unit-head-label {
  justify-content: start;
  padding: 0 10px;
}

.unit-row {
  display: contents;
}

.unit-name {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 7px 10px;
  background: #fff;
}

.unit-name strong {
  font-size: 0.82rem;
}

.unit-name span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.unit-day {
  position: relative;
  background: #fbfbfb;
}

.unit-day.is-new {
  background: #d8d8d8;
}

.unit-day.is-confirmed {
  background: rgba(255, 122, 0, 0.72);
}

.unit-day.is-active {
  background: #111;
}

.unit-day.is-maintenance {
  background: #3f6f8f;
}

.unit-day.is-disabled {
  background: repeating-linear-gradient(
    135deg,
    #8a8f98 0,
    #8a8f98 8px,
    #767c85 8px,
    #767c85 16px
  );
}

.unit-total {
  display: grid;
  place-items: center;
  color: var(--black);
  background: #fafafa;
  font-size: 0.76rem;
  font-weight: 900;
}

.unit-empty {
  grid-column: 1 / -1;
  padding: 14px;
  color: var(--muted);
  font-weight: 800;
}

.vehicle-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.vehicle-name {
  font-weight: 900;
}

.vehicle-name span {
  color: var(--muted);
  font-size: 0.82rem;
}

.vehicle-occupancy {
  display: grid;
  gap: 7px;
}

.vehicle-occupancy-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.vehicle-occupancy-top strong {
  color: var(--black);
}

.vehicle-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e8e8;
}

.vehicle-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
}

.vehicle-occupancy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.contract-card,
.fleet-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.contract-card header,
.fleet-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.contract-card-title {
  font-weight: 900;
}

.contract-card-meta,
.contract-card-money {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.contract-card-money {
  color: var(--ink);
}

.message {
  min-height: 22px;
  margin: 0;
  color: var(--orange-dark);
  font-weight: 900;
}

.message.error {
  color: var(--danger);
}

@media (max-width: 960px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    grid-template-columns: 1fr;
  }

  .workspace {
    width: 100%;
    max-width: 100vw;
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }

  .topbar .button {
    width: 100%;
  }

  h1 {
    font-size: 1.65rem;
  }

  .panel,
  .stat-card {
    padding: 14px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .login-screen {
    grid-template-rows: 74px minmax(0, 1fr);
  }

  .login-header {
    padding: 12px 18px;
  }

  .login-header img {
    width: 150px;
  }

  .login-header a {
    font-size: 0.85rem;
  }

  .login-hero {
    min-height: calc(100vh - 74px);
    place-items: start center;
    padding: 28px 12px;
  }

  .login-card {
    padding: 24px;
  }

  .login-card h2 {
    font-size: 2rem;
  }

  .sidebar {
    position: static;
    height: auto;
    gap: 14px;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    padding: 14px;
  }

  .app-logo {
    width: 154px;
    padding: 8px;
  }

  .module-nav {
    display: flex;
    gap: 8px;
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    margin: 0 -14px;
    padding: 0 14px 8px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav-item,
  .public-link {
    min-width: max-content;
    min-height: 38px;
    padding: 0 11px;
    font-size: 0.86rem;
  }

  .public-link {
    margin-top: 0;
    width: fit-content;
  }

  .module-nav,
  .stats-grid,
  .split,
  .promotions-layout,
  .promotion-targets,
  .promotion-targets.compact,
  .promotion-stats,
  .discount-code-form,
  .clients-layout,
  .form-grid,
  .fleet-editor-form,
  .client-form-grid,
  .client-history-summary,
  .client-history-grid,
  .payment-summary-grid,
  .client-search,
  .dropoff-row,
  .additional-driver,
  .contract-document-grid,
  .contract-digital-grid,
  .vehicle-row {
    grid-template-columns: 1fr;
  }

  .client-form-card {
    position: static;
  }

  .table-wrap {
    margin: 0 -6px;
    padding: 0 6px;
    border-radius: 8px;
  }

  table {
    min-width: 620px;
  }

  .clients-table {
    min-width: 0;
  }

  th,
  td {
    padding: 10px;
  }

  .row-actions {
    gap: 6px;
  }

  .mini-list-row,
  .promotion-history-card header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .small-button {
    flex: 1 1 120px;
    min-height: 34px;
  }

  .calendar-controls,
  .calendar-filters,
  .form-actions,
  .section-row {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-controls label,
  .calendar-filters label,
  .calendar-filters select {
    width: 100%;
  }

  .calendar-controls select,
  .calendar-filters select {
    min-width: 0;
  }

  .calendar-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .calendar-controls .button,
  .calendar-controls label,
  .calendar-controls strong {
    min-width: 0;
    width: 100%;
  }

  .calendar-controls strong {
    grid-column: 1 / -1;
    order: -1;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fafafa;
    color: var(--black);
    font-size: 0.9rem;
    text-align: center;
  }

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

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

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

  .calendar-legend span {
    min-height: 30px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fafafa;
    font-size: 0.72rem;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
  }

  .weekday {
    display: grid;
    min-height: 24px;
    place-items: center;
    font-size: 0.62rem;
  }

  .calendar-day {
    min-height: 46px;
    padding: 5px;
    border-radius: 6px;
  }

  .day-number {
    margin-bottom: 2px;
    font-size: 0.76rem;
  }

  .day-count {
    display: inline-grid;
    min-width: 16px;
    height: 16px;
    place-items: center;
    border-radius: 999px;
    background: var(--orange);
    color: #fff;
    font-size: 0.62rem;
  }

  .day-summary {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-wrap: wrap;
  }

  .summary-chip {
    width: 7px;
    height: 7px;
    overflow: hidden;
    padding: 0;
    border-radius: 999px;
    color: transparent;
    font-size: 0;
  }

  .contract-extra-grid,
  .report-grid,
  .reception-checks,
  .reception-charges,
  .reception-payment-box,
  .permissions-grid {
    grid-template-columns: 1fr;
  }

  .report-filters {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-filters .button {
    grid-column: 1 / -1;
    width: 100%;
  }

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

  .fleet-status-field {
    grid-column: auto;
    grid-row: auto;
  }

  .fleet-units-section .section-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-block-reason {
    min-width: 0;
  }

  .wide-history-card {
    grid-column: auto;
  }

  .contract-extra-grid label:nth-child(odd) {
    padding-left: 0;
  }

  .contract-extra-grid label:nth-child(odd)::before {
    display: none;
  }

  .fleet-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .inspection-modal-card {
    width: min(100%, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    padding: 14px;
    gap: 10px;
  }

  .inspection-pad-large {
    min-height: 0;
    height: min(54vh, 560px);
    max-height: 54vh;
    width: min(100%, calc(54vh * 412 / 920), 300px);
  }

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

  .inspection-map {
    min-height: 258px;
  }

  .map-car-image {
    width: min(50%, 128px);
    max-height: 236px;
  }

  .map-shot {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
  }

  .map-camera {
    width: 15px;
    height: 12px;
    border-width: 2px;
  }

  .map-shot.is-left {
    left: 12px;
    top: 54%;
  }

  .map-shot.is-right {
    right: 12px;
    top: 54%;
  }

  .map-shot.is-dashboard {
    right: 12px;
    top: 12px;
  }

  .guided-photo-grid,
  .extra-photo-grid {
    grid-template-columns: 1fr;
  }

  .guided-photo {
    grid-template-columns: 98px minmax(0, 1fr);
    align-items: start;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .guided-photo > span,
  .extra-photo-title,
  .guided-photo textarea {
    grid-column: 2;
  }

  .extra-photo-title {
    align-items: flex-start;
  }

  .guided-photo-preview {
    grid-row: 1 / 4;
    min-height: 104px;
  }

  .vehicle-days {
    grid-template-columns: repeat(7, minmax(28px, 1fr));
  }

  .wide {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  .workspace {
    padding: 12px;
  }

  .sidebar {
    padding: 12px;
  }

  .login-card {
    padding: 20px;
  }

  .panel,
  .stat-card {
    border-radius: 6px;
    padding: 12px;
  }

  .panel-heading {
    margin-bottom: 12px;
  }

  .panel-heading h2 {
    font-size: 1.25rem;
    line-height: 1.15;
  }

  .assistant-summary {
    grid-template-columns: 1fr;
  }

  .assistant-card header {
    display: grid;
  }

  .eyebrow {
    font-size: 0.7rem;
  }

  input,
  select,
  textarea,
  .button {
    min-height: 44px;
  }

  label {
    gap: 5px;
    font-size: 0.78rem;
  }

  input,
  select,
  textarea {
    padding-inline: 10px;
    font-size: 0.9rem;
  }

  .module-nav {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    margin: 0 -12px;
    padding-inline: 12px;
  }

  .public-link {
    width: 100%;
    justify-content: center;
  }

  .table-wrap {
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  table {
    min-width: 0;
  }

  .users-table {
    min-width: 0;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tr {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 5px 0;
    border: 0;
    font-size: 0.9rem;
    line-height: 1.3;
    word-break: break-word;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .table-wrap td:not([data-label]) {
    display: block;
  }

  .table-wrap td:not([data-label])::before {
    content: none;
  }

  .table-wrap td[data-label="Cliente"],
  .table-wrap td[data-label="Usuario"] {
    grid-template-columns: 1fr;
    gap: 3px;
    padding-bottom: 8px;
  }

  .table-wrap td[data-label="Cliente"]::before,
  .table-wrap td[data-label="Usuario"]::before {
    content: none;
  }

  .table-wrap td strong {
    font-size: 1rem;
    line-height: 1.25;
  }

  .user-name,
  .client-search span {
    font-size: 0.8rem;
  }

  .client-search {
    gap: 8px;
    margin: 10px 0 12px;
    padding: 10px;
  }

  .client-history-summary {
    gap: 8px;
  }

  .client-history-card dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .client-search input {
    min-height: 40px;
  }

  .client-block-reason {
    width: 100%;
  }

  .agenda-table {
    min-width: 0;
  }

  .calendar-grid {
    gap: 3px;
  }

  .calendar-day {
    min-height: 42px;
    padding: 4px;
  }

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

  .calendar-controls .button {
    min-height: 38px;
    padding: 0 8px;
    font-size: 0.78rem;
  }

  .calendar-controls label {
    font-size: 0.66rem;
  }

  .calendar-controls select {
    min-height: 38px;
    font-size: 0.82rem;
  }

  .calendar-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0;
  }

  .calendar-metric {
    padding: 9px;
  }

  .calendar-metric span {
    font-size: 0.63rem;
  }

  .calendar-metric strong {
    font-size: 1.25rem;
  }

  .calendar-legend {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 10px;
  }

  .calendar-legend span {
    font-size: 0.66rem;
  }

  .legend-dot {
    width: 8px;
    height: 8px;
  }

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

  .row-actions .small-button {
    width: 100%;
    min-width: 0;
    flex: 0 1 auto;
    min-height: 34px;
    padding: 0 8px;
    font-size: 0.78rem;
    line-height: 1.1;
  }

  .users-table td[data-label="Acciones"] {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .users-table td[data-label="Acciones"]::before {
    content: attr(data-label);
  }

  .users-table td[data-label="Acciones"] .row-actions {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .users-table td[data-label="Acciones"] .small-button {
    min-width: 0;
  }

  .contract-card header,
  .fleet-card header,
  .maintenance-card header,
  .payment-card header,
  .payment-card-footer,
  .operation-alert > div,
  .audit-card,
  .upcoming-card > div:first-child,
  .vehicle-occupancy-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .contract-card,
  .fleet-card {
    gap: 7px;
    padding: 11px;
  }

  .contract-card-title {
    font-size: 0.96rem;
    line-height: 1.25;
  }

  .contract-card-meta,
  .contract-card-money {
    font-size: 0.82rem;
  }

  .contract-card .row-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 4px;
  }

  .contract-card .small-button {
    min-height: 32px;
    padding: 0 6px;
    font-size: 0.72rem;
  }

  .contract-edit-note {
    grid-column: 1 / -1;
    min-height: 28px;
    font-size: 0.72rem;
  }

  .status {
    width: fit-content;
    max-width: 100%;
    min-height: 24px;
    padding: 0 8px;
    font-size: 0.7rem;
  }

  .permission-group {
    padding: 8px;
  }

  .modal {
    padding: 10px;
  }

  .modal-card {
    max-height: calc(100vh - 20px);
    overflow: auto;
    padding: 14px;
  }
}
