:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #647083;
  --line: #d9dee7;
  --line-strong: #b7c0cc;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --accent: #0a84ff;
  --accent-dark: #0067d8;
  --accent-soft: #eef6ff;
  --warn: #a15c00;
  --danger: #9f1239;
  --ok: #1f7a3f;
  --shadow: 0 16px 40px rgba(21, 31, 46, 0.1);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f5f8fc;
}

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

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

body.view-servicios .app-shell,
body.detail-open .app-shell {
  grid-template-columns: 276px minmax(0, 1fr) 380px;
}

body.agenda-wide .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.agenda-wide .sidebar,
body.agenda-wide .detail-panel {
  display: none;
}

.sidebar,
.detail-panel {
  background: var(--surface);
  border-color: var(--line);
}

.sidebar {
  border-right: 1px solid #d8e2ef;
  padding: 18px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(180deg, #168bff 0%, #0875e1 100%);
  color: white;
  font-weight: 750;
  box-shadow: 0 8px 18px rgba(10, 132, 255, 0.18);
}

h1,
h2,
p {
  margin: 0;
}

.brand h1 {
  font-size: 17px;
  line-height: 1.2;
}

.brand p,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
}

.nav-tabs {
  display: grid;
  gap: 6px;
  margin-bottom: 22px;
}

.nav-tab,
.primary-button,
.danger-button,
.ghost-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.nav-tab {
  text-align: left;
  padding: 0 12px;
  font-weight: 500;
}

.nav-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
}

.filters {
  display: grid;
  gap: 12px;
}

.filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.filters select,
.filters input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: white;
  color: var(--ink);
}

.primary-button {
  background: linear-gradient(180deg, #168bff 0%, #0875e1 100%);
  border-color: var(--accent);
  color: white;
  font-weight: 600;
}

.danger-button {
  padding: 0 14px;
  background: #fff1f2;
  border-color: #fecdd3;
  color: var(--danger);
  font-weight: 650;
}

.ghost-button {
  padding: 0 10px;
  background: var(--surface-soft);
}

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

body.agenda-wide .workspace {
  height: 100vh;
  padding: 8px 10px;
  overflow: hidden;
}

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

.topbar > div:first-child,
.panel-header > div:first-child {
  display: grid;
  gap: 2px;
}

body.agenda-wide .topbar {
  display: none;
}

body.view-manifiestos .topbar .metrics,
body.view-manifiestos .status-line:not(.manifest-summary) {
  display: none;
}

.topbar h2,
.panel-header h2 {
  color: #101828;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.12;
}

.metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.metric {
  min-width: 92px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.metric strong {
  display: block;
  font-size: 17px;
  font-weight: 650;
}

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

.status-line {
  min-height: 34px;
  padding: 8px 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

body.agenda-wide > .status-line,
body.agenda-wide .workspace > .status-line {
  display: none;
}

.status-line.error {
  color: var(--danger);
  border-color: #fecdd3;
  background: #fff1f2;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.table-wrap {
  position: relative;
  overflow: auto;
  max-height: calc(100vh - 126px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.table-top-scroll {
  position: sticky;
  top: var(--table-head-height, 38px);
  left: 0;
  z-index: 3;
  width: 100%;
  height: 14px;
  margin-bottom: -14px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  scrollbar-color: #98a2b3 #f8fafc;
  scrollbar-width: thin;
}

.table-top-scroll::-webkit-scrollbar {
  height: 8px;
}

.table-top-scroll::-webkit-scrollbar-track {
  background: #f8fafc;
}

.table-top-scroll::-webkit-scrollbar-thumb {
  background: #98a2b3;
  border-radius: 999px;
}

.table-top-scroll-inner {
  height: 1px;
}

tbody::before {
  content: "";
  display: table-row;
  height: 14px;
}

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

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.wrap-cell {
  max-width: 260px;
  white-space: normal;
  overflow-wrap: anywhere;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 38px;
  padding-top: 0;
  padding-bottom: 0;
  vertical-align: middle;
  background: #eef3f9;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: #eef6ff;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 12px;
}

.status-pill.ok {
  color: var(--ok);
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.status-pill.warn {
  color: var(--warn);
  border-color: #fed7aa;
  background: #fff7ed;
}

.status-pill.cancelled {
  color: #667085;
  border-color: #d0d5dd;
  background: #f2f4f7;
}

tr.cancelled-row,
.cancelled-item {
  color: #7a8493;
  background: #f3f5f8;
}

tr.cancelled-row td,
.cancelled-item {
  opacity: 0.72;
}

tr.cancelled-row strong,
.cancelled-item strong {
  color: #667085;
}

tbody tr.cancelled-row:hover {
  background: #edf1f5;
}

.agenda-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 126px);
  overflow: auto;
}

.agenda-grid-root,
.agenda-grid-shell {
  min-height: calc(100vh - 16px);
}

.agenda-grid-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  --sheet-blue: #0a84ff;
  --sheet-blue-dark: #0067d8;
  --sheet-blue-soft: #eef6ff;
  --sheet-control-border: #d4deec;
  --sheet-control-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.agenda-grid-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  min-height: 42px;
  padding: 5px 6px;
  border: 1px solid rgba(190, 202, 220, 0.72);
  border-radius: 12px;
  background: rgba(248, 251, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Arial, sans-serif;
}

.sheet-back-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid var(--sheet-control-border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
  color: #1f2937;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  box-shadow: var(--sheet-control-shadow);
}

.sheet-back-button:hover {
  border-color: rgba(10, 132, 255, 0.38);
  color: var(--sheet-blue-dark);
  background: var(--sheet-blue-soft);
}

.agenda-grid-title {
  margin: 0 8px 0 2px;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.agenda-grid-mode {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #c9daee;
  border-radius: 11px;
  background: #eaf2fb;
}

.mode-button {
  height: 28px;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 10px;
  background: transparent;
  color: #314054;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.mode-button.active {
  border-color: rgba(10, 132, 255, 0.22);
  background: rgba(255, 255, 255, 0.96);
  color: var(--sheet-blue-dark);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.agenda-grid-summary {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.agenda-grid-toolbar .primary-button,
.agenda-grid-toolbar .ghost-button {
  min-height: 32px;
  border-radius: 9px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 550;
  letter-spacing: 0;
  box-shadow: var(--sheet-control-shadow);
}

.agenda-grid-toolbar .primary-button {
  border-color: var(--sheet-blue);
  background: linear-gradient(180deg, #168bff 0%, #0875e1 100%);
  color: #ffffff;
}

.agenda-grid-toolbar .primary-button:hover {
  border-color: var(--sheet-blue-dark);
  background: linear-gradient(180deg, #0d7ff0 0%, #006bd8 100%);
}

.agenda-grid-toolbar .ghost-button {
  border-color: var(--sheet-control-border);
  background: rgba(255, 255, 255, 0.78);
  color: #27364a;
}

.agenda-grid-toolbar .ghost-button:hover {
  border-color: rgba(10, 132, 255, 0.3);
  background: #f4f9ff;
  color: var(--sheet-blue-dark);
}

.agenda-zoom-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: #617086;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.agenda-zoom-control input {
  width: 124px;
  accent-color: var(--sheet-blue);
}

.agenda-zoom-control strong {
  min-width: 40px;
  color: #172033;
  font-size: 14px;
  font-weight: 600;
}

.agenda-summary-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--sheet-control-border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.84);
  color: #1d2939;
  box-shadow: var(--sheet-control-shadow);
  white-space: nowrap;
}

.agenda-summary-metric strong {
  font-size: 14px;
  font-weight: 650;
}

.agenda-summary-metric span {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.agenda-grid-frame {
  width: 100%;
  height: calc(100vh - 76px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

body.agenda-wide .agenda-grid-frame {
  height: calc(100vh - 76px);
}

.agenda-grid {
  --agenda-passenger-line-left: 2412px;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transform-origin: top left;
}

.agenda-grid-top-scroll {
  height: 15px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  scrollbar-color: #8b98aa #f8fafc;
  scrollbar-width: thin;
}

.agenda-grid-top-scroll-inner {
  height: 1px;
}

.agenda-grid-top-scroll::-webkit-scrollbar {
  height: 10px;
}

.agenda-grid-top-scroll::-webkit-scrollbar-track {
  background: #f8fafc;
}

.agenda-grid-top-scroll::-webkit-scrollbar-thumb {
  background: #8b98aa;
  border-radius: 999px;
}

.agenda-grid .ag-header-cell-label,
.agenda-grid .ag-header-group-cell-label {
  align-items: center;
}

.agenda-grid .ag-header-group-cell,
.agenda-grid .ag-header-row-column-group {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
}

.agenda-grid .ag-header-row-column {
  top: 0 !important;
}

.agenda-grid .ag-header,
.agenda-grid .ag-header-viewport,
.agenda-grid .ag-header-container {
  min-height: 86px !important;
}

.agenda-grid .ag-header-cell-menu-button {
  opacity: 1 !important;
  visibility: visible !important;
}

.agenda-grid .ag-header-cell-menu-button .ag-icon-menu {
  width: 18px;
  height: 18px;
  color: var(--ink);
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18'/%3E%3Cpath d='M6 12h12'/%3E%3Cpath d='M10 19h4'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18'/%3E%3Cpath d='M6 12h12'/%3E%3Cpath d='M10 19h4'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.agenda-grid .ag-header-cell-menu-button .ag-icon-menu::before {
  content: "";
}

.agenda-grid .ag-row-service-start {
  border-top: 2px solid var(--line-strong);
}

.agenda-grid .ag-row {
  border-bottom-color: transparent;
}

.agenda-grid .ag-cell {
  border-bottom: 0;
}

.agenda-grid .ag-row-service-start .ag-cell {
  border-top: 0;
}

.agenda-grid .ag-row-passenger-line::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: var(--agenda-passenger-line-left);
  z-index: 3;
  height: 1px;
  pointer-events: none;
  content: "";
  background: var(--line);
}

.ag-row-cancelled .ag-cell,
.ag-cell-cancelled {
  color: #7a8493;
  background: #f3f5f8;
}

.ag-cell-repeated {
  color: transparent;
}

.grid-error {
  color: var(--danger);
  font-size: 13px;
}

.service-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.service-block header {
  display: grid;
  grid-template-columns: 92px minmax(130px, 1.2fr) minmax(220px, 2fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.service-block .passengers {
  display: grid;
}

.passenger-line {
  display: grid;
  grid-template-columns: 120px minmax(220px, 1fr) 130px 120px;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.passenger-line:last-child {
  border-bottom: 0;
}

.muted {
  color: var(--muted);
}

.detail-panel {
  border-left: 1px solid var(--line);
  display: none;
  padding: 18px;
  overflow: auto;
}

body.view-servicios .detail-panel,
body.detail-open .detail-panel {
  display: block;
}

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

.detail-body {
  display: grid;
  gap: 14px;
}

.section {
  display: grid;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section h3 {
  margin: 0;
  font-size: 14px;
}

.kv {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 6px 10px;
  font-size: 13px;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.manifest-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #d4deec;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.edit-form label,
.passenger-form label,
.manifest-form label,
.manifest-form fieldset {
  display: grid;
  align-content: start;
  gap: 7px;
  color: #5d6c82;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.edit-form input,
.edit-form select,
.edit-form textarea,
.passenger-form input,
.passenger-form select,
.passenger-form textarea,
.manifest-form input,
.manifest-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
}

.manifest-form select {
  height: 38px;
  min-height: 38px;
  padding: 0 34px 0 12px;
  border-color: #cfd9e8;
  border-radius: 10px;
  appearance: none;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, transparent 50%, #5f6f85 50%),
    linear-gradient(135deg, #5f6f85 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 16px,
    calc(100% - 11px) 16px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.manifest-form select:focus {
  border-color: rgba(10, 132, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14);
  outline: none;
}

.edit-form input,
.edit-form select,
.passenger-form input,
.passenger-form select,
.manifest-form input,
.manifest-form select {
  min-height: 34px;
  padding: 0 9px;
}

.manifest-form fieldset {
  margin: 0;
  padding: 12px;
  border: 1px solid #d4deec;
  border-radius: 12px;
  background: #f8fbff;
}

#manifestTypesField {
  grid-column: 1 / -1;
}

.manifest-form legend {
  padding: 0;
  margin-bottom: 9px;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
}

#manifestTypes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 76px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-color: #b6c3d4 transparent;
  scrollbar-width: thin;
}

.check-option {
  display: inline-flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid #d6dfec;
  border-radius: 999px;
  background: #ffffff;
  color: #27364a !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  white-space: nowrap;
  cursor: pointer;
}

.check-option:hover {
  border-color: rgba(10, 132, 255, 0.34);
  background: #f2f8ff;
}

.check-option:has(input:checked) {
  border-color: rgba(10, 132, 255, 0.5);
  background: #e9f4ff;
  color: var(--accent-dark) !important;
}

.check-option input {
  width: 14px;
  height: 14px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

.manifest-form .form-actions {
  gap: 8px;
  align-items: center;
  padding-top: 2px;
}

.manifest-form .form-actions .primary-button,
.manifest-form .form-actions .ghost-button {
  min-height: 36px;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
}

.manifest-form .form-actions .muted {
  color: #66768d;
  font-size: 13px;
  font-weight: 500;
}

.manifest-preview-wrap {
  max-height: calc(100vh - 286px);
}

.combo-control {
  position: relative;
  display: block;
}

.combo-control input {
  padding-right: 34px;
}

.combo-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
}

.combo-menu {
  position: absolute;
  top: calc(100% + 3px);
  right: 0;
  left: 0;
  z-index: 30;
  max-height: 210px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(21, 31, 46, 0.16);
}

.combo-option {
  display: block;
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.combo-option:hover,
.combo-option:focus {
  background: #e9f5f3;
  outline: none;
}

.combo-option[hidden] {
  display: none;
}

.combo-empty {
  display: block;
  padding: 8px 10px;
  color: var(--muted);
}

.edit-form textarea,
.passenger-form textarea {
  min-height: 72px;
  padding: 8px 9px;
  resize: vertical;
}

.passenger-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

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

.segment-edit-list h4 {
  margin: 6px 0 0;
  font-size: 13px;
}

.segment-form {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segment-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.segment-form input,
.segment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
}

.segment-form input {
  min-height: 34px;
  padding: 0 9px;
}

.segment-form textarea {
  min-height: 72px;
  padding: 8px 9px;
  resize: vertical;
}

input:disabled {
  background: #eef1f5;
  color: var(--muted);
  cursor: not-allowed;
}

.passenger-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.span-2 {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.form-actions .primary-button {
  padding: 0 14px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  body.view-servicios .app-shell,
  body.detail-open .app-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .detail-panel {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: 46vh;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar,
  .workspace,
  .detail-panel {
    padding: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .service-block header,
  .passenger-line,
  .edit-form,
  .passenger-form,
  .manifest-form,
  .segment-form {
    grid-template-columns: 1fr;
  }
}
