@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #f6f6f6;
  --surface: #ffffff;
  --surface-2: #f0f2ea;
  --sidebar-bg: #ffffff;
  --sidebar-text: #413225;
  --sidebar-muted: #847466;
  --sidebar-border: #f0eff2;
  --sidebar-surface-2: rgba(65, 50, 37, 0.06);
  --topbar-bg: #ffffff;
  --topbar-text: #413225;
  --topbar-border: #f0eff2;
  --modal-bg: #ffffff;
  --modal-text: #413225;
  --modal-border: #ecebef;
  --panel-bg: #ffffff;
  --panel-text: #413225;
  --panel-muted: #7f6b57;
  --panel-border: #ecebef;
  --panel-surface-2: #f8f8f9;
  --panel-input-bg: #ffffff;
  --kpi-bg: #ffffff;
  --kpi-text: #413225;
  --kpi-muted: #7f6b57;
  --kpi-border: #ecebef;
  --border: #ecebef;
  --text: #413225;
  --muted: #7f6b57;
  --shell-divider: #f0eff2;
  --accent: #7ead5a;
  --accent-dim: #6f9a4f;
  --danger: #e85d5d;
  --radius: 5px;
  --shadow: 0 10px 22px rgba(31, 36, 48, 0.06);
  --font: "Manrope", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ui: "Manrope", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
}

.layout {
  display: grid;
  grid-template-columns: 72px 270px minmax(0, 1fr);
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  transition: grid-template-columns 0.2s ease;
}

.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-right: 1px solid var(--shell-divider);
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.4rem;
  transition: width 0.26s ease, padding 0.26s ease;
  overflow: hidden;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 20;
  grid-column: 1;
  font-size: 0.875rem;
}

.layout[data-sidebar-pinned="true"] {
  grid-template-columns: 210px 270px minmax(0, 1fr);
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:hover {
  padding: 0.55rem 0.45rem;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:hover ~ .main {
  margin-left: 0;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:hover {
  width: 210px;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar {
  width: 72px;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:hover .brand-subline,
.layout:not([data-sidebar-pinned="true"]) .sidebar:hover .nav-item,
.layout:not([data-sidebar-pinned="true"]) .sidebar:hover .sidebar-footer,
.layout:not([data-sidebar-pinned="true"]) .sidebar:hover .nav-subitem,
.layout:not([data-sidebar-pinned="true"]) .sidebar:hover .nav-section__label {
  opacity: 1;
}

.brand {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  padding: 0 0.1rem;
}

.brand-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.brand-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
  transition: width 0.26s ease, height 0.26s ease;
}

.brand-subline {
  margin-top: 0.22rem;
  font-size: 0.65rem;
  color: var(--sidebar-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.sidebar-pin-btn {
  margin-left: auto;
  font-size: 0.8rem;
  opacity: 0.95;
  color: #413225;
  border: 1px solid rgba(65, 50, 37, 0.22);
  background: #ffffff;
}

.layout[data-sidebar-pinned="true"] .sidebar-pin-btn {
  opacity: 1;
  background: rgba(65, 50, 37, 0.08);
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:not(:hover) .sidebar-pin-btn {
  display: none;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.nav-section__label {
  padding: 0.15rem 0.5rem 0.28rem;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  opacity: 0.85;
  user-select: none;
}

.nav-section + .nav-section {
  margin-top: 0.1rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(65, 50, 37, 0.08);
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:not(:hover) .nav-section__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:not(:hover) .nav-section + .nav-section {
  margin-top: 0.2rem;
  padding-top: 0.2rem;
}

.nav-group {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

.nav-group > .nav-item {
  width: 100%;
  box-sizing: border-box;
}

.nav-submenu {
  display: none;
  flex-direction: column;
  gap: 0.1rem;
  margin-top: 0.12rem;
  margin-left: 0.3rem;
  padding-left: 0.3rem;
  border-left: 2px solid rgba(65, 50, 37, 0.12);
}

.nav-group:hover .nav-submenu {
  display: none;
}

.nav-group > .nav-item[data-has-submenu="1"] .nav-item__label {
  flex: 1;
}

.nav-group > .nav-item[data-has-submenu="1"]::after {
  content: "›";
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--sidebar-muted);
  transition: transform 0.15s ease;
}

.nav-group.is-open > .nav-item[data-has-submenu="1"]::after {
  transform: rotate(90deg);
}

.nav-group.is-open .nav-submenu {
  display: flex;
}

.nav-subitem {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sidebar-muted);
  text-align: left;
  padding: 0.22rem 0.45rem;
  border-radius: 4px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}

.nav-subitem:hover {
  color: var(--sidebar-text);
  background: var(--sidebar-surface-2);
}

.nav-item {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sidebar-muted);
  text-align: left;
  padding: 0.32rem 0.5rem;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-item:hover {
  color: var(--sidebar-text);
  background: var(--sidebar-surface-2);
}

.layout:not([data-sidebar-pinned="true"]) .sidebar .brand-subline,
.layout:not([data-sidebar-pinned="true"]) .sidebar .sidebar-footer,
.layout:not([data-sidebar-pinned="true"]) .sidebar .nav-submenu {
  display: none;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:hover .nav-group.is-open .nav-submenu {
  display: flex;
}

.nav-item__icon {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.nav-item__svg {
  width: 18px;
  height: 18px;
  display: block;
}

.nav-item__label {
  min-width: 0;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:not(:hover) .nav-item {
  padding: 0.32rem;
  display: flex;
  justify-content: center;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:not(:hover) .nav-item__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:not(:hover) .nav-item__icon {
  display: flex;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(65, 50, 37, 0.14);
  color: inherit;
  background: rgba(65, 50, 37, 0.04);
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:not(:hover) .nav-item.is-active .nav-item__icon {
  background: rgba(126, 173, 90, 0.18);
  border-color: #7ead5a;
  color: #413225;
}

/* Hide submenu chevron only in collapsed (icon-only) sidebar */
.layout:not([data-sidebar-pinned="true"]) .sidebar:not(:hover) .nav-group > .nav-item::after {
  display: none;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:hover .brand-subline,
.layout:not([data-sidebar-pinned="true"]) .sidebar:hover .sidebar-footer {
  display: flex;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:hover .brand-subline {
  display: block;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:not(:hover) .brand > div:nth-child(2) {
  display: none;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:hover .nav-item {
  justify-content: flex-start;
  padding: 0.32rem 0.5rem;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:hover .nav-item__icon,
.layout[data-sidebar-pinned="true"] .nav-item__icon {
  display: none;
}

.layout:not([data-sidebar-pinned="true"]) .sidebar:hover .brand-logo-img,
.layout[data-sidebar-pinned="true"] .brand-logo-img {
  width: 88px;
  height: 88px;
}

.nav-item.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #88b569);
  border-color: rgba(255, 255, 255, 0.22);
}

.sidebar-footer {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-build-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  font-weight: 700;
  text-align: center;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  color: #3d2e1f;
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  border: 1px solid rgba(146, 100, 7, 0.45);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  user-select: text;
}

/* Phase 3 — staff login gate (production hosts only; see js/auth.js) */
html.auth-pending #app-layout,
html.auth-pending #modal {
  visibility: hidden;
  pointer-events: none;
}

.auth-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: linear-gradient(145deg, #2f2419 0%, #413225 45%, #1a1510 100%);
}

html.auth-pending .auth-gate {
  display: flex;
}

.auth-gate__panel {
  width: min(100%, 22rem);
  padding: 1.5rem 1.35rem 1.35rem;
  border-radius: 12px;
  background: #fffaf3;
  border: 1px solid rgba(65, 50, 37, 0.12);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.auth-gate__logo {
  display: block;
  margin: 0 auto 0.75rem;
}

.auth-gate__title {
  margin: 0;
  text-align: center;
  font-size: 1.25rem;
  color: #413225;
}

.auth-gate__subtitle {
  margin: 0.35rem 0 1rem;
  text-align: center;
}

.auth-gate__form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.auth-gate__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.auth-gate__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #5c4a38;
}

.auth-gate__error {
  margin: 0;
  font-size: 0.82rem;
  color: #b42318;
}

.topbar-staff-chip {
  font-size: 0.72rem;
  font-weight: 600;
  color: #413225;
  background: rgba(126, 173, 90, 0.18);
  border: 1px solid rgba(126, 173, 90, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-left: auto;
  align-self: center;
}

.text-danger {
  color: #b42318;
}

.sidebar .btn {
  color: var(--sidebar-text);
  border-color: var(--shell-divider);
}

.sidebar-footer .btn.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #88b569);
  border-color: rgba(255, 255, 255, 0.22);
}

.sidebar-footer .btn.btn-ghost:not(.is-active) {
  font-size: 0.72rem;
  line-height: 1.35;
  padding: 0.28rem 0.52rem;
  font-weight: 500;
  color: var(--sidebar-muted);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(65, 50, 37, 0.12);
  box-shadow: none;
}

.sidebar-footer .btn.btn-ghost:not(.is-active):hover {
  color: #6b6055;
  border-color: rgba(65, 50, 37, 0.2);
  background: rgba(65, 50, 37, 0.05);
  box-shadow: none;
}

.sidebar-footer .btn.btn-ghost.is-active {
  font-size: 0.72rem;
  line-height: 1.35;
  padding: 0.28rem 0.52rem;
  font-weight: 500;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  max-width: none;
  background: var(--bg);
  color: var(--text);
  grid-column: 3;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--topbar-border);
  background: var(--topbar-bg);
  color: var(--topbar-text);
  box-shadow: 0 1px 0 rgba(65, 50, 37, 0.04);
}

.topbar-leading {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--topbar-text);
}

.topbar-breadcrumb[hidden] {
  display: none !important;
}

.topbar-breadcrumb-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.topbar-breadcrumb-link:hover {
  opacity: 0.88;
}

.topbar-breadcrumb-sep {
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
  color: var(--topbar-text);
  user-select: none;
}

.topbar-breadcrumb-current {
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
  color: var(--topbar-text);
}

.topbar-breadcrumb-parent {
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
  color: var(--muted);
}

html[data-density="dense"] .topbar-breadcrumb {
  font-size: 15px;
}

.page-title {
  margin: 0;
  color: var(--topbar-text);
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

#page-title[hidden] {
  display: none !important;
}

.topbar .btn {
  color: var(--topbar-text);
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  flex-shrink: 0;
}
.ui-build-label {
  display: inline-block;
  margin-left: 0.55rem;
  padding: 0.16rem 0.42rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  font-size: 0.7rem;
  color: #6b7280;
  background: #f9fafb;
  white-space: nowrap;
}


.topbar-actions--dashboard {
  margin-left: auto;
  justify-content: flex-end;
  align-items: center;
}

.topbar-actions--dashboard .topbar-actions-stack {
  flex-direction: row;
  width: auto;
  align-items: center;
}

.topbar-actions--dashboard .topbar-toggle-chip {
  width: auto;
  min-width: 5.5rem;
}

.topbar-actions--requests {
  align-items: center;
}

.topbar-actions--requests #btn-primary-action {
  order: -1;
  min-width: 9rem;
  min-height: 2.1rem;
  padding: 0.35rem 0.8rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
}

.topbar-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 7.25rem;
  flex-shrink: 0;
}

.topbar-toggle-chip {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.34rem 0.45rem;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 6px;
  border: 1px solid var(--topbar-border);
  background: var(--topbar-bg);
  color: var(--panel-muted);
  cursor: pointer;
  text-align: center;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.topbar-toggle-chip:hover {
  border-color: rgba(65, 50, 37, 0.28);
  color: var(--topbar-text);
}

#btn-urgencies-toggle.is-on {
  color: var(--accent);
  border-color: rgba(126, 173, 90, 0.55);
  background: rgba(126, 173, 90, 0.12);
}

#btn-urgencies-toggle.is-off {
  color: var(--panel-muted);
}

#density-badge.is-dense {
  color: var(--topbar-text);
  border-color: rgba(126, 173, 90, 0.45);
  background: rgba(126, 173, 90, 0.1);
}

#density-badge.is-comfort {
  color: var(--panel-muted);
}

.view-root {
  padding: 0.9rem 1.1rem 1.2rem;
  flex: 1;
  min-width: 0;
}

.urgencies-rail {
  margin: 0 0 10px 10px;
  background: #ffffff;
  border-right: 1px solid var(--shell-divider);
  padding: 0.75rem 0.65rem;
  color: var(--text);
  min-height: 100%;
  grid-column: 2;
  align-self: stretch;
}

.urgencies-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  padding-right: 10px;
}

.urgencies-title {
  margin: 100px 0 0 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.urgency-list {
  display: grid;
  gap: 0.42rem;
}

.urgency-item {
  border: none;
  border-radius: 5px;
  padding: 20px 10px 20px 10px;
  margin: 10px 10px 0 0;
  background: #f0f0f0;
  padding-right: 10px;
}

.urgency-kicker {
  font-size: 0.72rem;
  color: var(--panel-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.urgency-main {
  font-size: 0.84rem;
  margin-top: 0.12rem;
  font-weight: 600;
}

.layout[data-urgencies-collapsed="true"] .urgencies-rail {
  display: none;
}

.layout[data-urgencies-collapsed="true"] {
  grid-template-columns: 72px minmax(0, 1fr);
}

.layout[data-sidebar-pinned="true"][data-urgencies-collapsed="true"] {
  grid-template-columns: 240px minmax(0, 1fr);
}

.layout[data-urgencies-collapsed="true"] .main {
  grid-column: 2;
  width: 100%;
  max-width: none;
}

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.stat-card {
  background: var(--kpi-bg);
  color: var(--kpi-text);
  border: 1px solid var(--kpi-border);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  box-shadow: 0 2px 8px rgba(31, 36, 48, 0.04);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--kpi-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font-family: var(--font);
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.panel {
  background: var(--panel-bg);
  color: var(--panel-text);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(31, 36, 48, 0.045);
}

.panel-header {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.data th,
table.data td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--panel-border);
}

table.data th {
  color: var(--panel-muted);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table.data tr:last-child td {
  border-bottom: none;
}

table.data thead th {
  background: #fbfaf7;
}

table.data tbody tr:hover td {
  background: rgba(126, 173, 90, 0.08);
}

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

.panel .muted,
.panel .field-label,
.panel .stat-label {
  color: var(--panel-muted);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-pending {
  background: rgba(255, 193, 7, 0.15);
  color: #ffd54f;
}

.badge-confirmed {
  background: rgba(61, 184, 160, 0.15);
  color: #6ee7c5;
}

.badge-completed {
  background: rgba(91, 196, 255, 0.12);
  color: #7ecbff;
}

.badge-cancelled {
  background: rgba(232, 93, 93, 0.12);
  color: #ff9b9b;
}

.row-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}

.btn {
  appearance: none;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  padding: 0.34rem 0.62rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}

.btn:hover {
  border-color: #baa98f;
  box-shadow: 0 4px 12px rgba(65, 50, 37, 0.08);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent-dim);
  color: #1f2917;
  font-weight: 600;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
}

.btn-block {
  width: 100%;
}

.btn-danger {
  border-color: rgba(232, 93, 93, 0.45);
  color: #b94343;
  background: #fff5f5;
}

.btn-sm {
  padding: 0.18rem 0.42rem;
  font-size: 0.78rem;
}

.icon-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}

.file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.form-grid {
  display: grid;
  gap: 0.55rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

label.field-label {
  font-size: calc(0.82rem * 1.2);
  color: var(--muted);
}

input,
select,
textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.36rem 0.5rem;
}

.panel input,
.panel select,
.panel textarea {
  color: var(--panel-text);
  background: var(--panel-input-bg);
  border-color: var(--panel-border);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(126, 173, 90, 0.35);
  outline-offset: 1px;
}

.empty-state {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 31, 22, 0.45);
}

.modal-panel {
  position: relative;
  width: min(980px, 100%);
  background: var(--modal-bg);
  color: var(--modal-text);
  border: 1px solid var(--modal-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: min(92vh, 760px);
  display: flex;
  flex-direction: column;
}

.modal-panel.is-draggable {
  position: fixed;
  margin: 0;
}

.modal-panel--sm {
  width: min(520px, 100%);
}

.modal-panel--wide {
  width: min(980px, 100%);
}

.modal-panel--xwide {
  width: min(1180px, 100%);
}

.modal-panel--fill {
  width: min(96vw, 1680px);
  max-height: 94vh;
}

.modal-panel--fill.modal-panel--incl-excl {
  width: min(96vw, 1480px);
}
.modal-panel--fill.modal-panel--incl-excl .modal-body {
  max-height: calc(94vh - 7rem);
}

.modal-panel--fill .modal-body {
  max-height: calc(94vh - 8rem);
}

/* View-only modals (Cost detail, etc.): footer hidden via JS + no Cancel/Save strip */
.modal--no-footer .modal-footer {
  display: none !important;
}

.modal--no-footer .modal-panel--fill .modal-body {
  max-height: calc(94vh - 4.25rem);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--modal-border);
}

.modal-header {
  cursor: move;
  user-select: none;
}

.modal-footer {
  border-top: 1px solid var(--modal-border);
  border-bottom: none;
  justify-content: flex-end;
  gap: 0.5rem;
}

.modal-title {
  margin: 0;
  font-size: 1.1rem;
}

.modal-body {
  padding: 0.75rem;
  overflow-y: auto;
}

.modal-panel .btn {
  color: var(--modal-text);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tab {
  appearance: none;
  border: 1px solid var(--border);
  background: #f8f6f1;
  color: var(--muted);
  font: inherit;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  color: #2a3820;
  border-color: var(--accent-dim);
  background: rgba(126, 173, 90, 0.16);
}

.tabs-settings {
  margin-bottom: 0.5rem;
}

.style-input-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.style-swatch {
  width: 18px;
  height: 18px;
  border-radius: 2px;
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.style-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}

.field-inline {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.field-inline input,
.field-inline select {
  min-width: 120px;
}

.chk-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
}

.chk {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  cursor: pointer;
  color: var(--text);
}

.inp-sm {
  width: 100%;
  max-width: 140px;
}

hr.sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.5rem 0;
}

.subtit {
  margin: 0.35rem 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.btn-compact {
  padding: 0.16rem 0.38rem;
  font-size: 0.74rem;
}

.narrow-page {
  max-width: none;
  width: 100%;
  margin: 0;
}

.h2-compact {
  font-family: var(--font);
  font-size: 1.2rem;
  margin: 0 0 0.75rem;
}

.small {
  font-size: 0.85rem;
}

.nr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.nr-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  padding: 0.35rem 0.65rem;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.82rem;
}

.nr-tab.is-active {
  color: var(--text);
  border-color: var(--accent-dim);
  background: var(--surface-2);
}

.nr-pane {
  display: none;
  padding: 0.5rem 0;
}

.nr-pane.is-active {
  display: block;
}

.pick-det {
  margin: 0.5rem 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.35rem 0.5rem;
  background: var(--bg);
}

.pick-det summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.pick-det summary::-webkit-details-marker {
  display: none;
}

.sum-inline {
  display: inline-block;
}

.pick-det-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  padding: 0.5rem 0 0.25rem;
  max-height: 160px;
  overflow-y: auto;
}

.chk-inline {
  font-size: 0.82rem;
}

.inp-compact {
  max-width: 100%;
}

.inp-narrow {
  width: 4.5rem;
  max-width: 100%;
}

.form-row--inline {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.panel--compact .panel-title {
  font-size: 0.95rem;
}

.panel-header--compact {
  padding: 0.55rem 0.75rem;
}

.data--compact th,
.data--compact td {
  padding: 0.32rem 0.45rem;
  font-size: 0.82rem;
}

.req-row {
  cursor: pointer;
}

.req-row.req-row--confirmed td {
  background: rgba(34, 197, 94, 0.14);
}

.req-row:hover td {
  background: rgba(126, 173, 90, 0.08);
}

.td-compact {
  white-space: nowrap;
}

.td-date,
.th-date {
  padding-right: 0.2rem !important;
}

.td-code,
.th-code {
  padding-left: 0.2rem !important;
}

.data--zebra tbody tr:nth-child(even) td {
  background: rgba(65, 50, 37, 0.05);
}

.data--zebra .req-row:hover td {
  background: rgba(126, 173, 90, 0.08);
}

.data--zebra .req-row.req-row--confirmed td {
  background: rgba(34, 197, 94, 0.14);
}

.td-ellip {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-meta {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.meta-n {
  font-weight: 600;
}

.td-actions {
  white-space: nowrap;
}

.td-status-marker {
  width: 8px;
  padding: 0 !important;
}

.req-status-marker {
  display: block;
  width: 10px;
  min-height: 32px;
  border-radius: 4px;
}

.req-flag {
  font-size: 1.5em;
  line-height: 1;
}

.req-status--pending {
  background: #eab308;
}

.req-status--progress {
  background: #f97316;
}

.req-status--confirmed {
  background: #22c55e;
}

.req-status--cancelled {
  background: #ef4444;
}

.filters-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--panel-border);
}

.filter-contact {
  min-width: 170px;
  width: 210px;
}

.tg-guides-page {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tg-guide-block1 .panel-header {
  border-bottom: none !important;
}

.tg-guide-block1-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.85rem;
  box-sizing: border-box;
}

.tg-guide-block1-toolbar .tg-guide-block1-filters {
  flex: 1 1 auto;
  min-width: min(100%, 260px);
  margin: 0;
  padding: 0;
  border-bottom: none;
}

.tg-guide-block1-toolbar .tg-guide-block1-new {
  flex-shrink: 0;
  margin-left: auto;
}

.tg-guides-filters {
  margin-bottom: 0;
}

.tg-guide-count {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.tg-count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.05rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: rgba(77, 93, 117, 0.1);
  color: #4d5d75;
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  vertical-align: middle;
}

.tg-guide-colhead-panel {
  margin-top: 0 !important;
}

.tg-guide-colhead-panel .table-wrap {
  border-top: none;
}

.tg-guide-colhead-panel table.data thead th {
  border-bottom: none;
}

.tg-guide-table {
  table-layout: fixed;
  width: 100%;
}

.tg-guides-page .tg-guide-table th,
.tg-guides-page .tg-guide-table td {
  white-space: normal;
  word-break: break-word;
}

.tg-guides-page .tg-guide-table td:last-child {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .tg-guides-page .tg-guide-table {
    table-layout: auto;
  }

  .tg-guides-page .tg-guide-table th,
  .tg-guides-page .tg-guide-table td {
    font-size: 0.76rem;
    padding: 0.28rem 0.35rem;
  }

  .tg-guides-page .tg-guide-table td:last-child {
    white-space: normal;
  }

  .tg-guides-page .tg-guide-table td:last-child .btn,
  .tg-guides-page .tg-guide-table td:last-child .icon-btn {
    width: 100%;
    margin-bottom: 0.22rem;
    justify-content: center;
  }
}

.tg-guide-table col.tg-col-name {
  width: 19%;
}

.tg-guide-table col.tg-col-city {
  width: 14%;
}

.tg-guide-table col.tg-col-contact {
  width: 20%;
}

.tg-guide-table col.tg-col-daysjob {
  width: 9%;
}

.tg-guide-table col.tg-col-paid {
  width: 13%;
}

.tg-guide-table col.tg-col-lic {
  width: 11%;
}

.tg-guide-table col.tg-col-actions {
  width: 14%;
}

.tg-guide-table .tg-guide-del-btn {
  width: 1.55rem;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0;
}

.tg-guide-table td.td-actions {
  text-align: right;
}

.tg-guide-table td.td-actions .tg-guide-del-btn {
  margin-left: auto;
}

/* Step 5 UI polish (Guides only) */
.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .panel.panel--compact.reqd-panel--tourmenu {
  border-color: #dce4ef;
  box-shadow: 0 10px 22px rgba(23, 40, 74, 0.06);
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-block1 {
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.94) 0%, rgba(246, 250, 255, 0.94) 100%);
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-block1-toolbar {
  padding: 0.42rem 0.78rem 0.72rem;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-block1-filters .filter-contact,
.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-block1-filters .select-compact {
  border-color: #cfd9e6;
  border-radius: 8px;
  background: #ffffff;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-count {
  background: #edf4ff;
  border: 1px solid #c8d9ee;
  color: #3a5479;
  border-radius: 999px;
  padding: 0.08rem 0.45rem;
  font-weight: 600;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-colhead-panel,
.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-lang-section {
  border-color: #dce5f2;
  background: #f9fbff;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-colhead-panel .table-wrap,
.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-lang-section .table-wrap {
  background: #ffffff;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-lang-section .tg-lang-heading {
  background: linear-gradient(180deg, rgba(245, 250, 255, 0.95) 0%, rgba(239, 246, 255, 0.95) 100%);
  border-bottom: 1px solid #d7e3f1;
  color: #4a5d78;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-table thead th {
  background: #f4f8ff;
  color: #4f6078;
  border-bottom: 1px solid #d8e3f1;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-table tbody td {
  border-bottom-color: #e6edf7;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-data-row {
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-data-row:hover {
  background: #f7fbff;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-data-row:focus-visible {
  outline: 2px solid rgba(126, 166, 217, 0.45);
  outline-offset: -2px;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .icon-btn.tg-guide-del-btn {
  border-radius: 8px;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .icon-btn.tg-guide-del-btn:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

.tg-editor-page .ce-main {
  border-color: #dce4ef;
  box-shadow: 0 12px 24px rgba(23, 40, 74, 0.07);
}

.tg-editor-page .ce-main .ce-head {
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.95) 0%, rgba(245, 250, 255, 0.95) 100%);
  border-bottom-color: #d8e3f0;
}

.tg-editor-page .ce-main .ce-inp,
.tg-editor-page .ce-main .ce-select {
  border-color: #cfd9e6;
  border-radius: 8px;
}

.tg-editor-page .ce-main .ce-inp:focus,
.tg-editor-page .ce-main .ce-select:focus {
  border-color: #7ea6d9;
  box-shadow: 0 0 0 2px rgba(126, 166, 217, 0.18);
}

@media (max-width: 1100px) {
  .tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-block1-toolbar {
    padding: 0.36rem 0.52rem 0.62rem;
  }
}

.gcal-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.gcal-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gcal-legend {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.gcal-leg {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.gcal-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  display: inline-block;
}

.gcal-dot--free {
  background: #67b56f;
}

.gcal-dot--busy {
  background: #d45252;
}

.gcal-dot--confirmed {
  background: #59b6e9;
}

.gcal-table-wrap {
  max-height: 62vh;
  overflow: auto;
  isolation: isolate;
}

.gcal-table {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.gcal-table th:first-child,
.gcal-table td.gcal-date-cell {
  position: sticky;
  left: 0;
  z-index: 2;
}

.gcal-table thead th:first-child {
  background: #fafaf8 !important;
}

.gcal-table tbody td.gcal-date-cell {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--brand-brown);
  white-space: nowrap;
}

.gcal-table tbody td.gcal-date-cell.gcal-month-band-0 {
  background: #f3f8ee !important;
}

.gcal-table tbody td.gcal-date-cell.gcal-month-band-1 {
  background: #eef4fc !important;
}

.gcal-table tbody td.gcal-date-cell.gcal-month-band-2 {
  background: #faf5eb !important;
}

.gcal-table tbody td.gcal-date-cell.gcal-month-band-3 {
  background: #f4f0fa !important;
}

.gcal-table tbody td.gcal-date-cell.gcal-month-band-4 {
  background: #eefaf6 !important;
}

.gcal-table tbody td.gcal-date-cell.gcal-month-band-5 {
  background: #faf0f3 !important;
}

.gcal-table tbody tr.gcal-row--month-start td {
  border-top: 3px solid #000 !important;
  padding-top: 0.18rem;
}

.gcal-table tbody tr.gcal-row--month-start td.gcal-date-cell {
  padding-top: 0.28rem;
}

.gcal-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.gcal-table thead th {
  position: sticky;
  top: 0;
  background: #fafaf8 !important;
  z-index: 10;
  /* Opaque band + shadow so scrolled cells stay behind the header row */
  box-shadow:
    0 1px 0 #e8e4dc,
    0 4px 0 0 #fafaf8,
    0 6px 8px -4px rgba(18, 39, 74, 0.14);
  vertical-align: bottom;
  padding-top: 0.45rem;
  padding-bottom: 0.4rem;
}

.gcal-table thead th:first-child {
  z-index: 12;
  box-shadow:
    1px 0 0 #e8e4dc,
    0 1px 0 #e8e4dc,
    0 4px 0 0 #fafaf8,
    0 6px 8px -4px rgba(18, 39, 74, 0.14);
}

.gcal-table tbody td {
  position: relative;
  z-index: 0;
  background: #ffffff;
}

.gcal-table th,
.gcal-table td {
  border-right: 1px solid rgba(65, 50, 37, 0.18);
}

.gcal-cell {
  width: 100%;
  min-width: 0;
  height: 1.7rem;
  border: 1px solid rgba(65, 50, 37, 0.22);
  border-radius: 4px;
  cursor: pointer;
  padding: 0 0.32rem;
  font-size: 0.72rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.gcal-table td {
  padding: 0.12rem 0.18rem;
}

.gcal-cell--free {
  background: #72c479;
}

.gcal-cell--busy {
  background: #e16a6a;
}

.gcal-cell--confirmed {
  background: #62bde9;
  cursor: default;
}

.gcal-cell-txt {
  display: block;
  color: #083146;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reqd-tour-row--confirmed {
  background: rgba(34, 197, 94, 0.12);
}

.reqd-ver-status--locked {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(185, 28, 28, 0.38);
  color: #7f1d1d;
}

.tg-photo-card__body {
  border: 1px solid rgba(65, 50, 37, 0.15);
  border-radius: 10px;
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-start;
}

.tg-photo-card__preview {
  width: min(100%, 210px);
  border-radius: 8px;
}

.tg-editor-page .ce-main {
  background: var(--panel-surface-2);
}

.tg-editor-page .ce-field-grid {
  gap: 0.9rem 1.05rem;
}

.tg-editor-page .chk-list {
  background: var(--panel-input-bg);
  border: 1px solid rgba(65, 50, 37, 0.14);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
}

.tg-editor-layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tg-editor-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
  align-items: start;
}

.tg-editor-fields-1col {
  grid-template-columns: 1fr !important;
}

.tg-editor-fields-2col {
  grid-template-columns: 1fr 1fr !important;
}

.tg-editor-phones .ce-field-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.tg-editor-phones .ce-field {
  width: 100%;
  min-width: 0;
}

.tg-editor-phones .ce-field.ce-field--full {
  grid-column: auto !important;
}

.tg-editor-phones .ce-lbl {
  font-size: 0.72rem;
}

.tg-editor-phones .ce-inp {
  font-size: 0.8rem;
  padding: 0.28rem 0.42rem;
}

.tg-editor-page .ce-file-row {
  align-items: center;
}

.tg-editor-page .tg-lic-thumb {
  width: 34px;
  height: 34px;
  object-fit: cover;
}

.tg-lic-photo-field {
  grid-column: 1 / -1;
}

.tg-lic-photo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.tg-lic-photo-head .ce-lbl {
  margin-bottom: 0;
}

.tg-lic-photo-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tg-lic-preview-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.tg-lic-photo-actions .ce-upload-btn.ce-upload-btn--sm,
.tg-lic-photo-actions .tg-lic-preview-btn.ce-upload-btn--sm {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  height: 30px;
}

.tg-lic-photo-actions .ce-upload-btn.ce-upload-btn--sm > span,
.tg-lic-photo-actions .tg-lic-preview-btn.ce-upload-btn--sm > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  height: 30px;
  padding: 0;
}

.tg-lic-photo-actions .tg-lic-preview-btn.ce-upload-btn--sm {
  -webkit-appearance: none;
  appearance: none;
  line-height: 1;
}

.tg-lic-clear-btn {
  width: 22px;
  min-width: 22px;
  height: 22px;
  line-height: 1;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
}

.tg-lic-preview-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .tg-editor-grid2,
  .tg-editor-fields-2col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 740px) {
  .tg-editor-phones .ce-field-grid {
    grid-template-columns: 1fr !important;
  }
}

.tg-guide-th-actions {
  width: 8%;
}

/* Services → Restaurants (Country, City, Name, Phone, Contract, Actions) */
.tg-guide-table.rs-rest-table col.rs-col-nation {
  width: 14%;
}

.tg-guide-table.rs-rest-table col.rs-col-city {
  width: 18%;
}

.tg-guide-table.rs-rest-table col.rs-col-name {
  width: 32%;
}

.tg-guide-table.rs-rest-table col.rs-col-phone {
  width: 14%;
}

.tg-guide-table.rs-rest-table col.rs-col-contract {
  width: 14%;
}

.tg-guide-table.rs-rest-table col.rs-col-actions {
  width: 8%;
}

/* Services → Hotels (City, Hotel, Stars, Actions) — country shown in section heading */
.tg-guide-table.rst-services-table col.rs-col-city,
.tg-guide-table.htl-services-table col.htl-col-city {
  width: 22%;
}

.tg-guide-table.rst-services-table col.rs-col-name,
.tg-guide-table.htl-services-table col.htl-col-name {
  width: 44%;
}

.tg-guide-table.rst-services-table col.rs-col-phone,
.tg-guide-table.rst-services-table col.rs-col-contract,
.tg-guide-table.htl-services-table col.htl-col-stars {
  width: 26%;
}

.tg-guide-table.rst-services-table col.rs-col-actions,
.tg-guide-table.htl-services-table col.htl-col-actions {
  width: 8%;
}

.htl-stars-visual {
  color: #d4a017;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  white-space: nowrap;
}

.htl-name-cell {
  vertical-align: middle;
}

.htl-list-name-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
}

.htl-list-name {
  min-width: 0;
}

.htl-list-logo {
  flex-shrink: 0;
}

.rs-rest-filters {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-bottom: none;
}

.rs-rest-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 0.35rem 0.75rem;
  align-items: end;
  width: auto;
  box-sizing: border-box;
}

.rs-rest-filter-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.rs-rest-col-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: normal;
}

.rs-rest-page .rs-rest-filter-control {
  width: 110px;
  max-width: 110px;
  min-width: 0;
  box-sizing: border-box;
}

.rs-rest-page .rs-rest-filter-control[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

.rs-rest-page .rs-rest-filter-control.rs-rest-filter-control--name {
  width: 220px;
  max-width: 220px;
}

/* Clients list — same layout language as Services (Hotel / Restaurant) */
.clients-page .rs-rest-filter-control {
  width: 110px;
  max-width: 110px;
  min-width: 0;
  box-sizing: border-box;
}

.clients-page .rs-rest-filter-control[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

.clients-page .rs-rest-filter-control.rs-rest-filter-control--name {
  width: 220px;
  max-width: 220px;
}

.tg-guide-block1-toolbar.clients-block1-toolbar {
  padding: 0.35rem 0.75rem 0.35rem;
  box-sizing: border-box;
}

.clients-block1-filters {
  margin: 0;
  padding: 0;
  border-bottom: none;
}

.clients-colhead-panel table.data thead th {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  font-weight: 700;
}

.tg-guide-table.clients-table {
  table-layout: fixed;
  width: 100%;
}

.tg-guide-table.clients-table col.clients-col-name {
  width: 32%;
}

.tg-guide-table.clients-table col.clients-col-email {
  width: 28%;
}

.tg-guide-table.clients-table col.clients-col-phone {
  width: 22%;
}

.tg-guide-table.clients-table col.clients-col-req {
  width: 18%;
}

.clients-data-panel .clients-data-row {
  cursor: pointer;
}

.clients-data-panel .clients-data-row:hover td:first-child {
  font-weight: 700;
}

.clients-data-panel .clients-data-row:focus-visible {
  outline: 2px solid rgba(65, 50, 37, 0.35);
  outline-offset: -2px;
}

/* Requests list — same 3-block layout as Clients */
.tg-guide-block1-toolbar.requests-block1-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.175rem;
  padding: 0 0.75rem 0.35rem;
  box-sizing: border-box;
}

.requests-page .requests-block1-filters,
.requests-page .requests-block1-filters--dates {
  margin: 0;
  padding: 0;
  border-bottom: none;
}

/* Prima riga: padding-top azzerato; padding-bottom = metà dello standard .filters-row (0.35rem → 0.175rem) */
.requests-page .requests-block1-filters:not(.requests-block1-filters--dates) {
  padding-top: 0;
  padding-bottom: 0.175rem;
}

html[data-density="dense"] .requests-page .requests-block1-filters:not(.requests-block1-filters--dates) {
  padding-top: 0;
  padding-bottom: 0.13rem;
}

.requests-page .requests-block1-filters.filters-row {
  align-items: center;
}

.requests-page .requests-block1-filters .filters-origin-inline {
  display: inline-flex;
  align-items: center;
  align-self: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  min-height: 1.55rem;
  box-sizing: border-box;
}

.requests-page .requests-block1-filters .filters-origin-inline .chk-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  line-height: 1;
  font-size: 0.78rem;
}

.requests-page .requests-block1-filters .filters-origin-inline .rq-filter-origin {
  margin: 0;
  flex-shrink: 0;
}

html[data-density="dense"] .requests-page .requests-block1-filters .filters-origin-inline {
  min-height: 1.65rem;
}

.requests-page .requests-filter-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin-left: auto;
  flex-shrink: 0;
}

.requests-page .requests-filter-actions .btn {
  width: 100%;
  min-width: 9.5rem;
  box-sizing: border-box;
  justify-content: center;
}

.requests-page .requests-filter-actions .filters-clear-btn {
  margin-left: 0;
}

.requests-page .requests-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0.55rem 0 0.45rem;
}

.requests-page .requests-pager__actions {
  display: inline-flex;
  gap: 0.4rem;
}

.clients-page .clients-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0.55rem 0 0.45rem;
}

.clients-page .clients-pager__actions {
  display: inline-flex;
  gap: 0.4rem;
}

.requests-page .requests-table td.td-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.4rem;
  align-items: center;
  gap: 0.45rem;
}

.requests-page .rq-row-actions-newtour {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 1.55rem;
  white-space: nowrap;
}

.requests-page .rq-row-actions-icons {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: 3.4rem;
  min-width: 3.4rem;
  justify-self: end;
  justify-content: flex-end;
}

/* All status, destination, months, years — same width as date fields */
.requests-page .rq-filter-date-sized {
  width: 10.5rem;
  max-width: 10.5rem;
  min-width: 0;
  box-sizing: border-box;
}

/* Search contact/partner + All status/destination — same height as All months (#rq-filter-month) */
.requests-page #rq-filter-contact,
.requests-page #rq-filter-partner,
.requests-page #rq-filter-status,
.requests-page #rq-filter-destination {
  box-sizing: border-box;
  height: 1.55rem;
  min-height: 1.55rem;
  max-height: 1.55rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.78rem;
  line-height: 1.2;
}

.requests-page #rq-filter-contact,
.requests-page #rq-filter-partner {
  appearance: none;
  -webkit-appearance: none;
}

html[data-density="dense"] .requests-page #rq-filter-contact,
html[data-density="dense"] .requests-page #rq-filter-partner,
html[data-density="dense"] .requests-page #rq-filter-status,
html[data-density="dense"] .requests-page #rq-filter-destination {
  padding: 0.26rem 0.4rem;
  height: 1.65rem;
  min-height: 1.65rem;
  max-height: 1.65rem;
}

.requests-colhead-panel table.data thead th {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  font-weight: 700;
}

.tg-guide-table.requests-table {
  table-layout: fixed;
  width: 100%;
}

.tg-guide-table.requests-table col.rq-col-flag {
  width: 2rem;
}

.tg-guide-table.requests-table col.rq-col-mark {
  width: 10px;
}

.tg-guide-table.requests-table col.rq-col-date {
  width: 5.5rem;
}

.tg-guide-table.requests-table col.rq-col-code {
  width: 4.5rem;
}

.tg-guide-table.requests-table col.rq-col-contact {
  width: 14%;
}

.tg-guide-table.requests-table col.rq-col-pax {
  width: 2.75rem;
}

.tg-guide-table.requests-table col.rq-col-dest {
  width: 10%;
}

.tg-guide-table.requests-table col.rq-col-dates {
  width: 4.25rem;
}

.tg-guide-table.requests-table col.rq-col-origin {
  width: 3.5rem;
}

.tg-guide-table.requests-table col.rq-col-origin-val {
  width: 12%;
}

.tg-guide-table.requests-table col.rq-col-ico {
  width: 2rem;
}

.tg-guide-table.requests-table col.rq-col-status {
  width: 7.5rem;
}

.tg-guide-table.requests-table col.rq-col-tv {
  width: 5rem;
}

.tg-guide-table.requests-table col.rq-col-actions {
  width: 7rem;
}

.requests-data-panel .req-row:hover td:nth-child(5) {
  font-weight: 700;
}

.requests-data-panel .req-row:focus-visible {
  outline: 2px solid rgba(65, 50, 37, 0.35);
  outline-offset: -2px;
}

.tg-guide-lang-section {
  margin-top: 0 !important;
}

.tg-guide-lang-section .tg-lang-heading {
  margin: 0;
  padding: 0.5rem 0.75rem 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--panel-muted);
  border-bottom: 1px solid var(--panel-border);
}

.tg-guide-lang-section .table-wrap {
  border-top: none;
}

.tg-guide-data-row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.tg-guide-data-row:hover {
  background: rgba(65, 50, 37, 0.05);
}

.tg-guide-data-row:hover td {
  font-weight: 700;
}

.tg-guide-data-row:focus-visible {
  outline: 2px solid rgba(65, 50, 37, 0.35);
  outline-offset: -2px;
}

.tg-lic-cell--soon {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  font-weight: 600;
}

.tg-lic-cell--expired {
  background: rgba(239, 68, 68, 0.14);
  color: #7f1d1d;
  font-weight: 600;
}

.tg-guide-del-btn {
  color: var(--panel-muted);
  transition: color 0.12s ease, background 0.12s ease;
}

.tg-guide-del-btn:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

/* Services → Transportation (KH routes × vehicle prices) */
.trn-page {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.trn-block1 .panel-header {
  border-bottom: none !important;
}

.trn-block1-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.trn-block1-head .panel-title {
  margin: 0;
}

.trn-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.trn-sort-indicator {
  display: inline-flex;
  align-items: center;
  height: 1.9rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #1e40af;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.trn-matrix-panel {
  margin-top: 0 !important;
}

.trn-matrix-panel .table-wrap {
  border-top: none;
}

.trn-matrix-panel table.data thead th {
  border-bottom: none;
}

.trn-matrix-table thead th.trn-th-route {
  text-align: left;
  vertical-align: bottom;
}

.trn-matrix-table thead th.trn-th-dep {
  text-align: left;
  vertical-align: bottom;
}

.trn-matrix-table thead th.trn-th-dist {
  text-align: right;
  vertical-align: bottom;
  font-size: 0.72rem;
}

.trn-matrix-table thead th.trn-th-p {
  vertical-align: bottom;
  text-align: left;
}

.trn-price-field--head {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.22rem;
  width: 100%;
  box-sizing: border-box;
}

.trn-th-p-lbl {
  display: block;
  width: calc(3.35rem * 1.2);
  min-width: 0;
  box-sizing: border-box;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--panel-muted);
}

.trn-matrix-table {
  table-layout: fixed;
  width: 100%;
}

/* Route ampia (testo percorso); colonne prezzo compatte */
.trn-matrix-table col.trn-col-dep {
  width: 8.4%;
  min-width: 5rem;
}

.trn-matrix-table col.trn-col-route {
  width: 23.6%;
  min-width: 11rem;
}

.trn-matrix-table col.trn-col-dist {
  width: 4%;
  min-width: 3.75rem;
}

.trn-matrix-table col.trn-col-p {
  width: 11%;
}

.trn-matrix-table col.trn-col-actions {
  width: 5%;
}

.trn-th-actions {
  width: 5%;
}

.trn-matrix-table thead th.trn-th-p,
.trn-matrix-table td.trn-cell-num {
  padding-left: 0.12rem;
  padding-right: 0.12rem;
}

.trn-cell-num {
  text-align: right;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.trn-route-cell {
  vertical-align: middle;
}

.trn-dep-cell {
  vertical-align: middle;
}

.trn-dist-cell {
  vertical-align: middle;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.trn-dep-inp,
.trn-route-inp {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  font-weight: 700;
}

.trn-route-dist {
  display: inline-block;
  font-size: 0.72rem;
  line-height: 1.25;
  white-space: nowrap;
}

.trn-route-dist--empty {
  opacity: 0.65;
}

.trn-price-field {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  flex-wrap: nowrap;
  width: 100%;
}

.trn-price-inp {
  width: calc(3.35rem * 1.2);
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  text-align: right;
  box-sizing: border-box;
}

.trn-price-inp--has-price {
  font-weight: 700;
}

.trn-page input.trn-price-inp.trn-price-inp--zero,
.trn-matrix-table input.trn-price-inp.trn-price-inp--zero {
  background-color: #f87171 !important;
  background-image: none !important;
  border-color: #dc2626 !important;
  color: #7f1d1d;
  -webkit-appearance: none;
  appearance: none;
}

.trn-ccy {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--panel-muted);
  letter-spacing: 0.02em;
}

.trn-ccy--phantom {
  visibility: hidden;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.trn-del-btn {
  color: var(--panel-muted);
  border-radius: 8px;
  transition: color 0.12s ease, background 0.12s ease;
}

.trn-del-btn:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

.trn-row:focus-visible {
  outline: 2px solid rgba(65, 50, 37, 0.35);
  outline-offset: -2px;
}

/* Step 6 UI polish (Transportation only) */
.trn-page .panel.panel--compact.reqd-panel--tourmenu {
  border-color: #dce4ef;
  box-shadow: 0 10px 22px rgba(23, 40, 74, 0.06);
}

.trn-block1 {
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.95) 0%, rgba(246, 250, 255, 0.95) 100%);
}

.trn-block1-head {
  padding-top: 0.1rem;
}

.trn-head-actions {
  background: rgba(245, 249, 255, 0.95);
  border: 1px solid #d6e2f0;
  border-radius: 10px;
  padding: 0.2rem 0.28rem;
}

.trn-sort-indicator {
  background: rgba(126, 166, 217, 0.15);
  color: #2d4b73;
}

.trn-matrix-panel {
  border-color: #dce5f2;
  background: #f9fbff;
}

.trn-matrix-panel .table-wrap {
  background: #ffffff;
}

.trn-matrix-table thead th {
  background: #f4f8ff;
  color: #4f6078;
  border-bottom: 1px solid #d8e3f1;
}

.trn-matrix-table tbody td {
  border-bottom-color: #e6edf7;
}

.trn-row {
  transition: background-color 0.14s ease, box-shadow 0.14s ease;
}

.trn-row:hover {
  background: #f7fbff;
}

.trn-row:focus-visible {
  outline: 2px solid rgba(126, 166, 217, 0.45);
  outline-offset: -2px;
}

.trn-dep-inp,
.trn-route-inp,
.trn-price-inp {
  border-color: #cfd9e6;
  border-radius: 8px;
}

.trn-dep-inp:focus,
.trn-route-inp:focus,
.trn-price-inp:focus {
  border-color: #7ea6d9;
  box-shadow: 0 0 0 2px rgba(126, 166, 217, 0.18);
}

@media (max-width: 1100px) {
  .trn-block1-head {
    align-items: flex-start;
    gap: 0.5rem;
  }

  .trn-head-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .trn-matrix-table {
    table-layout: auto;
  }
}

.gf-fees-page {
  max-width: 100%;
}

.gf-fees-page > section[class*="gf-fee-"] {
  margin-top: 0.6rem;
}

.gf-fees-page > section.gf-fee-lang-section {
  margin-top: 0;
}

/* Griglia: lingua | Max pax | cestino (colonne più strette per lasciare spazio al pulsante Add language in testata) */
.gf-fee-lang-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.25rem 2.35rem;
  column-gap: 0.55rem;
  row-gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.75rem 0.75rem;
  box-sizing: border-box;
  max-width: 52rem;
}

.gf-fee-lang-section-head {
  display: flex;
  align-items: center;
  gap: 0.45rem 0.65rem;
  padding: 0.55rem 0.75rem 0.45rem;
  box-sizing: border-box;
}

.gf-fee-lang-section-head .gf-fee-lang-grid-title {
  flex: 1 1 auto;
  min-width: 0;
}

.gf-fee-lang-section-head .gf-fee-lang-grid-add {
  flex-shrink: 0;
  white-space: nowrap;
}

.gf-fee-lang-toggle {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: var(--panel-muted);
  border-radius: 8px;
}

.gf-fee-lang-toggle:hover {
  color: var(--panel-text);
  background: rgba(65, 50, 37, 0.06);
}

.gf-fee-lang-grid-spacer {
  display: block;
  min-height: 0;
}

.gf-fee-lang-grid-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.gf-fee-lang-head-label {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.2rem 0.35rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--panel-muted);
}

.gf-fee-lang-section.is-collapsed .gf-fee-lang-grid-body {
  display: none;
}

.gf-fee-lang-grid-name {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.gf-fee-lang-grid .gf-lang-pax {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-align: center;
}

.gf-fee-lang-grid-del {
  justify-self: end;
}

.gf-fee-lang-grid-empty {
  grid-column: 1 / -1;
  padding: 0.35rem 0;
}

.gf-fee-svc-head-section {
  padding-top: 0.45rem !important;
}

.gf-fee-svc-head-section .panel-header {
  border-bottom: none !important;
}

.gf-fee-svc-head-section .table-wrap {
  border-top: none;
}

.gf-fee-svc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.gf-fee-svc-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.gf-fee-svc-toolbar .gf-cat-select {
  min-width: 10rem;
  max-width: 14rem;
}

[data-gf-del-lang].icon-btn,
[data-gf-del-svc].icon-btn {
  font-size: 70%;
  line-height: 0;
}

[data-gf-del-lang].icon-btn .icon-trash,
[data-gf-del-svc].icon-btn .icon-trash {
  display: block;
}

[data-gf-del-lang].icon-btn:hover,
[data-gf-del-svc].icon-btn:hover {
  color: #d22;
}

.table-wrap.gf-lang-wrap {
  overflow-x: visible;
}

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

.gf-unified-wrap {
  max-width: 100%;
}

.gf-fees-page .gf-fee-svc-head-section.panel {
  overflow: visible;
}

.gf-unified-table {
  --gf-u-cat-w: 6.75rem;
  --gf-u-name-w: 16.875rem;
  --gf-u-price-inp-w: 3.5625rem;
  --gf-u-lang-min-w: calc(var(--gf-u-price-inp-w) * 2 + 1.75rem);
  --gf-u-del-w: 2.75rem;
  --gf-u-lang-n: 1;
  --gf-u-cat-inset-l: 0.32rem;
  --gf-u-cat-gap-r: 0.24rem;
  --gf-u-name-inset-r: 0.32rem;
  table-layout: fixed;
  width: 100%;
  min-width: calc(
    var(--gf-u-cat-w) + var(--gf-u-name-w) + var(--gf-u-del-w) +
    var(--gf-u-lang-n) * var(--gf-u-lang-min-w)
  );
  max-width: none;
  font-size: 0.72rem;
  border-collapse: separate;
  border-spacing: 0;
}

/* Fill wrapper when space allows; scroll when languages exceed viewport */
table.data.gf-unified-table {
  width: 100%;
  min-width: calc(
    var(--gf-u-cat-w) + var(--gf-u-name-w) + var(--gf-u-del-w) +
    var(--gf-u-lang-n) * var(--gf-u-lang-min-w)
  );
  max-width: none;
}

.gf-unified-table col.gf-u-col-cat {
  width: var(--gf-u-cat-w);
}

.gf-unified-table col.gf-u-col-name {
  width: var(--gf-u-name-w);
}

/* Language cols: no fixed width — share remaining table width equally */
.gf-unified-table col.gf-u-col-lang {
  width: auto;
}

.gf-unified-table col.gf-u-col-del {
  width: var(--gf-u-del-w);
}

.gf-unified-table th,
.gf-unified-table td {
  padding: 0.22rem 0.14rem;
  vertical-align: middle;
  box-sizing: border-box;
}

/* Beat ui-polish-pro `table.data tbody td { padding: 0.95rem 1.1rem !important }` */
.gf-fees-page .gf-unified-table thead th,
.gf-fees-page .gf-unified-table tbody td {
  padding: 0.22rem 0.14rem !important;
}

.gf-fees-page .gf-unified-table .gf-u-th-cat,
.gf-fees-page .gf-unified-table .gf-u-cat {
  width: var(--gf-u-cat-w);
  min-width: var(--gf-u-cat-w);
  max-width: var(--gf-u-cat-w);
  box-sizing: border-box;
  padding: 0.22rem var(--gf-u-cat-gap-r) 0.22rem var(--gf-u-cat-inset-l) !important;
}

.gf-fees-page .gf-unified-table .gf-u-th-name,
.gf-fees-page .gf-unified-table .gf-u-nm {
  width: var(--gf-u-name-w);
  min-width: var(--gf-u-name-w);
  max-width: var(--gf-u-name-w);
  box-sizing: border-box;
  padding: 0.22rem var(--gf-u-name-inset-r) 0.22rem 0.18rem !important;
}

.gf-fees-page .gf-unified-table .gf-u-th-del,
.gf-fees-page .gf-unified-table .gf-u-del {
  width: var(--gf-u-del-w);
  min-width: var(--gf-u-del-w);
  max-width: var(--gf-u-del-w);
  box-sizing: border-box;
}

.gf-fees-page .gf-unified-table .gf-u-th-lang,
.gf-fees-page .gf-unified-table .gf-u-price-cell {
  width: auto;
  min-width: var(--gf-u-lang-min-w);
  max-width: none;
  box-sizing: border-box;
}

.gf-u-th-cat,
.gf-u-cat {
  width: var(--gf-u-cat-w);
  min-width: var(--gf-u-cat-w);
  max-width: var(--gf-u-cat-w);
}

.gf-u-th-name,
.gf-u-nm {
  width: var(--gf-u-name-w);
  min-width: var(--gf-u-name-w);
  max-width: var(--gf-u-name-w);
}

.gf-u-th-route {
  width: 12%;
}

.gf-u-th-lang,
.gf-u-price-cell {
  width: auto;
  min-width: var(--gf-u-lang-min-w);
  max-width: none;
}

.gf-u-th-lang {
  text-align: center;
  padding: 0.22rem 0.28rem;
  box-sizing: border-box;
  font-weight: 700;
  font-size: 0.62rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: normal;
  overflow: hidden;
  word-break: break-word;
  color: var(--panel-muted);
  border-right: 1px solid rgba(205, 220, 237, 0.45);
}

.gf-u-th-del,
.gf-u-del {
  width: var(--gf-u-del-w);
  min-width: var(--gf-u-del-w);
  max-width: var(--gf-u-del-w);
}

.gf-unified-table .gf-u-th-cat,
.gf-unified-table .gf-u-cat {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
}

.gf-unified-table .gf-u-th-name,
.gf-unified-table .gf-u-nm {
  position: sticky;
  left: var(--gf-u-cat-w);
  z-index: 2;
  background: #fff;
  border-right: 1px solid rgba(205, 220, 237, 0.95);
  box-shadow: 4px 0 10px -6px rgba(18, 39, 74, 0.16);
}

.gf-unified-table .gf-u-th-del,
.gf-unified-table .gf-u-del {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  border-left: 1px solid rgba(205, 220, 237, 0.95);
  box-shadow: -4px 0 10px -6px rgba(18, 39, 74, 0.16);
}

.gf-fees-page .gf-unified-table thead .gf-u-th-cat,
.gf-fees-page .gf-unified-table thead .gf-u-th-name,
.gf-fees-page .gf-unified-table thead .gf-u-th-del {
  z-index: 4;
  background: #eaf2ff;
}

.gf-fees-page .gf-unified-table tbody tr:nth-child(even) .gf-u-cat,
.gf-fees-page .gf-unified-table tbody tr:nth-child(even) .gf-u-nm,
.gf-fees-page .gf-unified-table tbody tr:nth-child(even) .gf-u-del {
  background: #fbfdff;
}

.gf-fees-page .gf-unified-table tbody tr:hover .gf-u-cat,
.gf-fees-page .gf-unified-table tbody tr:hover .gf-u-nm,
.gf-fees-page .gf-unified-table tbody tr:hover .gf-u-del {
  background: #edf5ff;
}

.gf-u-cell,
.gf-u-cell.inp-compact {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.72rem;
}

.gf-u-price-cell {
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  padding-left: 0.12rem !important;
  padding-right: 0.12rem !important;
  border-right: 1px solid rgba(205, 220, 237, 0.45);
}

.gf-unified-table thead .gf-u-th-lang {
  padding-left: 0.28rem !important;
  padding-right: 0.28rem !important;
  padding-top: 0.22rem !important;
  padding-bottom: 0.22rem !important;
}

.gf-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.05rem;
  margin: 0 0.02rem;
  vertical-align: middle;
}

.gf-pair-lbl {
  font-size: 0.58rem;
  color: var(--muted);
  width: 0.55rem;
  flex-shrink: 0;
  text-align: center;
}

.gf-unified-table .gf-price-input {
  width: var(--gf-u-price-inp-w);
  max-width: none;
  min-width: var(--gf-u-price-inp-w);
  flex-shrink: 0;
  padding: 0.06rem 0.12rem;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}

.gf-unified-table .gf-price-input--tall,
.gf-unified-table .gf-u-cell.inp-compact {
  min-height: 2rem;
  padding: 0.28rem 0.35rem;
  line-height: 1.25;
  font-size: 0.8rem;
}

.gf-fee-lang-grid .gf-lang-input[data-gfl-field="name"] {
  width: 100%;
  box-sizing: border-box;
}

.gf-fee-lang-grid .gf-lang-input {
  max-width: 100%;
  min-width: 0;
  font-size: 0.8rem;
}

.gf-lang-pax {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.filters-row--origins {
  gap: 14px;
  padding-top: 0;
}

.filters-origin-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filters-row--dates .select-compact--label {
  min-width: 110px;
  font-weight: 600;
}

.date-scope-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: #ffffff;
  color: #b7b5bc;
  width: 18px;
  height: 18px;
  padding: 0;
  line-height: 16px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  text-align: center;
}

.date-scope-toggle.is-active {
  color: #413225;
  border-color: #7ead5a;
  background: rgba(126, 173, 90, 0.18);
}

.filters-clear-btn {
  margin-left: auto;
  white-space: nowrap;
}

.stats-status-cell {
  min-width: 220px;
  font-variant-numeric: tabular-nums;
}

.client-row {
  cursor: pointer;
}

.panel-body-pad {
  padding: 0.75rem 0.85rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.day-editor-grid {
  grid-template-columns: 3fr 2fr;
}

@media (max-width: 980px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

.profile-section {
  border: 1px solid var(--panel-border);
  border-radius: 5px;
  padding: 0.75rem;
  background: var(--panel-input-bg);
}

.profile-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.inp-med {
  max-width: 360px;
}

.pass-preview {
  width: 100%;
  max-width: 280px;
  min-height: 140px;
  object-fit: contain;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.08);
}

.select-compact {
  font: inherit;
  font-size: 0.78rem;
  padding: 0.2rem 0.35rem;
  max-width: 110px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
}

.ico-st {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
}

.ico-st--pending {
  background: #e6b422;
  box-shadow: 0 0 0 2px rgba(230, 180, 34, 0.25);
}

.ico-st--progress {
  background: #5bc4ff;
  box-shadow: 0 0 0 2px rgba(91, 196, 255, 0.25);
}

.ico-st--confirmed {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(61, 184, 160, 0.3);
}

.ico-st--cancelled {
  background: var(--danger);
  box-shadow: 0 0 0 2px rgba(232, 93, 93, 0.25);
}

.ico-pay::after {
  content: "";
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin-left: 0.25rem;
}

.pay-paid {
  color: #111111;
  font-weight: 600;
  margin-left: 0.3rem;
}

.pay-sep {
  color: #444444;
}

.pay-due {
  color: #d12b2b;
  font-weight: 700;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.reqd-page {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reqd-panel {
  margin: 0;
  border: none;
  box-shadow: none;
  background: var(--panel-surface-2);
  border-radius: 10px;
}

.reqd-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
  gap: 0.95rem 1.35rem;
  padding: 1.2rem 1.35rem;
  align-items: start;
}

/* Itinerary builder header — 50% / 25% / 25% (toggle via ITV_SUMMARY_HEADER_LAYOUT in app.js) */
.reqd-summary-grid--itv-header-v3 {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.45rem 1rem;
  padding: 0.95rem 1.1rem;
  align-items: start;
}

.reqd-summary-grid--itv-header-v3 .reqd-summary-left {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.reqd-summary-grid--itv-header-v3 .reqd-main-name {
  margin: 0;
  font-size: 1.72rem;
  line-height: 1.12;
}

.reqd-summary-grid--itv-header-v3 .itv-tour-headline {
  margin: 0;
  font-size: 1.34rem;
  line-height: 1.18;
  font-weight: 700;
  color: var(--panel-text);
}

.reqd-summary-grid--itv-header-v3 .reqd-subline {
  margin-top: 0.18rem;
  font-size: 0.78rem;
}

.reqd-summary-grid--itv-header-v3 .reqd-status-line {
  margin: 0;
  font-size: 0.8rem;
}

.reqd-summary-grid--itv-header-v3 .reqd-status-line--version {
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.reqd-summary-grid--itv-header-v3 .req-status-marker--inline {
  min-height: 28px;
}

.reqd-summary-grid--itv-header-v3 .reqd-summary-center,
.reqd-summary-grid--itv-header-v3 .reqd-summary-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.22rem;
  min-height: 100%;
}

.reqd-summary-grid--itv-header-v3 .reqd-summary-center .reqd-summary-kv {
  grid-template-columns: minmax(4.85rem, 4.85rem) minmax(0, 1fr);
}

.reqd-summary-grid--itv-header-v3 .reqd-summary-right .reqd-summary-kv {
  grid-template-columns: minmax(7.35rem, 7.35rem) minmax(0, 1fr);
}

.reqd-summary-grid--itv-header-v3 .reqd-summary-kv {
  display: grid;
  gap: 0.1rem 0.5rem;
  align-items: baseline;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.32;
}

.reqd-summary-grid--itv-header-v3 .reqd-summary-kv .reqd-right-k {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  margin: 0;
  min-width: 0;
  white-space: nowrap;
}

.reqd-summary-grid--itv-header-v3 .reqd-summary-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--panel-text);
  min-width: 0;
}

.reqd-summary-grid--itv-header-v3 .reqd-summary-val strong {
  font-weight: 600;
}

.reqd-summary-grid--itv-header-v3 .reqd-right-line {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.28;
}

.reqd-summary-grid--itv-header-v3 .reqd-right-k {
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  margin-right: 0.28rem;
  min-width: 5.4rem;
  display: inline-block;
  vertical-align: baseline;
}

.reqd-summary-grid--itv-header-v3 .reqd-right-line strong {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--panel-text);
}

.reqd-summary-grid--itv-header-v3 .itv-summary-warn {
  color: #b45309;
  font-size: 0.72rem;
  line-height: 1.25;
}

.reqd-summary-grid--itv-header-v3 .reqd-summary-actions {
  display: none;
}

.reqd-main-name {
  margin: 0;
  font-family: var(--font);
  font-size: 2.36rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--panel-text);
}

.reqd-subline {
  margin: 0.32rem 0 0;
  font-size: 0.82rem;
  color: var(--panel-muted);
}

.reqd-dot {
  opacity: 0.55;
  margin: 0 0.22rem;
}

.reqd-status-line {
  margin: 0.42rem 0 0;
  font-size: 0.84rem;
  color: var(--panel-text);
}

.reqd-status-line--version {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.req-status-marker--inline {
  width: 7px;
  min-height: 34px;
  border-radius: 999px;
}

.reqd-summary-right {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.reqd-right-line {
  margin: 0;
  font-size: 0.96rem;
  color: var(--panel-muted);
}

.reqd-right-k {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: 0.32rem;
}

.reqd-right-k--sp {
  margin-left: 0.7rem;
}

.reqd-summary-actions {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: flex;
  justify-content: flex-start;
  flex-direction: column;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding-top: 0.1rem;
}

.reqd-btn-new-tour {
  padding: 0.38rem 0.95rem;
}

.reqd-panel--tourmenu {
  padding: 1rem 1.35rem;
}

.reqd-panel--tours {
  padding: 0.9rem 1.35rem 1.15rem;
}

.reqd-page {
  --reqd-tour-cols: minmax(0, 1.55fr) 0.46fr minmax(0, 1fr) minmax(0, 1.2fr) 0.5fr 0.9fr minmax(0, 1.05fr);
}

.reqd-tour-menu {
  display: grid;
  grid-template-columns: var(--reqd-tour-cols);
  gap: 0.5rem;
  width: 100%;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--panel-muted);
  font-weight: 700;
  padding: 0.1rem 0.15rem;
}

.reqd-tour-menu--xl {
  font-size: 0.9rem;
}

.reqd-tour-block {
  background: var(--panel-surface-2);
  border: none;
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  margin-top: 0;
  cursor: pointer;
}

.reqd-tour-block:first-of-type {
  margin-top: 0;
}

.reqd-tour-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.reqd-tour-head[data-edit-tour-info] {
  cursor: pointer;
  border-radius: 6px;
  padding: 0.2rem 0.35rem;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.reqd-tour-head[data-edit-tour-info]:hover {
  opacity: 1;
  background: rgba(65, 50, 37, 0.06);
}

.reqd-tour-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--panel-text);
}

.reqd-tour-row {
  display: grid;
  grid-template-columns: var(--reqd-tour-cols);
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem 0.15rem;
  border-top: 1px solid rgba(65, 50, 37, 0.08);
}

.reqd-tour-row[data-go] {
  cursor: pointer;
}

.reqd-tour-row[data-go]:hover {
  background: rgba(65, 50, 37, 0.04);
}

.reqd-tour-row:first-of-type {
  border-top: none;
}

.reqd-tour-col {
  font-size: 1rem;
  color: var(--panel-text);
  min-width: 0;
  text-align: left;
}

.reqd-tour-col-sub {
  font-size: 0.76rem;
  color: var(--panel-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reqd-tour-col-sub--inline {
  margin-top: 0;
  margin-left: 0.42rem;
  display: inline-block;
  font-size: 1rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.reqd-tour-row .reqd-tour-col:nth-child(2) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.reqd-tour-blocks {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.reqd-tour-col a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reqd-tour-col--title {
  font-weight: 600;
}

.reqd-tour-col--version {
  display: block;
  min-width: 0;
}

.reqd-tour-col--version-main {
  display: block;
  font-weight: 600;
  color: var(--panel-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reqd-tour-col--dates {
  color: var(--panel-text);
  min-width: 0;
}

.reqd-tour-col--saved {
  color: var(--panel-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  min-width: 0;
}

.reqd-tour-col--actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 0.3rem;
}

.reqd-tour-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 8.4rem;
  min-width: 8.4rem;
  margin-left: auto;
  gap: 0.3rem;
}

.reqd-tour-head-actions .btn,
.reqd-tour-col--actions .btn {
  font-size: 0.84rem;
  line-height: 1.15;
  padding: 0.28rem 0.52rem;
  min-height: 1.58rem;
}

.reqd-tour-head-actions .btn[data-new-ver-tour],
.reqd-tour-col--actions .btn[data-edit-version] {
  min-width: 6.6rem;
  min-height: 1.5rem;
  padding: 0.24rem 0.45rem;
  justify-content: center;
}

.reqd-tour-head-actions .icon-btn,
.reqd-tour-col--actions .icon-btn {
  width: 1.5rem;
  min-width: 1.5rem;
  height: 1.5rem;
  min-height: 1.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.reqd-tour-menu > span:nth-child(2),
.reqd-tour-row > .reqd-tour-col:nth-child(2),
.reqd-tour-menu > span:nth-child(3),
.reqd-tour-row > .reqd-tour-col:nth-child(3),
.reqd-tour-menu > span:nth-child(4),
.reqd-tour-row > .reqd-tour-col:nth-child(4),
.reqd-tour-menu > span:nth-child(5),
.reqd-tour-row > .reqd-tour-col:nth-child(5),
.reqd-tour-menu > span:nth-child(6),
.reqd-tour-row > .reqd-tour-col:nth-child(6) {
  text-align: center;
}

.reqd-tour-menu > span:nth-child(3),
.reqd-tour-menu > span:nth-child(4),
.reqd-tour-menu > span:nth-child(5),
.reqd-tour-row > .reqd-tour-col--route,
.reqd-tour-row > .reqd-tour-col--dates,
.reqd-tour-row > .reqd-tour-col--length {
  display: flex;
  align-items: center;
  justify-content: center;
}

.reqd-tour-menu > span:nth-child(6),
.reqd-tour-row > .reqd-tour-col--saved {
  padding-left: 0.85rem;
}

.reqd-tour-menu > span:nth-child(7) {
  text-align: center;
}

.reqd-tour-menu > span:nth-child(2) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.reqd-tour-col--route {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reqd-tour-col--length {
  white-space: nowrap;
}

.reqd-tour-col--saved .reqd-tour-saved-date,
.reqd-tour-col--saved .reqd-tour-saved-time {
  display: inline-block;
}

.reqd-tour-col--actions {
  padding-right: 0;
  justify-content: flex-end;
  justify-self: end;
  width: 8.4rem;
}

.reqd-tour-menu > span:nth-child(7) {
  width: 6.6rem;
  justify-self: end;
  text-align: center;
}

.itv-over-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent, #5a7d3e);
  background: rgba(126, 173, 90, 0.16);
  border: 1px solid rgba(126, 173, 90, 0.35);
}


@media (max-width: 980px) {
  .reqd-main-name {
    font-size: 1.85rem;
  }
}

@media (max-width: 980px) {
  .reqd-summary-grid--itv-header-v3 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .reqd-summary-grid--itv-header-v3 .reqd-summary-left {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .reqd-summary-grid {
    grid-template-columns: 1fr;
    padding: 0.95rem 1rem;
  }

  .reqd-summary-grid--itv-header-v3 {
    grid-template-columns: 1fr;
    padding: 0.65rem 0.85rem;
  }

  .reqd-summary-grid--itv-header-v3 .reqd-main-name {
    font-size: 1.45rem;
  }

  .reqd-summary-actions {
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    justify-content: flex-start;
  }

  .reqd-main-name {
    font-size: 1.55rem;
  }

  .reqd-tour-menu,
  .reqd-tour-row {
    grid-template-columns: 1fr;
    font-size: 0.92rem;
  }

  .reqd-panel--tourmenu,
  .reqd-panel--tours {
    padding: 0.85rem 1rem;
  }
}

.page-edit-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

/* Client profile page — layout mock (tabs + split column) */
.client-edit-page {
  width: 100%;
  max-width: none;
}

.client-edit-page .ce-surface.ce-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--panel-surface-2);
  border: none;
  box-sizing: border-box;
}

.client-edit-page .ce-progress-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--panel-text);
}

.client-edit-page .ce-progress-track {
  flex: 1;
  min-width: 0;
  height: 8px;
  border-radius: 999px;
  background: rgba(65, 50, 37, 0.08);
  overflow: hidden;
}

.client-edit-page .ce-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width 0.25s ease;
}

.client-edit-page .ce-progress-pct {
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--panel-muted);
}

.client-edit-page .ce-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  margin: 0 0 0.85rem;
  padding: 0;
  border-bottom: 1px solid var(--panel-border);
}

.client-edit-page .ce-tab {
  position: relative;
  margin: 0 0 -1px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--panel-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.client-edit-page .ce-tab:hover:not(.is-active) {
  color: var(--panel-text);
  background: rgba(65, 50, 37, 0.04);
}

.client-edit-page .ce-tab.is-active {
  font-weight: 600;
  color: var(--panel-text);
  border-bottom-color: var(--accent);
  background: rgba(126, 173, 90, 0.08);
}

/* Services (Guide, fees, transport, hotel, restaurant, other) — same chrome as client editor tabs */
.ce-tabs.services-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  margin: 0 0 0.85rem;
  padding: 0;
  border-bottom: 1px solid var(--panel-border);
}

.ce-tabs.services-tabs .ce-tab {
  position: relative;
  margin: 0 0 -1px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--panel-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ce-tabs.services-tabs .ce-tab:hover:not(.is-active) {
  color: var(--panel-text);
  background: rgba(65, 50, 37, 0.04);
}

.ce-tabs.services-tabs .ce-tab.is-active {
  font-weight: 600;
  color: var(--panel-text);
  border-bottom-color: var(--accent);
  background: rgba(126, 173, 90, 0.08);
}

.client-edit-page .ce-split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: 1.15rem;
  align-items: start;
}

/* Supplier edit — 60% / 40%, same field language as client editor */
.client-edit-page.supplier-edit-page .ce-split--supplier-edit {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.client-edit-page.supplier-edit-page .ce-field-grid--3col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.client-edit-page.supplier-edit-page .ce-field-grid--bank {
  grid-template-columns: minmax(0, 1fr);
}

.client-edit-page.supplier-edit-page select.ce-inp {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.86rem;
  padding: 0.42rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(65, 50, 37, 0.14);
  background: var(--panel-input-bg);
  color: var(--panel-text);
}

.client-edit-page.supplier-edit-page select.ce-inp:focus {
  outline: none;
  border-color: rgba(126, 173, 90, 0.65);
}

.client-edit-page.supplier-edit-page .ce-main {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.client-edit-page.supplier-edit-page .ce-photo-row {
  margin-bottom: 0;
}

.client-edit-page.supplier-edit-page .ce-avatar-ring {
  width: 106px;
  height: 106px;
}

.client-edit-page.supplier-edit-page .ce-field-grid {
  gap: 0.88rem 1.1rem;
}

.client-edit-page.supplier-edit-page .supplier-edit-bank {
  margin-top: 20px;
}

.supplier-edit-bank .ce-aside-title {
  margin-bottom: 0.65rem;
}

/* Restaurant → Contract tab: dates column 30%, preview column 70% */
.client-edit-page.rs-detail-page .ce-split.ce-split--rs-contract {
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  align-items: start;
  isolation: isolate;
}

.client-edit-page.rs-detail-page .ce-split.ce-split--rs-contract > .ce-main {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.client-edit-page.rs-detail-page .ce-split.ce-split--rs-contract > .ce-aside {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.client-edit-page .ce-main {
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 10px;
  background: transparent;
  min-width: 0;
  border: none;
  box-shadow: none;
}

/* Match .ce-main inset so left/right columns (e.g. Contract start date vs Contract preview) align on the same row */
.client-edit-page.rs-detail-page:not(.rs-detail-page--menu-tab) .ce-aside {
  padding: 1rem 1.1rem 1.15rem;
  box-sizing: border-box;
}

/* Restaurant → Menu tab: no grey “plate” behind menu (transparent main column, no inset padding) */
.client-edit-page.rs-detail-page.rs-detail-page--menu-tab .ce-main.ce-main--rs-menu {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.client-edit-page.rs-detail-page.rs-detail-page--menu-tab .ce-surface.ce-progress-wrap {
  background: transparent;
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 0.75rem;
}

.client-edit-page.rs-detail-page.rs-detail-page--menu-tab .rsd-menu-block {
  border: none;
  box-shadow: none;
}

/* Right column (Menu content): same — no grey panel behind textarea */
.client-edit-page.rs-detail-page.rs-detail-page--menu-tab .ce-aside .ce-aside-block {
  background: transparent !important;
  border-radius: 0;
  padding: 0;
}

.client-edit-page .ce-personal,
.client-edit-page .ce-passport,
.client-edit-page .ce-insurance {
  min-width: 0;
}

.client-edit-page .ce-photo-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

/* Hotel detail — primary photo above fields (must stay visible; ring matches supplier scale) */
.client-edit-page.rs-detail-page[data-htl-id] .htd-hotel-photo-block {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(65, 50, 37, 0.1);
}

.client-edit-page.rs-detail-page[data-htl-id] .htd-hotel-photo-block .ce-photo-row {
  margin-bottom: 0;
}

.client-edit-page.rs-detail-page[data-htl-id] .htd-hotel-photo-block .ce-avatar-ring {
  width: 119px;
  height: 119px;
  border-radius: 10px;
}

/* Restaurant detail — primary photo + info split (mirrors hotel) */
.client-edit-page.rs-detail-page[data-rst-id] .rsd-restaurant-photo-block {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(65, 50, 37, 0.1);
}

.client-edit-page.rs-detail-page[data-rst-id] .rsd-restaurant-photo-block .ce-photo-row {
  margin-bottom: 0;
}

.client-edit-page.rs-detail-page[data-rst-id] .rsd-restaurant-photo-block .ce-avatar-ring {
  width: 119px;
  height: 119px;
  border-radius: 10px;
}

.client-edit-page .ce-avatar-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(65, 50, 37, 0.06);
  border: 1px solid rgba(65, 50, 37, 0.1);
}

.client-edit-page .ce-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.client-edit-page .ce-photo-actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.client-edit-page .ce-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.client-edit-page .ce-upload-btn span {
  display: inline-block;
  padding: 0.38rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid rgba(65, 50, 37, 0.16);
  background: var(--panel-bg);
  color: var(--panel-text);
}

.client-edit-page .ce-upload-btn:hover span {
  border-color: rgba(126, 173, 90, 0.55);
  color: var(--accent);
}

.client-edit-page .ce-upload-hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--panel-muted);
}

.client-edit-page .ce-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.9rem;
}

.client-edit-page .ce-field--full {
  grid-column: 1 / -1;
}

.client-edit-page .ce-field--gender .ce-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.25rem;
}

.client-edit-page .ce-radio {
  font-size: 0.84rem;
  color: var(--panel-text);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.client-edit-page .ce-lbl {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--panel-muted);
  margin-bottom: 0.28rem;
}

.client-edit-page .ce-req {
  color: #c44;
  font-weight: 700;
}

.client-edit-page .ce-inp,
.client-edit-page .ce-ta {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.86rem;
  padding: 0.42rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(65, 50, 37, 0.14);
  background: var(--panel-input-bg);
  color: var(--panel-text);
  transition: border-color 0.15s ease;
}

.client-edit-page .ce-inp:focus,
.client-edit-page .ce-ta:focus {
  outline: none;
  border-color: rgba(126, 173, 90, 0.65);
}

.client-edit-page .ce-inp--readonly {
  background: rgba(65, 50, 37, 0.04);
  color: var(--panel-muted);
}

.client-edit-page .ce-inp--invalid {
  border-color: #c44;
}

.client-edit-page .ce-inp--custom {
  border-color: rgba(65, 50, 37, 0.28);
}

.client-edit-page .ce-ta {
  min-height: 5.5rem;
  resize: vertical;
}

.client-edit-page .ce-field--file .ce-file-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.client-edit-page .ce-upload-btn.ce-upload-btn--sm span {
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
}

.client-edit-page .ce-pass-thumb,
.client-edit-page .ce-insurance-thumb {
  width: 100%;
  max-width: 360px;
  min-height: 220px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid rgba(65, 50, 37, 0.1);
  background: rgba(65, 50, 37, 0.04);
}

.client-edit-page .ce-aside {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.client-edit-page .ce-aside-block {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--panel-surface-2);
  border: none;
  box-shadow: none;
}

.client-edit-page .ce-aside-block--muted {
  background: var(--panel-surface-2);
  border: none;
  box-shadow: none;
}

.client-edit-page .ce-aside-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--panel-muted);
  margin: 0 0 0.35rem;
}

.client-edit-page .ce-aside-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--panel-text);
  line-height: 1.25;
  word-break: break-word;
}

.client-edit-page .ce-aside-title--lg {
  font-size: 1.03rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.client-edit-page .ce-aside-meta {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  color: var(--panel-muted);
  line-height: 1.35;
  word-break: break-word;
}

.client-edit-page .ce-aside-hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--panel-muted);
}

.client-edit-page .ce-aside-empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--panel-muted);
}

.client-edit-page .ce-inquiry-card {
  border-top: 1px solid rgba(65, 50, 37, 0.1);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.client-edit-page .ce-inquiry-card:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.client-edit-page .ce-inquiry-card--curr .ce-inq-top,
.client-edit-page .ce-inquiry-card--curr .ce-inq-mid {
  font-weight: 700;
}

.client-edit-page .ce-inquiry-card--prev .ce-inq-top,
.client-edit-page .ce-inquiry-card--prev .ce-inq-mid {
  font-weight: 700;
}

.client-edit-page .ce-inq-top {
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
  font-size: 0.79rem;
  color: var(--panel-text);
}

.client-edit-page .ce-inq-mid {
  margin-top: 0.15rem;
  font-size: 0.79rem;
  color: var(--panel-muted);
}

.client-edit-page .ce-pay-head {
  display: grid;
  grid-template-columns: 0.9fr 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.7rem;
  font-size: 0.73rem;
  color: var(--panel-text);
  text-transform: uppercase;
  font-weight: 700;
}

.client-edit-page .ce-pay-row {
  display: grid;
  grid-template-columns: 0.9fr 1fr 1fr;
  gap: 0.45rem;
  font-size: 0.79rem;
  color: var(--panel-text);
  margin-top: 0.1rem;
}

.client-edit-page .ce-inquiry-card--curr .ce-pay-row > span:last-child {
  font-weight: 700;
}

.client-edit-page .ce-mini-title {
  margin-top: 0.72rem;
  font-size: 0.74rem;
  color: var(--panel-text);
  text-transform: uppercase;
  font-weight: 700;
}

.client-edit-page .ce-mini {
  margin: 0.2rem 0 0;
  font-size: 0.79rem;
  color: var(--panel-muted);
}

.client-edit-page .ce-rem-strong {
  font-weight: 700;
}

.client-edit-page .ce-group-list {
  margin: 0.38rem 0 0;
  padding-left: 1rem;
  font-size: 0.79rem;
  color: var(--panel-text);
}

.client-edit-page .ce-inq-link {
  cursor: pointer;
}

/* Restaurant detail page uses client-detail structure. */
.rs-detail-page .rsd-empty-side {
  min-height: 100%;
}

/* Hotel detail — rates matrix (full width) */
.htd-rates-panel {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.htd-rates-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

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

.client-edit-page .htd-rate-matrix {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}

.client-edit-page .htd-rate-matrix th,
.client-edit-page .htd-rate-matrix td {
  vertical-align: middle;
  padding: 0.6rem 0.85rem;
  box-sizing: border-box;
}

.client-edit-page .htd-rate-matrix thead th {
  padding-top: 0.5rem;
  padding-bottom: 0.7rem;
}

.client-edit-page .htd-rate-matrix tbody th {
  padding-right: 1rem;
  min-width: 12rem;
}

.client-edit-page .htd-rate-matrix .htd-rate-corner {
  min-width: 3rem;
}

.client-edit-page .htd-rate-matrix .htd-rate-season-th {
  min-width: 9rem;
  vertical-align: top;
}

.client-edit-page .htd-rate-matrix .htd-rate-room-th {
  text-align: left;
  font-weight: 600;
}

.htd-room-head-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.35rem 0.65rem;
}

.htd-room-head-field {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.client-edit-page .htd-rate-matrix .htd-inp-room-name {
  width: 10rem;
  min-width: 7rem;
  max-width: 14rem;
  font-size: 0.88rem;
}

.client-edit-page .htd-rate-matrix .htd-inp-room-category {
  width: 16rem;
  min-width: 12rem;
  max-width: 24rem;
  font-size: 0.84rem;
}

.client-edit-page .htd-rate-matrix .htd-inp-season-name {
  width: 100%;
  min-width: 7rem;
  max-width: 12rem;
  font-size: 0.88rem;
}

.client-edit-page .htd-rate-matrix td {
  text-align: center;
  /* Same column width as .htd-rate-season-th + .htd-inp-season-name */
  min-width: 9rem;
}

.client-edit-page .htd-rate-matrix .htd-rate-price-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
}

.client-edit-page .htd-rate-matrix [data-htd-rate].htd-rate-inp {
  width: 5.4rem;
  min-width: 5.4rem;
  max-width: 5.625rem;
  margin: 0;
  display: block;
  box-sizing: border-box;
  text-align: center;
  font-size: 0.88rem;
}

.htd-anc-hint {
  margin: 0 0 0.5rem;
}

.htd-anc-table-wrap {
  overflow-x: auto;
  margin-bottom: 0.5rem;
}

.htd-anc-table .htd-anc-col-name {
  min-width: 12rem;
}

.htd-anc-table .htd-anc-col-basis {
  min-width: 8rem;
}

.htd-anc-table .htd-anc-col-amt {
  width: 5rem;
}

.htd-anc-table .htd-anc-col-def {
  text-align: center;
  width: 4.5rem;
}

.itv-hotel-anc-cell {
  margin-top: 0.35rem;
}

.itv-hotel-anc-h {
  margin-bottom: 0.25rem;
}

.itv-hotel-anc-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.itv-hotel-anc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
}

.itv-hotel-anc-qty {
  width: 3.5rem;
  min-width: 3.5rem;
}

.itv-hotel-anc-basis {
  min-width: 4.5rem;
}

.client-edit-page .htd-rate-matrix .htd-rate-price-td .htd-currency-code {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand-brown-muted);
}

.htd-rates-section {
  margin-bottom: 1.75rem;
}

.htd-rates-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.85rem;
}

.htd-rates-section-head .htd-rates-h {
  margin: 0;
}

.htd-rates-section-head .htd-rates-toolbar {
  margin-bottom: 0;
}

.htd-rates-section-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
}

.htd-rates-wdwe-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0;
}

.htd-rates-wdwe-lbl {
  font-weight: 600;
}

.htd-rates-wdwe-toggle {
  display: inline-flex;
  gap: 0.3rem;
}

.htd-rates-wdwe-toggle .btn.is-active {
  box-shadow: inset 0 0 0 1px rgba(90, 120, 60, 0.45);
  background: rgba(126, 173, 90, 0.28);
}

.htd-rates-h {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.htd-season-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.htd-season-dates {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.2rem;
}

.htd-season-date-pair {
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 1fr);
  align-items: center;
  column-gap: 0.45rem;
}

.htd-season-date-pair .htd-mini-lbl {
  white-space: nowrap;
  line-height: 1.2;
  align-self: center;
}

.htd-season-ranges {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.htd-season-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem;
}

.htd-season-range-sep {
  font-size: 0.72rem;
  color: var(--panel-muted);
  padding: 0 0.1rem;
}

.htd-season-range-add {
  align-self: flex-start;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  padding: 0.1rem 0.35rem;
}

.htd-rate-season-th .htd-inp-season-range-from,
.htd-rate-season-th .htd-inp-season-range-to {
  min-width: 0;
  width: 100%;
  font-size: 0.72rem;
  padding: 0.2rem 0.25rem;
}

.htd-mini-lbl {
  font-size: 0.72rem;
  color: var(--panel-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.client-edit-page .htd-rate-matrix .htd-inp-season-from,
.client-edit-page .htd-rate-matrix .htd-inp-season-to {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 2.1rem;
  font-size: 0.8rem;
  line-height: 1.25;
  box-sizing: border-box;
}

.htd-room-meta-row td {
  background: rgba(65, 50, 37, 0.04);
  padding: 0.75rem 0.85rem !important;
  vertical-align: top !important;
}

.htd-room-meta-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.htd-room-meta-title {
  position: relative;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 1.8rem;
}

.htd-room-meta-title-text {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
}

.htd-room-meta-rm {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.htd-room-meta-name,
.htd-room-meta-cat {
  color: var(--panel-text);
}

.htd-room-meta-fields,
.htd-room-meta-eb {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.htd-room-meta-fields .htd-mini-lbl {
  white-space: nowrap;
}

.htd-room-meta-eb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  width: 100%;
}

.htd-eb-allowed {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.htd-eb-price-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.htd-currency-code {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--panel-muted);
  letter-spacing: 0.04em;
}

.client-edit-page .htd-room-meta-fields .htd-room-amenities-inp {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: 28rem;
}

.client-edit-page .htd-room-meta-fields .htd-room-amenities-inp--compact {
  flex: 1 1 5.28rem;
  min-width: 5.28rem;
  max-width: 12.32rem;
  font-size: 0.74rem;
}

.htd-room-meta-eb-photos {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.htd-room-meta-photos-inline {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.htd-room-meta-photos-inline .htd-rt-photo-row {
  margin-top: 0;
}

.inp-narrow {
  max-width: 5.5rem;
}

.inp-narrow--mini {
  max-width: 2.75rem;
  min-width: 2.75rem;
  font-size: 0.74rem;
  padding-left: 0.28rem;
  padding-right: 0.28rem;
}

.inp-narrow--mini-lg {
  max-width: 4.15rem;
  min-width: 4.15rem;
}

.htd-rt-photo-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0;
}

.htd-rt-photo-slot {
  position: relative;
  width: 72px;
  height: 56px;
  border: 1px dashed rgba(65, 50, 37, 0.28);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.htd-photo-rm-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}

.htd-photo-rm-btn:hover {
  background: rgba(185, 28, 28, 0.92);
}

.htd-rt-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.htd-photo-hover-preview {
  position: fixed;
  z-index: 2200;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.12s ease, transform 0.12s ease;
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.htd-photo-hover-preview.is-visible {
  opacity: 1;
  transform: scale(1);
}

.htd-photo-hover-preview img {
  display: block;
  width: 260px;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
}

.htd-promo-table-wrap {
  overflow-x: auto;
  margin-bottom: 0.65rem;
}

/* Name leggermente più largo; date: spazio ricavato da % off / Fixed / Priority (−30%) ripartito in 4 */
.client-edit-page .htd-promo-table th.htd-promo-col-name,
.client-edit-page .htd-promo-table td.htd-promo-col-name {
  min-width: 12.5rem;
  width: 1%;
}

.client-edit-page .htd-promo-name-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.client-edit-page .htd-promo-name-cell .htd-promo-inp {
  flex: 1 1 auto;
  min-width: 0;
}

.client-edit-page .htd-promo-name-cell .htd-promo-rm {
  flex: 0 0 auto;
  min-width: 1.75rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  line-height: 1.2;
}

.client-edit-page .htd-promo-table th.htd-promo-col-date,
.client-edit-page .htd-promo-table td.htd-promo-col-date {
  max-width: 9.45rem;
  width: 9.45rem;
}

.client-edit-page .htd-promo-table .htd-promo-col-date .ce-inp {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* % off, Fixed USD, Priority: −30% rispetto a 6.75rem / 5.4rem */
.client-edit-page .htd-promo-table th.htd-promo-col-priority,
.client-edit-page .htd-promo-table td.htd-promo-col-priority {
  max-width: 3.78rem;
  width: 3.78rem;
}

.client-edit-page .htd-promo-table th.htd-promo-col-pct-off,
.client-edit-page .htd-promo-table td.htd-promo-col-pct-off,
.client-edit-page .htd-promo-table th.htd-promo-col-fixed-usd,
.client-edit-page .htd-promo-table td.htd-promo-col-fixed-usd {
  max-width: 4.725rem;
  width: 4.725rem;
}

/* Kind e Room IDs: ~metà di una colonna “tipo” (~10rem / ~14rem) */
.client-edit-page .htd-promo-table th.htd-promo-col-kind,
.client-edit-page .htd-promo-table td.htd-promo-col-kind {
  max-width: 5rem;
  width: 5rem;
}

.client-edit-page .htd-promo-table .htd-promo-col-kind .ce-inp {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 0.78rem;
}

.client-edit-page .htd-promo-table th.htd-promo-col-room-ids,
.client-edit-page .htd-promo-table td.htd-promo-col-room-ids {
  max-width: 7rem;
  width: 7rem;
  white-space: normal;
}

.client-edit-page .htd-promo-table .htd-promo-col-room-ids .ce-inp {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.client-edit-page .htd-promo-table .htd-promo-col-priority .ce-inp,
.client-edit-page .htd-promo-table .htd-promo-col-pct-off .ce-inp,
.client-edit-page .htd-promo-table .htd-promo-col-fixed-usd .ce-inp {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.client-edit-page .htd-promo-table th,
.client-edit-page .htd-promo-table td {
  font-size: 0.82rem;
  white-space: nowrap;
}

.htd-photo-aside {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
}

.htd-rates-contract-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.85rem;
}

.htd-rates-contract-bar .ce-lbl {
  margin-bottom: 0;
  white-space: nowrap;
  line-height: 1.2;
}

.htd-rates-contract-bar .ce-inp {
  min-width: 14rem;
  max-width: 22rem;
  margin: 0;
}

.htd-rates-section-head-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.75rem;
  flex: 1 1 auto;
  min-width: min(100%, 12rem);
}

.htd-rates-section-head-title .htd-rates-h {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
}

.htd-rates-active-contract {
  font-size: 0.95rem;
  font-weight: 700;
  color: #c0392b;
  line-height: 1.25;
  flex: 0 1 auto;
}

.htd-season-cal-contract-bar {
  margin-bottom: 0.75rem;
}

.client-edit-page.rs-detail-page[data-htl-id] .ce-split.ce-split--htd-info {
  grid-template-columns: minmax(0, 1fr) 252px;
}

.client-edit-page.rs-detail-page[data-rst-id] .ce-split.ce-split--rs-info {
  grid-template-columns: minmax(0, 1fr) 252px;
}

.client-edit-page.rs-detail-page--htd-rates-tab .ce-split.ce-split--htd-rates {
  grid-template-columns: minmax(0, 7fr) minmax(0, 2.7fr);
  gap: 0.65rem;
}

.client-edit-page .htd-rate-matrix tbody tr.htd-room-meta-row:not(:last-child) td {
  border-bottom: 2px solid rgba(65, 50, 37, 0.2);
  box-shadow: inset 0 -1px 0 rgba(65, 50, 37, 0.08);
}

.client-edit-page .htd-eb-price-group .htd-eb-price-inp {
  max-width: 5.25rem;
  min-width: 5.25rem;
  font-size: 0.8rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

.client-edit-page.rs-detail-page[data-htl-id] .htd-photo-aside {
  gap: 0.75rem;
}

.client-edit-page.rs-detail-page[data-htl-id] .htd-photo-slot {
  flex: 0 0 auto;
  width: 100%;
  padding: 0.45rem;
}

.client-edit-page.rs-detail-page[data-htl-id] .htd-photo-slot-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.client-edit-page.rs-detail-page[data-rst-id] .htd-photo-aside {
  gap: 0.75rem;
}

.client-edit-page.rs-detail-page[data-rst-id] .htd-photo-slot {
  flex: 0 0 auto;
  width: 100%;
  padding: 0.45rem;
}

.client-edit-page.rs-detail-page[data-rst-id] .htd-photo-slot-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.htd-photo-slot {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border: 1px dashed rgba(65, 50, 37, 0.28);
  border-radius: 10px;
  padding: 0.5rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.12s ease, border-color 0.12s ease;
  box-sizing: border-box;
}

.htd-photo-slot:hover,
.htd-photo-slot:focus-visible {
  background: rgba(126, 173, 90, 0.08);
  border-color: rgba(126, 173, 90, 0.45);
  outline: none;
}

.htd-photo-slot-img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(65, 50, 37, 0.06);
}

.htd-photo-slot-label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--panel-muted);
}

.client-edit-page.rs-detail-page .ce-main.ce-main--htd-rates {
  min-width: 0;
}

.client-edit-page .ce-main.ce-main--htd-seasoncal {
  min-width: 0;
}

/* Hotel — Season calendar tab (12 compact months) */
.htd-season-cal {
  width: 100%;
  min-width: 0;
}

.htd-season-cal-intro {
  margin: 0 0 0.85rem;
  max-width: 48rem;
  line-height: 1.4;
}

.htd-season-cal-months {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem 1.1rem;
  align-items: start;
}

@media (max-width: 1200px) {
  .htd-season-cal-months {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .htd-season-cal-months {
    grid-template-columns: 1fr;
  }
}

.htd-cal-month {
  border: 1px solid rgba(65, 50, 37, 0.14);
  border-radius: 10px;
  padding: 0.55rem 0.6rem 0.65rem;
  background: rgba(255, 255, 255, 0.55);
  box-sizing: border-box;
  min-width: 0;
}

.htd-cal-month-title {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
}

.htd-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--panel-muted);
  text-align: center;
}

.htd-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.htd-cal-cell {
  min-height: 1.55rem;
  border-radius: 3px;
  box-sizing: border-box;
}

.htd-cal-day {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(22, 20, 18, 0.92);
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.45);
  cursor: default;
}

.htd-cal-cell--pad {
  min-height: 1.55rem;
  visibility: hidden;
}

.htd-cal-day-num {
  line-height: 1;
}

.htd-cal-aside .htd-cal-leg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
}

.htd-cal-leg-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.htd-cal-leg-swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.htd-cal-aside-note {
  margin: 0.55rem 0 0;
  line-height: 1.35;
  font-size: 0.78rem;
}

/* Hotel Rates — aside coherence checks */
.htd-coherence-aside {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(65, 50, 37, 0.12);
  box-sizing: border-box;
}

.htd-coh-title {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.htd-coh-meta {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: var(--panel-muted);
  line-height: 1.35;
}

.htd-coh-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.45;
}

.htd-coh-item {
  margin-bottom: 0.4rem;
}

.htd-coh-item:last-child {
  margin-bottom: 0;
}

.htd-coh-item--warn {
  color: var(--text, #2c2419);
}

.htd-coh-tag {
  display: inline-block;
  margin-right: 0.25rem;
  padding: 0.08rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 4px;
  background: rgba(180, 120, 60, 0.18);
  color: var(--panel-muted);
  vertical-align: baseline;
}

.htd-coh-ok {
  margin: 0;
  font-size: 0.82rem;
  color: var(--panel-muted);
}

/* Ensure inactive main/aside tab panels never paint over the active tab (fixes overlap with tabs / other panels). */
.client-edit-page.rs-detail-page .ce-main > .ce-tab-panel[hidden],
.client-edit-page.rs-detail-page .ce-aside > .ce-tab-panel[hidden] {
  display: none !important;
}

.client-edit-page .ce-field-grid.rsd-grid-quarters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem 0.9rem;
}

.client-edit-page .ce-field-grid.rsd-grid-thirds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 0.9rem;
}

/*
 * Restaurant → Menu tab: no outer frame — only .rsd-menu-block children sit on .ce-main (--panel-surface-2).
 */
.client-edit-page.rs-detail-page .ce-main > .ce-tab-panel--rest-menu {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.client-edit-page.rs-detail-page .rsd-menu-block {
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  border: none;
  border-radius: 10px;
  background: #f0f0f0;
  box-shadow: var(--shadow);
}

.client-edit-page.rs-detail-page .rsd-menu-block--toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  margin-bottom: 1.15rem;
}

/* Block 2: header row + menu rows only (no toolbar inside) */
.client-edit-page.rs-detail-page .rsd-menu-block--list {
  padding: 0.35rem 0.5rem 0.55rem;
  overflow: hidden;
}

.client-edit-page.rs-detail-page .rsd-menu-toolbar-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--panel-text);
}

/* Aside — Menu content: same two-block layout + #f0f0f0 as main column (reuses .rsd-menu-block) */
.client-edit-page.rs-detail-page .rsd-menu-aside-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0;
}

.client-edit-page.rs-detail-page .rsd-menu-content-toolbar.rsd-menu-block--toolbar {
  justify-content: flex-start;
}

.client-edit-page.rs-detail-page .rsd-menu-content-body .rsd-menu-content-ta {
  display: block;
  width: 100%;
  min-height: 12rem;
  box-sizing: border-box;
  margin: 0;
}

/* Contract tab — dates left, preview right; same blocks + label style as Menu */
.client-edit-page.rs-detail-page .rsd-contract-stack {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0;
}

.client-edit-page.rs-detail-page .rsd-contract-field-head.rsd-menu-block--toolbar {
  justify-content: flex-start;
}

.client-edit-page.rs-detail-page .rsd-contract-field-body .rsd-contract-date-inp {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.client-edit-page.rs-detail-page .rsd-contract-field-body {
  margin-bottom: 1.15rem;
}

.client-edit-page.rs-detail-page .rsd-contract-field-body:last-child {
  margin-bottom: 0;
}

.client-edit-page.rs-detail-page .rsd-contract-preview-body .rsd-contract-preview-ta {
  display: block;
  width: 100%;
  min-height: 14rem;
  box-sizing: border-box;
  margin: 0;
}

/* Hotel — Contract tab (multi-contract cards) */
.htd-contract-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.htd-contract-card {
  border: 1px solid rgba(65, 50, 37, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  position: relative;
  z-index: 1;
}

.htd-contract-card.is-active {
  border-color: rgba(126, 173, 90, 0.55);
  box-shadow: 0 0 0 1px rgba(126, 173, 90, 0.25);
}

.htd-contract-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.htd-contract-label-inp {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
}

.htd-contract-dates-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
  margin-bottom: 0.65rem;
}

.htd-contract-date-field .ce-lbl {
  margin-bottom: 0.22rem;
}

.htd-contract-pdf-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.65rem;
}

.htd-contract-pdf-name {
  font-size: 0.82rem;
  min-width: 0;
  flex: 1 1 8rem;
}

.htd-contract-pdf-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.htd-contract-preview-sub {
  margin-left: 0.5rem;
}

.htd-contract-aside-details {
  border: 1px solid rgba(65, 50, 37, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  overflow: visible;
}

.htd-contract-aside-details.is-pdf[open] {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.htd-contract-aside-details + .htd-contract-aside-details {
  margin-top: 0.65rem;
}

.htd-contract-aside-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  font-size: 0.85rem;
  user-select: none;
}

.htd-contract-aside-summary::-webkit-details-marker {
  display: none;
}

.htd-contract-aside-summary::before {
  content: "▸";
  font-size: 0.7rem;
  color: var(--muted, #6b7280);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.htd-contract-aside-details[open] > .htd-contract-aside-summary::before {
  transform: rotate(90deg);
}

.htd-contract-aside-body {
  padding: 0 0.85rem 0.85rem;
}

.htd-contract-aside-body--pdf {
  padding: 0;
}

.htd-contract-pdf-empty,
.htd-contract-notes-hint {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 0 0.85rem 0.85rem;
}

.htd-contract-pdf-preview-body {
  padding: 0 !important;
  overflow: hidden;
  border-radius: 0 0 8px 8px;
  min-height: 20rem;
  background: rgba(65, 50, 37, 0.04);
  position: relative;
  z-index: 0;
  isolation: isolate;
}

.htd-contract-pdf-frame {
  display: block;
  width: 100%;
  min-height: 20rem;
  height: 52vh;
  max-height: 36rem;
  border: none;
  border-radius: 0 0 8px 8px;
  background: #f3f1ec;
  position: relative;
  z-index: 0;
  /* Prevent Chromium PDF plugin from stealing clicks on the left column */
  pointer-events: auto;
  max-width: 100%;
}

.rs-detail-page .rsd-menu-table-wrap {
  margin: 0;
}

/* 80% / 20% of row width between name and price; fixed column for actions */
.rs-detail-page .rsd-menu-table {
  display: block;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.rs-detail-page .rsd-menu-table thead,
.rs-detail-page .rsd-menu-table tbody {
  display: block;
}

.rs-detail-page .rsd-menu-table thead tr,
.rs-detail-page .rsd-menu-table tbody tr {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 2fr) minmax(5.5rem, 1.2fr) 2.75rem;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

.rs-detail-page .rsd-menu-cell-tl-foc {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 0.15rem;
}

.rs-detail-page .rsd-menu-tl-foc-lbl {
  margin: 0;
  font-size: 0.78rem;
  white-space: nowrap;
}

.rs-detail-page .rsd-menu-tl-foc-txt {
  color: var(--muted);
}

.rs-detail-page .rsd-menu-table thead tr th,
.rs-detail-page .rsd-menu-table tbody tr td {
  min-width: 0;
}

/* Header / actions column: same vertical padding as data cells so borders line up */
.rs-detail-page .rsd-menu-table thead th:not(.tg-guide-th-actions) {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.4rem;
}

.rs-detail-page .rsd-menu-table thead th.tg-guide-th-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.25rem;
}

.rs-detail-page .rsd-menu-table tbody td.td-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.35rem;
  box-sizing: border-box;
}

.rs-detail-page .rsd-menu-table tbody td.td-actions .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  line-height: 0;
  font-size: 1.25rem;
}

.rs-detail-page .rsd-menu-table tbody tr.rsd-menu-row--empty {
  grid-template-columns: minmax(0, 1fr);
}

.rs-detail-page .rsd-menu-table tbody tr.rsd-menu-row--empty .rsd-menu-empty {
  grid-column: 1 / -1;
}

.rs-detail-page .rsd-menu-table .rsd-menu-cell-name,
.rs-detail-page .rsd-menu-table .rsd-menu-cell-price {
  display: flex;
  align-items: center;
  vertical-align: middle;
  padding: 0.28rem 0.4rem;
}

.rs-detail-page .rsd-menu-table .rsd-menu-cell-name .ce-inp {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 0.82rem;
  padding: 0.32rem 0.45rem;
}

.rs-detail-page .rsd-menu-price-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.rs-detail-page .rsd-menu-price-wrap .rsd-menu-inp-price {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  font-size: 0.82rem;
  padding: 0.32rem 0.45rem;
}

.rs-detail-page .rsd-menu-currency {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--panel-muted);
}

.rs-detail-page .rsd-menu-table tr.rsd-menu-data-row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.rs-detail-page .rsd-menu-table tr.rsd-menu-data-row:hover {
  background: rgba(65, 50, 37, 0.06);
}

.rs-detail-page .rsd-menu-table tr.rsd-menu-row--active {
  background: rgba(126, 173, 90, 0.14);
}

.rs-detail-page .rsd-menu-empty {
  text-align: center;
  color: var(--panel-muted);
  padding: 0.75rem 0.5rem;
  font-size: 0.85rem;
}

.rs-rest-table .rs-contract-cell--expired {
  color: #c44;
  font-weight: 600;
}

.rs-rest-table .rs-contract-cell--soon {
  color: #b86b00;
  font-weight: 600;
}

.rs-detail-page .ce-aside .ce-field + .ce-field {
  margin-top: 0.8rem;
}

.client-edit-page .ce-pay-pill {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.client-edit-page .ce-pay-pill.is-partial {
  background: rgba(91, 196, 255, 0.2);
  color: #295b7a;
}

.client-edit-page .ce-pay-pill.is-pending {
  background: rgba(255, 214, 102, 0.28);
  color: #7a5a12;
}

.client-edit-page .ce-pay-pill.is-paid {
  background: rgba(126, 173, 90, 0.22);
  color: #2e5d21;
}

.client-edit-page .ce-side-notes {
  width: 100%;
  min-height: 92px;
  box-sizing: border-box;
  resize: vertical;
  border: 1px solid rgba(65, 50, 37, 0.14);
  border-radius: 6px;
  background: var(--panel-input-bg);
  color: var(--panel-text);
  padding: 0.45rem 0.55rem;
  font: inherit;
  font-size: 0.84rem;
}

.client-edit-page .ce-side-notes:focus {
  outline: none;
  border-color: rgba(126, 173, 90, 0.6);
}

@media (max-width: 960px) {
  .client-edit-page .ce-split {
    grid-template-columns: 1fr;
  }

  .client-edit-page .ce-field-grid {
    grid-template-columns: 1fr;
  }

  .client-edit-page .ce-field-grid.rsd-grid-thirds {
    grid-template-columns: 1fr;
  }

  .client-edit-page .ce-field-grid.rsd-grid-quarters {
    grid-template-columns: 1fr;
  }

  .client-edit-page .ce-field--half {
    grid-column: 1 / -1;
  }
}

.subhead-compact {
  font-size: 0.9rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.newreq-section-title {
  font-size: 1.1rem;
}

.newreq-grid-70-30 {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 0.9rem;
}

.newreq-block {
  background: #f0f0f0;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1rem 0.95rem;
}

.newreq-col-main.newreq-block,
.newreq-col-side.newreq-block {
  padding-bottom: 25px;
}

.newreq-page .newreq-block .subhead-compact {
  padding: 0 0 0.52rem;
  border-bottom: 1px solid var(--border);
}

.newreq-page .newreq-block .subhead-compact + * {
  padding-top: 0.62rem;
}

.newreq-inline-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.newreq-inline-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.newreq-row-trip {
  margin-top: 0.9rem;
}

.newreq-row-trip .newreq-inline-3 {
  margin-bottom: 0.75rem;
}

.newreq-row-trip .pick-det {
  margin: 0;
}

.newreq-row-trip .newreq-inline-2 {
  margin-bottom: 0.75rem;
}

.newreq-page .field-label {
  display: block;
  font-size: calc(0.78rem * 1.2);
  font-weight: 600;
  color: var(--panel-muted);
  margin-bottom: 0.28rem;
}

.newreq-page .inp-compact {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.86rem;
  padding: 0.42rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(65, 50, 37, 0.14);
  background: var(--panel-input-bg);
  color: var(--panel-text);
  transition: border-color 0.15s ease;
}

.newreq-page .inp-compact:focus {
  outline: none;
  border-color: rgba(126, 173, 90, 0.65);
}

.newreq-page .pick-det {
  background: var(--panel-input-bg);
  border: 1px solid rgba(65, 50, 37, 0.14);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
}

.newreq-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

@media (max-width: 980px) {
  .newreq-grid-70-30,
  .newreq-inline-2,
  .newreq-inline-3 {
    grid-template-columns: 1fr;
  }
}

.newreq-modal .newreq-grid-70-30 {
  gap: 0.65rem;
}

.newreq-modal .newreq-block {
  padding: 0.6rem 0.72rem 0.68rem;
}

.newreq-modal .newreq-col-main.newreq-block,
.newreq-modal .newreq-col-side.newreq-block {
  padding-bottom: 0.68rem;
}

.newreq-modal .newreq-row-trip {
  margin-top: 0.65rem;
}

.newreq-modal .newreq-row-trip .newreq-inline-3,
.newreq-modal .newreq-row-trip .newreq-inline-2 {
  margin-bottom: 0.55rem;
}

/* Sightseeing create/edit: gap between blocks; titles + fields share same horizontal inset */
.sightseeing-modal {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.sightseeing-modal.newreq-modal .newreq-block {
  padding: 0.78rem 1.2rem 0.95rem;
}

.sightseeing-modal .newreq-block .subhead-compact {
  padding: 0 0 0.52rem;
  border-bottom: 1px solid var(--border);
}

.sightseeing-modal .newreq-block .subhead-compact + .form-grid {
  padding-top: 0.62rem;
}

.itv-tour-title {
  font-size: 2rem;
}

.itv-tabs-wrap {
  padding: 0.1rem 0.2rem;
}

.reqd-panel--tourmenu {
  margin-top: 0.6rem;
}

.itv-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.itv-tab {
  appearance: none;
  font-family: var(--font-ui, var(--font));
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  padding: 0.42rem 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--panel-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.itv-tab:hover:not(.is-active) {
  color: var(--panel-text);
  background: rgba(65, 50, 37, 0.04);
}

.itv-tab.is-active {
  color: var(--panel-text);
  border-bottom-color: var(--accent);
  background: rgba(126, 173, 90, 0.08);
  font-weight: 700;
}

/* Itinerary editor: visual pipeline (dati → prenotazioni → pagamenti → documenti) */
.itv-tabs-wrap--phased {
  padding: 0.35rem 0.35rem 0.15rem;
}

.itv-tabs-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--panel-muted);
  padding: 0.2rem 0.15rem 0.5rem;
  margin-bottom: 0.1rem;
  border-bottom: 1px dashed rgba(65, 50, 37, 0.2);
}

.itv-tabs-ribbon__pre,
.itv-tabs-ribbon__out {
  font-weight: 600;
  color: var(--panel-text);
  opacity: 0.88;
}

.itv-tabs-ribbon__pipe {
  display: inline-block;
  width: 1px;
  height: 0.75rem;
  background: var(--border);
  align-self: center;
  opacity: 0.9;
}

.itv-tabs-ribbon__flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.45rem;
}

.itv-tabs-ribbon__step {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-weight: 500;
  color: var(--panel-text);
}

.itv-tabs-ribbon__lbl {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--panel-text);
  white-space: nowrap;
}

.itv-tabs-ribbon__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: rgba(90, 124, 64, 0.88);
}

.itv-tabs-ribbon__arr {
  color: var(--panel-muted);
  font-size: 0.7rem;
  opacity: 0.75;
  user-select: none;
}

.itv-tabs--phased {
  gap: 0.28rem 0.4rem;
  padding-top: 0.15rem;
}

.itv-tabs--phased .itv-tab--op-n1 {
  margin-left: 0.15rem;
  padding-left: 0.55rem;
  border-left: 1px solid var(--border);
  border-radius: 0;
}

.itv-tab--pre,
.itv-tab--op,
.itv-tab--out {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-height: 2.35rem;
  padding: 0.32rem 0.48rem 0.25rem;
  vertical-align: bottom;
}

.itv-tab--pre .itv-tab__ic--svg,
.itv-tab--out .itv-tab__ic--svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--panel-muted);
  opacity: 0.82;
}

.itv-tab--pre .itv-tab__ic--svg .itv-tab__svg,
.itv-tab--out .itv-tab__ic--svg .itv-tab__svg {
  width: 0.88rem;
  height: 0.88rem;
  display: block;
}

.itv-tab--pre.is-active .itv-tab__ic--svg,
.itv-tab--pre:hover:not(.is-active) .itv-tab__ic--svg,
.itv-tab--out.is-active .itv-tab__ic--svg,
.itv-tab--out:hover:not(.is-active) .itv-tab__ic--svg {
  opacity: 0.98;
  color: var(--accent, #5a7c40);
}

.itv-gt-recap__head {
  margin-bottom: 0.65rem;
}
.itv-gt-recap__title-main {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--panel-text);
}
.itv-gt-recap__note {
  margin: 0;
  line-height: 1.4;
}
.itv-gt-recap__grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.itv-gt-recap__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  border-top: 1px solid var(--panel-border);
}
.itv-gt-recap__row:first-child {
  border-top: none;
}
.itv-gt-recap__row--nonkh {
  background: var(--panel-surface-2);
}
.itv-gt-recap__seg {
  padding: 0.55rem 0.65rem;
  border-right: 1px solid var(--panel-border);
  font-size: 0.82rem;
  line-height: 1.35;
}
.itv-gt-recap__seg:last-child {
  border-right: none;
}
.itv-gt-recap__seg--left {
  display: grid;
  grid-template-columns: 1.85rem 5rem minmax(0, 1fr);
  gap: 0.3rem 0.28rem;
  align-items: start;
}
.itv-gt-recap__seg--muted {
  display: flex;
  align-items: center;
}
.itv-gt-recap__mono {
  font-variant-numeric: tabular-nums;
  color: var(--panel-muted);
  white-space: nowrap;
}
.itv-gt-recap__daytitle {
  font-weight: 600;
  color: var(--panel-text);
}
.itv-gt-recap__row--head {
  background: var(--panel-surface-2);
  font-weight: 600;
}
.itv-gt-recap__seg--head {
  padding: 0.4rem 0.65rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--panel-muted);
}
.itv-gt-recap__stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.itv-gt-recap__split {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.38;
}
.itv-gt-recap__cap {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--danger);
}
.itv-gt-recap__split-main {
  flex: 1 1 10rem;
  min-width: 0;
}
.itv-gt-recap__amt {
  flex-shrink: 0;
  margin-left: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--panel-text);
}
.itv-gt-recap__tickets-empty {
  color: var(--panel-muted);
}
.itv-gt-recap__formula {
  font-variant-numeric: tabular-nums;
}

.itv-gt-recap__row--totals {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  border: 1px solid #c9c6cd;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.itv-gt-recap__seg--totals,
.itv-gt-recap__seg--totals-left {
  padding: 0.5rem 0.65rem;
  border-right: 1px solid #c9c6cd;
}
.itv-gt-recap__seg--totals:last-child {
  border-right: none;
}
.itv-gt-recap__seg--totals-left {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--panel-text);
}
.itv-gt-recap__total-stack {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}
.itv-gt-recap__total-line {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-size: 0.82rem;
}
.itv-gt-recap__total-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--danger);
  text-transform: uppercase;
}
.itv-gt-recap__total-amt {
  margin-left: auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--panel-text);
}
.itv-gt-recap__total-line--fuel .itv-gt-recap__total-lbl,
.itv-gt-recap__total-line--fuel .itv-gt-recap__total-amt {
  color: #dc2626;
  font-weight: 700;
}
.itv-gt-recap__total-line--meals .itv-gt-recap__total-lbl,
.itv-gt-recap__total-line--meals .itv-gt-recap__total-amt {
  color: #b45309;
  font-weight: 700;
}
.itv-gt-recap__row--grand-total {
  margin-top: 0.35rem;
  background: rgba(65, 50, 37, 0.04);
}
.itv-gt-recap__total-line--grand {
  justify-content: flex-end;
}
.itv-gt-recap__total-amt--grand {
  font-size: 0.88rem;
}

.tiered-quote-msg--warn {
  color: var(--danger);
}

.tiered-steps-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
  margin-bottom: 0.45rem;
}
.tiered-steps-inline .field-label {
  margin: 0;
  flex: 0 0 auto;
}
.tiered-steps-inline .tiered-steps-inp {
  flex: 1 1 18rem;
  min-width: 12rem;
  max-width: 44rem;
}

.tiered-quote-table {
  margin: 0;
  width: 100%;
  min-width: 58rem;
}
.tiered-quote-table thead th {
  vertical-align: middle;
  font-size: 0.72rem;
  line-height: 1.15;
}
.tiered-quote-table .tiered-th-sub {
  display: block;
  font-weight: 400;
  color: var(--panel-muted, #6b7280);
  font-size: 0.68rem;
  margin-top: 0.12rem;
}
.tiered-quote-table thead th.tiered-col-veh .tiered-veh-th-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  width: 100%;
  flex-wrap: wrap;
}
.tiered-quote-table thead th.tiered-col-veh .tiered-veh-th-title {
  font-weight: 600;
}
.tiered-quote-table thead th.tiered-col-veh .tiered-veh-th-sub {
  display: inline;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--panel-muted, #6b7280);
  white-space: nowrap;
  margin: 0;
}
.tiered-pax-tl-suffix {
  font-weight: 600;
  font-size: 0.82em;
  color: #4b5563;
}
.tiered-pax-tl-suffix--th {
  font-size: 0.68em;
  font-weight: 600;
  color: var(--panel-muted, #6b7280);
}
.tiered-quote-table th.tiered-zone-pax-start,
.tiered-quote-table td.tiered-zone-pax-start {
  border-left: 2px solid #94a3b8;
}
.tiered-quote-table th.tiered-zone-pax-end,
.tiered-quote-table td.tiered-zone-pax-end {
  border-right: 2px solid #94a3b8;
}
.tiered-quote-table th.tiered-col-tot-pax,
.tiered-quote-table td.tiered-col-tot-pax {
  font-weight: 700;
}
.tiered-quote-table thead th.tiered-col-tot-grp,
.tiered-quote-table td.tiered-col-tot-grp {
  font-weight: 700;
}
.tiered-quote-table thead th.tiered-col-paying,
.tiered-quote-table tbody td.tiered-col-paying {
  text-align: left;
}
.tiered-quote-table thead th.tiered-col-op,
.tiered-quote-table tbody td.tiered-col-op {
  text-align: left;
  padding-left: 0.45rem;
}
.tiered-quote-table thead th.tiered-col-veh {
  text-align: left;
  min-width: 24rem;
}
.tiered-quote-table tbody td.tiered-col-veh {
  vertical-align: top;
  min-width: 24rem;
}
.tiered-quote-table tbody td.tiered-col-paying .tiered-col-val,
.tiered-quote-table tbody td.tiered-col-op .tiered-col-val {
  display: block;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.tiered-quote-table thead th.tiered-num {
  text-align: right;
}
.tiered-quote-table td.tiered-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tiered-quote-table tbody tr.tiered-row {
  transition: background-color 0.18s ease;
}
.tiered-quote-table tbody tr.tiered-row--starex {
  background: #eaf3ff;
}
.tiered-quote-table tbody tr.tiered-row--hiace {
  background: #e3f7f4;
}
.tiered-quote-table tbody tr.tiered-row--bus25 {
  background: #fdf2d9;
}
.tiered-quote-table tbody tr.tiered-row--bus35 {
  background: #fde4d3;
}
.tiered-quote-table tbody tr.tiered-row--bus45 {
  background: #e2f5e2;
}

.tiered-veh-control {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.12rem 0.3rem 0.12rem 0.32rem;
  border-radius: 0.45rem;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.55);
}
.tiered-veh-control .tiered-row-veh {
  border: 1px solid var(--panel-border);
  background: #ffffff;
}
.tiered-veh-control .tiered-row-count {
  width: 2.6rem;
  padding: 0.1rem 0.25rem;
  text-align: right;
  border: 1px solid var(--panel-border);
  background: #ffffff;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
}
.tiered-veh-control .tiered-row-count::-webkit-inner-spin-button,
.tiered-veh-control .tiered-row-count::-webkit-outer-spin-button {
  margin: 0;
  height: 1rem;
}
.tiered-veh-control .tiered-veh-x {
  color: var(--panel-muted, #6b7280);
  font-weight: 600;
  font-size: 0.78rem;
  margin-right: 0.05rem;
}
.tiered-veh-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1rem;
  flex: 0 0 auto;
}
.tiered-veh-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.tiered-veh--starex {
  border-color: #b9d6ff;
  background: #f3f8ff;
}
.tiered-veh--hiace {
  border-color: #b6e5dd;
  background: #f0fbf8;
}
.tiered-veh--bus25 {
  border-color: #efd49a;
  background: #fff8e6;
}
.tiered-veh--bus35 {
  border-color: #f1b994;
  background: #fff0e3;
}
.tiered-veh--bus45 {
  border-color: #b6e0b6;
  background: #f0faf0;
}

/* "Base band" row — mirrors the itinerary as-is and is read-only. */
.tiered-quote-table tbody tr.tiered-row--base {
  background: #fafaf7;
  box-shadow: inset 3px 0 0 0 #6b7280;
}
.tiered-quote-table tbody tr.tiered-row--base td {
  font-style: normal;
}
.tiered-veh-base {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.18rem 0.45rem;
  border-radius: 6px;
  background: #f3f4f6;
  border: 1px dashed #cbd0d6;
  color: #1f2937;
  font-size: 0.82rem;
  line-height: 1.1;
  max-width: 100%;
}
.tiered-veh-base-summary {
  font-weight: 600;
  white-space: nowrap;
}
.tiered-veh-base-badge {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #e5e7eb;
  color: #4b5563;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: help;
}

/* Vehicle cell: control + buttons on first row; badges full width below */
.tiered-veh-cell-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.65rem;
  row-gap: 0.35rem;
  min-width: 0;
}
.tiered-veh-cell-main {
  flex: 1 1 12rem;
  min-width: 10rem;
  order: 1;
}
.tiered-veh-cell-actions {
  flex: 0 0 auto;
  order: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.tiered-veh-cell-badges {
  flex: 1 1 100%;
  order: 3;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0;
  padding-left: 0;
  padding-top: 0.1rem;
}
.tiered-day-ov-strip,
.tiered-act-strip {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center;
  max-width: 100%;
}
.tiered-day-ov-pill {
  display: inline-block;
  padding: 0.06rem 0.35rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  white-space: nowrap;
  max-width: none;
}

.tiered-day-ov-wrap {
  display: none;
}
.tiered-day-ov-wrap.tiered-day-ov-wrap--open {
  display: table-row;
}
.tiered-day-ov-wrap > td {
  padding-top: 0;
  padding-bottom: 0.45rem;
  background: #fafbfc;
  border-top: 0;
}
.tiered-day-ov-inner {
  padding: 0.35rem 0.5rem 0.5rem 0.65rem;
  border-left: 3px solid #94a3b8;
  margin: 0 0 0.15rem 0.25rem;
}
.tiered-day-ov-lead {
  margin: 0 0 0.4rem 0;
}
.tiered-day-ov-lines {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.tiered-day-ov-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.tiered-day-ov-dayl {
  flex: 1 1 9rem;
  min-width: 7rem;
  font-size: 0.82rem;
  color: #374151;
}
.tiered-day-ov-veh {
  min-width: 7.5rem;
}
.tiered-day-ov-x {
  color: var(--panel-muted, #6b7280);
  font-weight: 600;
  font-size: 0.78rem;
}
.tiered-day-ov-cnt {
  width: 2.6rem;
  text-align: right;
}

.oa-pax-variants-block {
  margin-top: 0.25rem;
}
.oa-pax-variants-hint {
  margin: 0 0 0.5rem 0;
}
.oa-pax-variants-table-wrap {
  margin-bottom: 0.45rem;
}
.oa-pax-variants-table .oa-pvar-label {
  min-width: 9rem;
}
.oa-pax-variants-table .oa-pvar-min,
.oa-pax-variants-table .oa-pvar-max {
  width: 4.5rem;
}
.oa-pax-variants-table .oa-pvar-group {
  width: 5.5rem;
}

.tiered-act-pill {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.tiered-act-ov-wrap {
  display: none;
}
.tiered-act-ov-wrap.tiered-act-ov-wrap--open {
  display: table-row;
}
.tiered-act-ov-wrap > td {
  padding-top: 0;
  padding-bottom: 0.45rem;
  background: #f8fafc;
  border-top: 0;
}
.tiered-act-ov-inner {
  padding: 0.35rem 0.5rem 0.5rem 0.65rem;
  border-left: 3px solid #34d399;
  margin: 0 0 0.15rem 0.25rem;
}
.tiered-act-ov-lead {
  margin: 0 0 0.4rem 0;
}
.tiered-act-ov-section {
  margin-bottom: 0.45rem;
}
.tiered-act-ov-section-k {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7280;
  margin-bottom: 0.28rem;
}
.tiered-act-ov-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.22rem;
}
.tiered-act-ov-label,
.tiered-act-ov-dayl {
  flex: 1 1 9rem;
  min-width: 7rem;
  font-size: 0.82rem;
  color: #374151;
}
.tiered-act-band-sel,
.tiered-act-day-sel {
  min-width: 11rem;
}
.tiered-veh-base-acts {
  display: block;
  margin-top: 0.15rem;
}

.tiered-quote-table-wrap {
  overflow-x: auto;
  border-bottom: 1px solid #c9c6cd;
}
.tiered-quote-table-wrap .tiered-quote-table {
  margin-bottom: 0;
}
.tiered-quote-table-wrap .tiered-quote-table tbody tr:last-child td {
  border-bottom: 0;
}
.tiered-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  min-height: 2rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #c9c6cd;
}
.tiered-actions-row .tiered-done-btn {
  min-width: 5rem;
}
.tiered-support-notes {
  padding-top: 0.6rem;
}
.tiered-support-notes p + p {
  margin-top: 0.35rem;
}
.tiered-saved-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted, #6b6258);
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.tiered-saved-indicator::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}
.tiered-saved-indicator.tiered-saved--saving {
  color: #b07a17;
  background: rgba(218, 165, 32, 0.12);
}
.tiered-saved-indicator.tiered-saved--saving::before {
  background: #d99a1a;
  animation: tieredSavedPulse 1s ease-in-out infinite;
}
.tiered-saved-indicator.tiered-saved--saved {
  color: #1f7a3a;
  background: rgba(31, 122, 58, 0.1);
}
.tiered-saved-indicator.tiered-saved--saved::before {
  background: #2da259;
  opacity: 0.9;
}
.tiered-saved-indicator.tiered-saved--idle {
  opacity: 0.7;
}
@keyframes tieredSavedPulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.25); opacity: 1; }
}

.itv-gt-recap__nonkh-details {
  border-top: 1px solid var(--panel-border);
}
.itv-gt-recap__nonkh-summary {
  cursor: pointer;
  user-select: none;
  padding: 0.48rem 0.65rem;
  background: var(--panel-surface-2);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--panel-text);
  list-style: none;
}
.itv-gt-recap__nonkh-summary::-webkit-details-marker {
  display: none;
}
.itv-gt-recap__nonkh-summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.38rem;
  font-size: 0.62rem;
  opacity: 0.55;
  transition: transform 0.15s ease;
  vertical-align: 0.05em;
}
.itv-gt-recap__nonkh-details[open] > .itv-gt-recap__nonkh-summary::before {
  transform: rotate(90deg);
}
.itv-gt-recap__nonkh-summary:hover {
  background: rgba(65, 50, 37, 0.05);
}

@media (max-width: 1100px) {
  .itv-gt-recap__row {
    grid-template-columns: 1fr;
  }
  .itv-gt-recap__seg {
    border-right: none;
    border-bottom: 1px solid var(--panel-border);
  }
  .itv-gt-recap__seg:last-child {
    border-bottom: none;
  }
  .itv-gt-recap__row--totals {
    grid-template-columns: 1fr;
  }
  .itv-gt-recap__seg--totals,
  .itv-gt-recap__seg--totals-left {
    border-right: none;
    border-bottom: 1px solid #c9c6cd;
  }
  .itv-gt-recap__seg--totals:last-child {
    border-bottom: none;
  }
}

.itv-tab--op .itv-tab__n {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  color: var(--panel-muted);
  border: 1px solid rgba(65, 50, 37, 0.2);
  background: rgba(255, 255, 255, 0.55);
}

.itv-tab--op.is-active .itv-tab__n {
  color: #fff;
  border-color: rgba(90, 124, 64, 0.95);
  background: var(--accent, #5a7c40);
}

.itv-tab--op .itv-tab__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.2;
  gap: 0;
  min-width: 0;
}

.itv-tab--op .itv-tab__main,
.itv-tab--pre .itv-tab__main,
.itv-tab--out .itv-tab__main {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}

.postconfirm-panel .panel-header--itv-ops {
  align-items: flex-start;
}

.postconfirm-panel .pc-core-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.postconfirm-panel .pc-core-panel-head .panel-header-text {
  flex: 1 1 auto;
  min-width: min(12rem, 100%);
}

.postconfirm-panel .pc-core-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}

.postconfirm-panel .panel-header-text {
  min-width: 0;
}

.pc-res-status-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.6rem;
  vertical-align: 0.16em;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  line-height: 1;
}
.pc-res-status-badge::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  margin-right: 0.38rem;
  background: currentColor;
  opacity: 0.85;
}
.pc-res-status-badge--pending {
  color: #b07a17;
  background: rgba(218, 165, 32, 0.12);
  border: 1px solid rgba(176, 122, 23, 0.28);
}

.pc-res-not-included-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.5rem;
  vertical-align: 0.12em;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  line-height: 1;
  color: #b42318;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.28);
}

.pc-res-not-included-note {
  margin: 0.35rem 0 0.15rem;
  padding: 0.55rem 0.65rem;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.02);
}

/* Reservation tables: consistent alignment across hotel/guide/transport. */
.pc-res-table {
  table-layout: fixed;
  width: 100%;
}

.pc-res-table td,
.pc-res-table th {
  vertical-align: middle;
}

.pc-res-table .pc-col-name {
  width: 14%;
}
.pc-res-table .pc-col-start,
.pc-res-table .pc-col-end {
  width: 7.5%;
}
.pc-res-table .pc-col-rooming {
  width: 28%;
}
.pc-res-table .pc-col-total {
  width: 6.5%;
}
.pc-res-table .pc-col-pay {
  width: 9%;
}
.pc-res-table .pc-col-msg {
  width: 16%;
}
.pc-res-table .pc-col-status {
  width: 9%;
}
.pc-res-table .pc-col-actions {
  width: 4%;
}

.pc-res-table th:nth-child(3),
.pc-res-table th:nth-child(4),
.pc-res-table th:nth-child(5),
.pc-res-table td:nth-child(3),
.pc-res-table td:nth-child(4),
.pc-res-table td:nth-child(5) {
  padding-left: 0.28rem;
  padding-right: 0.28rem;
  white-space: nowrap;
}

.pc-res-table td:nth-child(2) {
  word-break: break-word;
}

.pc-res-table strong {
  font-weight: 700;
  line-height: 1.25;
}

.pc-res-table td:first-child strong {
  word-break: break-word;
}

.pc-res-table .pc-rooming-sub {
  font-size: 0.74rem;
  line-height: 1.2;
  margin-top: 0.1rem;
  color: var(--panel-muted);
  font-weight: 600;
}

.pc-res-table .pc-res-empty {
  display: inline-block;
  width: 100%;
  color: var(--panel-muted);
  font-weight: 600;
}

.pc-res-table [data-pc-book-pay-status],
.pc-res-table [data-pc-book-status] {
  width: 100%;
  min-width: 5.6rem;
}

.pc-res-table [data-pc-book-msg] {
  width: 100%;
  min-width: 12rem;
}

.pc-client-pay-wrap {
  overflow-x: auto;
}

.pc-client-pay-table {
  table-layout: auto;
  min-width: 58rem;
}

.pc-client-pay-table th,
.pc-client-pay-table td {
  vertical-align: middle;
  font-size: 0.8rem;
}

.pc-pay-amt-inp,
.pc-pay-fee-inp {
  width: 5.2rem;
  min-width: 0;
}

.pc-pay-date-inp {
  width: 7.4rem;
  min-width: 0;
}

.pc-pay-ccy-sel {
  width: 4.2rem;
  min-width: 0;
}

.pc-pay-fee-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.pc-pay-fee-ccy {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.85;
}

.pc-pay-account-cell .inp-sm {
  width: 100%;
  min-width: 7rem;
}

.pc-pay-account-hint {
  margin-top: 0.12rem;
  line-height: 1.2;
  max-width: 14rem;
}

.pc-pay-intro {
  margin: 0 0 0.65rem;
  line-height: 1.35;
}

.pa-settings-table .inp-sm {
  width: 100%;
  min-width: 0;
}

/* Reservation tab visual grouping (reversible via resvclassic=1/localStorage). */
.pc-res-groups--v1 {
  display: grid;
  gap: 0.8rem;
}

.pc-res-groups--v1 .pc-res-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface, #fff) 92%, #f2f6fb 8%);
  padding: 0.6rem 0.7rem 0.7rem;
}

.pc-res-groups--v1 .pc-res-group-title {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.pc-res-groups--v1 .pc-res-group .table-wrap {
  margin: 0;
}

.pc-res-groups--v1 .pc-res-group--collapsible {
  padding: 0;
  overflow: hidden;
}

.pc-res-groups--v1 .pc-res-group-head {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--surface, #fff) 94%, #eef4fb 6%);
  border-bottom: 1px solid rgba(110, 130, 160, 0.18);
}

.pc-res-groups--v1 .pc-res-group-head::-webkit-details-marker {
  display: none;
}

.pc-res-groups--v1 .pc-res-group-chevron {
  color: var(--panel-muted);
  font-size: 0.8rem;
  transition: transform 0.15s ease;
}

.pc-res-groups--v1 .pc-res-group--collapsible:not([open]) .pc-res-group-chevron {
  transform: rotate(-90deg);
}

.pc-res-groups--v1 .pc-res-group-body {
  padding: 0.62rem 0.7rem 0.7rem;
}

.pc-res-group-actions {
  margin: 0.5rem 0 0;
}

.pc-rooming-toggle {
  margin: 0 0 0.45rem;
}

.pc-rooming-block table.pc-rooming-table .pc-room-label-cell {
  min-width: 10rem;
}

.pc-rooming-table .pc-room-num,
.pc-participants-table .pc-part-num {
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--panel-muted);
  text-align: right;
  vertical-align: middle;
  padding: 0.3rem 0.35rem 0.3rem 0.12rem;
  box-sizing: border-box;
}

.pc-participants-table .pc-part-col-num {
  width: 2.35rem;
}
.pc-participants-table .pc-part-col-title {
  width: 6%;
  max-width: 5.1rem;
  min-width: 3.5rem;
}
.pc-participants-table .pc-part-col-fn {
  width: 14%;
  min-width: 7rem;
}
.pc-participants-table .pc-part-col-ln {
  width: 14%;
  min-width: 7rem;
}
.pc-participants-table .pc-part-col-tl {
  width: 3.35rem;
}

.pc-core-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface, #fff) 94%, #eef4fb 6%);
  margin: 0 0 0.6rem;
  overflow: hidden;
}

.pc-core-group-head {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(110, 130, 160, 0.18);
}

.pc-core-group-head::-webkit-details-marker {
  display: none;
}

.pc-core-group-title {
  font-size: 0.82rem;
  font-weight: 700;
}

.pc-core-group-chevron {
  color: var(--panel-muted);
  font-size: 0.8rem;
  transition: transform 0.15s ease;
}

.pc-core-group:not([open]) .pc-core-group-chevron {
  transform: rotate(-90deg);
}

.pc-core-group-body {
  padding: 0.62rem 0.7rem 0.7rem;
}

.pc-participants-table-wrap {
  margin-top: 0.15rem;
}

.postconfirm-panel .pc-participants-table .inp-sm,
.postconfirm-panel .pc-participants-table select.inp-sm {
  min-width: 0;
  width: 100%;
}

.postconfirm-panel .pc-participants-table td:nth-child(4) .inp-sm,
.postconfirm-panel .pc-participants-table td:nth-child(5) .inp-sm {
  min-width: 0;
}

.postconfirm-panel .pc-participants-table {
  table-layout: fixed;
}

.postconfirm-panel .pc-participants-table tr.pc-part-row--title-m > td {
  background: color-mix(in srgb, #93c5fd 18%, var(--surface, #fff) 82%);
}

.postconfirm-panel .pc-participants-table tr.pc-part-row--title-f > td {
  background: color-mix(in srgb, #fbcfe8 22%, var(--surface, #fff) 78%);
}

.postconfirm-panel .pc-part-row--tl td {
  font-weight: 700;
  background: color-mix(in srgb, var(--primary, #2563eb) 8%, var(--surface, #fff) 92%);
}

.postconfirm-panel .pc-part-row--invalid td {
  background: #fef2f2;
}

.postconfirm-panel .pc-part-row--invalid.pc-part-row--tl td {
  background: color-mix(in srgb, #f87171 22%, #fef2f2 78%);
}

.pc-rooming-table-wrap {
  margin-top: 0.2rem;
}

.postconfirm-panel .pc-rooming-table .pc-room-slot-sel {
  min-width: 12rem;
  width: 100%;
  max-width: 20rem;
}

.postconfirm-panel .pc-rooming-table .pc-room-slot-locked {
  display: block;
  font-size: 0.88rem;
  padding: 0.15rem 0;
}

.pc-room-row--tl-single {
  background: color-mix(in srgb, var(--primary, #2563eb) 6%, transparent);
}

.itv-sup-unit-cell {
  vertical-align: middle;
}

.itv-sup-unit-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  width: 100%;
  max-width: 12rem;
  margin-left: auto;
}

.itv-sup-tour-table .itv-sup-unit-wrap .inp-sm {
  text-align: right;
  flex: 1 1 auto;
  min-width: 0;
}

.itv-sup-unit-ccy {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.pc-res-toolbar-top {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.itinerary-editor-panels {
  margin-top: 0.5rem;
}

section.reqd-panel--tourmenu + .itinerary-editor-panels {
  margin-top: 1.15rem;
}

.itv-bottom-dual-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: start;
}

/* Quote options (per-variant KH / non-KH costing overrides) */
.itv-quote-variant-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  padding: 0.5rem 0.75rem 0.55rem 6px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--sidebarBg, #fff) 88%, #e5e7eb);
}
.itv-quote-variant-bar__label {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.65rem;
  opacity: 0.85;
}
.itv-quote-variant-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.btn.itv-quote-variant-chip.is-active {
  background: var(--primary, #2563eb);
  color: #fff;
  border-color: transparent;
}
.itv-quote-variant-chip.itv-quote-variant-chip--locked {
  opacity: 0.45;
  cursor: not-allowed;
}
.itv-quote-variant-bar__locked {
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  opacity: 0.75;
}

/* REVERSIBLE: confirmed quote visual highlight + post-confirm unlock note */
.itv-confirmed-quote-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: 0.4rem;
  padding: 0.18rem 0.5rem;
  border: 2px solid #22c55e;
  border-radius: 999px;
  background: #dcfce7;
  color: #065f46;
  font-size: 0.78rem;
  line-height: 1.2;
  box-shadow: 0 0 0 2px color-mix(in srgb, #22c55e 22%, transparent);
}
.itv-confirmed-quote-badge strong {
  color: #047857;
}
.itv-confirmed-unlock-note {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
  font-size: 0.74rem;
}

/* Quote options inline in Quotation (and similar) panel header */
/* Quote options modal (manage names + delete) */
.itv-qvm {
  margin: 0;
}
.itv-qvm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.itv-qvm-row {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr) 2.25rem;
  align-items: center;
  column-gap: 0.45rem;
  row-gap: 0.25rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--sidebarBg, #fff);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.itv-qvm-row__tag {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.itv-qvm-row__dash {
  color: var(--border);
  font-weight: 400;
  user-select: none;
  opacity: 0.85;
}
.itv-qvm-row__inp {
  width: 100%;
  min-width: 0;
}
.itv-qvm-row__rm {
  flex-shrink: 0;
  color: #b91c1c;
  border-radius: 6px;
}
.itv-qvm-row__rm:hover {
  background: rgba(185, 28, 28, 0.08);
  color: #991b1b;
}
.itv-qvm-row__rm-spacer {
  display: inline-block;
  width: 2.25rem;
  height: 2.25rem;
}

/* Suppliers tab: country flag(s) + supplier name (read-only identity) */
.itv-sup-identity {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}
.itv-sup-identity__flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  padding-top: 0.12rem;
}
.itv-sup-identity__flag {
  display: inline-block;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}
.itv-sup-identity__flag--empty {
  font-size: 0.75rem;
  box-shadow: none;
  opacity: 0.45;
}
.itv-sup-identity__meta {
  min-width: 0;
}
.itv-sup-identity__country {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  line-height: 1.25;
}
.itv-sup-identity__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #0f172a);
  line-height: 1.3;
  margin-top: 0.15rem;
}
.itv-sup-identity--agency {
  align-items: center;
}
.itv-sup-identity__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  font-size: 1.1rem;
  background: color-mix(in srgb, var(--primary, #2563eb) 12%, transparent);
  flex-shrink: 0;
}
.itv-sup-tour-table td:first-child {
  min-width: 12rem;
}
.itv-sup-price-inp {
  max-width: 8rem;
  text-align: right;
}

.itv-sup-sgadj-subgroup {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.itv-sup-sgadj-label {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.itv-sup-sgadj-amount {
  text-align: right;
  width: 100%;
  max-width: none;
}

.itv-sup-sgadj-table {
  table-layout: fixed;
  width: 100%;
}

.itv-sup-sgadj-table col.itv-sgadj-col-type {
  width: 12rem;
}

.itv-sup-sgadj-table col.itv-sgadj-col-net {
  width: 10rem;
}

.itv-sup-sgadj-table col.itv-sgadj-col-actions {
  width: 7rem;
}

.itv-sup-sgadj-amount-cell {
  text-align: right;
}

.itv-sup-sgadj-amount-cell .itv-sup-unit-wrap {
  width: 100%;
  margin-left: auto;
  max-width: 10rem;
}

.itv-sup-sgadj-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  white-space: nowrap;
}

.itv-sup-sgadj-actions .btn {
  margin-left: auto;
}

.itv-sg-preview-panel .panel-body-pad {
  padding-top: 0.5rem;
}

.itv-sg-preview-table {
  table-layout: fixed;
}

.itv-sg-preview-table th:nth-child(1),
.itv-sg-preview-table td:nth-child(1) {
  width: 22rem;
  white-space: nowrap;
}

.itv-sg-preview-table th:nth-child(2),
.itv-sg-preview-table td:nth-child(2) {
  width: 4.5rem;
  text-align: right;
}

.itv-sg-preview-table td:nth-child(3) {
  white-space: normal;
  font-size: 0.85rem;
  line-height: 1.25;
}

.itv-sg-preview-pax {
  font-weight: 700;
}

.itv-sg-preview-note {
  margin-top: 0.15rem;
  color: #6b7280;
  font-size: 0.78rem;
}

.backup-restore-modal {
  max-width: none;
}

.modal-body:has(.backup-restore-modal) {
  padding: 0.85rem 1rem 1rem;
}

.backup-restore-intro {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--border, #e5e7eb);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted, #6b7280);
}

.backup-restore-sections {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.backup-restore-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (max-width: 720px) {
  .backup-restore-duo {
    grid-template-columns: 1fr;
  }
}

.backup-restore-section {
  margin-bottom: 0;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  background: var(--modal-bg, #fff);
  overflow: hidden;
}

.backup-restore-section__head {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface-2, #f8fafc);
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.backup-restore-section__badge {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.backup-restore-section--recover .backup-restore-section__badge {
  background: #fef3c7;
  color: #92400e;
}

.backup-restore-section--cloud .backup-restore-section__badge {
  background: #dbeafe;
  color: #1d4ed8;
}

.backup-restore-section--export .backup-restore-section__badge {
  background: #dcfce7;
  color: #166534;
}

.backup-restore-section--import .backup-restore-section__badge {
  background: #ede9fe;
  color: #5b21b6;
}

.backup-restore-section--auto .backup-restore-section__badge {
  background: #ccfbf1;
  color: #0f766e;
}

.backup-restore-section__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text, #1f2937);
}

.backup-restore-section__subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: var(--muted, #6b7280);
  line-height: 1.35;
}

.backup-restore-section__body {
  padding: 0.65rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.backup-restore-help {
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--border, #e5e7eb);
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--muted, #6b7280);
}

.backup-restore-help p {
  margin: 0 0 0.45rem;
}

.backup-restore-help p:last-child {
  margin-bottom: 0;
}

.backup-restore-help code {
  font-size: 0.92em;
}

.backup-restore-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted, #6b7280);
}

.backup-restore-paste {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  min-height: 5.5rem;
  resize: vertical;
}

.backup-restore-fields {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.backup-restore-inline-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
}

.backup-restore-inline-field__label {
  flex: 0 0 5.5rem;
  font-size: 0.72rem;
  color: var(--muted, #6b7280);
  line-height: 1.2;
  white-space: nowrap;
}

.backup-restore-inline-field input {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.72rem;
}

.backup-restore-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.backup-restore-actions--cloud-row {
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.3rem;
  align-items: stretch;
}

.backup-restore-actions--cloud-row .btn {
  flex: 1 1 0;
  min-width: 0;
  font-size: 0.924rem;
  padding: 0.14rem 0.28rem;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.backup-restore-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.35;
  cursor: pointer;
}

.backup-restore-check input[type="checkbox"] {
  margin-top: 0.18rem;
  flex-shrink: 0;
}

.backup-restore-check--bordered {
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border, #e5e7eb);
}

.backup-restore-interval {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.backup-restore-interval select {
  min-width: 7rem;
}

.backup-restore-auto-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
}

.backup-restore-auto-toolbar__interval {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  font-size: 0.82rem;
  white-space: nowrap;
}

.backup-restore-auto-toolbar__interval select {
  min-width: 5.5rem;
  font-size: 0.72rem;
  height: 2rem;
  padding: 0 0.45rem;
  box-sizing: border-box;
}

.backup-restore-auto-toolbar .btn {
  flex: 1 1 0;
  min-width: 0;
  height: 2rem;
  font-size: 0.924rem;
  padding: 0 0.28rem;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.backup-restore-status {
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  background: var(--surface-2, #f8fafc);
  border: 1px dashed var(--border, #d1d5db);
  font-size: 0.78rem;
  line-height: 1.4;
}

.backup-restore-status:empty {
  display: none;
}

.backup-restore-status__line + .backup-restore-status__line {
  margin-top: 0.25rem;
}

.backup-restore-status__val--ok {
  color: #047857;
}

.backup-restore-status__val--fail {
  color: #b91c1c;
}

.backup-restore-status__val--neutral {
  color: #6b7280;
}

/* Legacy heading class — kept for any older markup */
.backup-restore-h {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d9e2ec;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 600;
}

.itv-adv-cost-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.itv-adv-cost-label {
  font-size: 0.8rem;
  margin: 0;
}

.itv-adv-cost-note {
  font-size: 0.75rem;
}

.itv-adv-cost-select {
  font-size: 0.82rem;
  min-height: 1.9rem;
}

@media (max-width: 1200px) {
  .itv-bottom-dual-panels {
    grid-template-columns: 1fr;
  }
}

.itv-cost-section--nk-rest .itv-rst-nk-head {
  margin-bottom: 0.15rem;
}
.itv-cost-section--nk-rest .itv-rst-nk-block .inp-compact {
  width: 100%;
}

/* Itinerary editor: 3-column day-by-day prototype */
.itv-day-by-day-panel .itv-day-split {
  --itv-day-inset: 6px;
  display: grid;
  grid-template-columns: minmax(11rem, 22%) minmax(0, 1fr) minmax(11rem, 26%);
  gap: 0.75rem 1rem;
  align-items: stretch;
  padding: 0 0.75rem 0.85rem var(--itv-day-inset);
  min-height: 14rem;
}

.itv-day-list-col {
  min-width: 0;
  border-right: 1px solid var(--border);
  padding-top: var(--itv-day-inset);
  padding-right: var(--itv-day-inset);
}

.itv-day-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: none;
  overflow: visible;
  padding-right: 0;
  padding-top: 0;
}

.itv-day-pick-row {
  display: flex;
  align-items: stretch;
  gap: 0.08rem;
}

.itv-day-pick {
  flex: 1;
  min-width: 0;
  text-align: left;
  appearance: none;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.35;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel-bg, #fff);
  color: var(--panel-text);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.itv-day-pick:hover {
  background: rgba(65, 50, 37, 0.05);
}

.itv-day-pick.is-active {
  border-color: var(--accent);
  background: rgba(126, 173, 90, 0.12);
  font-weight: 600;
}

.itv-day-pick__line {
  display: block;
}

.itv-day-pick__line--row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.25rem;
}

.itv-day-pick__daynum {
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--accent, #5a7d3e);
  min-width: 1.45rem;
}

.itv-day-pick__place-group {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 8rem;
  gap: 0.2rem;
}

.itv-day-pick__cal {
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 600;
  opacity: 0.88;
  white-space: nowrap;
}

.itv-day-pick__cal--empty {
  font-weight: 500;
  opacity: 0.4;
}

.itv-day-pick__k {
  color: var(--accent, #5a7d3e);
  font-weight: 600;
  font-size: 0.78rem;
}

.itv-day-pick__sep {
  opacity: 0.45;
  font-weight: 400;
}

.itv-day-pick__place {
  font-weight: 500;
}

.itv-day-pick__title {
  display: block;
  margin-top: 0.15rem;
  font-weight: 500;
  opacity: 0.92;
}

.itv-day-kh-badge {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.06rem 0.35rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.itv-day-kh-badge.is-on {
  background: rgba(16, 185, 129, 0.16);
  color: #0f766e;
}

.itv-day-kh-badge.is-off {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

/* Label-like selects inside day row (must not be nested in <button>) */
.itv-day-pick__place-group .itv-day-label-select--country {
  flex: 0 1 auto;
  max-width: min(52%, 12rem);
}

.itv-day-pick__place-group .itv-day-label-select--city {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}

.itv-day-pick__route {
  flex: 0 1 auto;
  font-size: 0.72rem;
  color: var(--muted, #6b6560);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.itv-day-label-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  max-width: 46%;
  min-width: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
  text-overflow: ellipsis;
}

.itv-day-label-select::-ms-expand {
  display: none;
}

.itv-day-label-select:focus {
  outline: none;
}

.itv-day-label-select:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.itv-day-label-select--country {
  color: var(--accent, #5a7d3e);
  font-weight: 600;
  font-size: 0.78rem;
}

.itv-day-label-select--city {
  font-weight: 500;
  font-size: 0.82rem;
}

.itv-day-by-day-panel .itv-day-rm.btn.btn-sm.btn-compact {
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.32rem;
  min-width: 1.32rem;
  height: 1.32rem;
  padding: 0;
  margin: 0;
  font-size: 0.72rem;
  line-height: 1;
  text-align: center;
  box-sizing: border-box;
}

.itv-day-by-day-panel .itv-hotel-row .btn-danger[data-itv-h-rm] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.32rem;
  min-width: 1.32rem;
  height: 1.32rem;
  padding: 0;
  font-size: 0.72rem;
  line-height: 1;
  text-align: center;
  box-sizing: border-box;
}

.itv-dt-search-row {
  padding-top: 0;
  margin-bottom: 0.35rem;
}

.itv-dt-manage-bar {
  margin: 0 0 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(65, 50, 37, 0.05);
  border: 1px solid rgba(65, 50, 37, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.itv-dt-manage-bar--modal {
  margin: 0 0 0.75rem;
}

.itv-dt-manage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
}

.itv-dt-manage-linked {
  font-size: 0.82rem;
}

.itv-dt-manage-msg {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted, #6b6560);
}

.itv-dt-manage-msg--warn {
  color: #9a3412;
}

.itv-dt-manage-msg--alert {
  color: #b91c1c;
  font-weight: 700;
}

.itv-dt-status {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.itv-dt-status--inline {
  margin-left: 0.35rem;
  vertical-align: middle;
}

.itv-dt-status--draft {
  background: #fef3c7;
  color: #92400e;
}

.itv-dt-status--incomplete {
  background: #ffedd5;
  color: #9a3412;
}

.itv-dt-status--ok {
  background: rgba(126, 173, 90, 0.18);
  color: #3f6212;
}

.itv-dt-warn-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.78rem;
  color: #9a3412;
}

.itv-dt-warn-list li + li {
  margin-top: 0.12rem;
}

.itv-dt-manage-bar--compact {
  gap: 0;
  padding: 0.32rem 0.45rem;
  margin-top: 0.35rem;
}

.itv-dt-manage-bar--compact .itv-dt-manage-row + .itv-dt-manage-row {
  margin-top: 0.2rem;
}

.itv-dt-manage-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.65rem;
}

.itv-dt-manage-row__text {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.78rem;
  line-height: 1.25;
}

.itv-dt-manage-row__text .itv-dt-manage-msg {
  font-size: inherit;
}

.itv-dt-manage-row__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
  margin-left: auto;
}

.itv-dt-manage-row--warn-icons .itv-dt-manage-row__text {
  gap: 0.25rem;
}

.itv-dt-icon-btn {
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.itv-dt-icon-btn--primary {
  color: var(--accent, #7c5c3e);
  background: rgba(124, 92, 62, 0.1);
}

.itv-dt-warn-ico {
  width: 1.55rem;
  height: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c2410c;
  opacity: 0.92;
  cursor: help;
}

.itv-dt-search {
  position: relative;
  width: 100%;
}

.itv-dt-search-input {
  width: 100%;
  font-size: 0.8em;
  min-height: 1.9rem;
  height: 1.9rem;
}

.itv-day-loc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.45rem;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  background: rgba(65, 50, 37, 0.04);
}

.itv-day-loc-field {
  flex: 1 1 8rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.itv-day-loc-k {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted, #6b6560);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.itv-day-loc-sel {
  width: 100%;
  min-width: 0;
}

.itv-day-loc-arrow {
  flex: 0 0 auto;
  align-self: center;
  color: var(--muted, #6b6560);
  font-size: 0.95rem;
  padding: 0 0.1rem 0.15rem;
}

.itv-main-top-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
}

.itv-main-title-col {
  flex: 1 1 10rem;
  min-width: 0;
  margin-top: 0;
}

.itv-main-title-col .itv-dt-search-row {
  margin: 0;
}

.itv-main-top-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.itv-main-menu-col {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.itv-main-menu-col .form-row {
  margin: 0;
}

.itv-dt-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  z-index: 20;
  max-height: 14rem;
  overflow: auto;
  background: var(--panel-bg, #fff);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.itv-dt-suggest-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.55rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  color: inherit;
}

.itv-dt-suggest-item:last-child {
  border-bottom: none;
}

.itv-dt-suggest-item:hover {
  background: rgba(65, 50, 37, 0.06);
}

.itv-dt-suggest-item-title {
  font-weight: 600;
}

.itv-dt-suggest-item-sub {
  line-height: 1.25;
}

.itv-dt-suggest-empty {
  padding: 0.5rem 0.55rem;
}

.itv-day-main-col {
  min-width: 0;
  padding: var(--itv-day-inset, 6px) 0.25rem 0;
}

.itv-day-main-inner textarea.inp-compact {
  min-height: 8rem;
  resize: vertical;
}

.itv-desc-toolbar {
  display: flex;
  gap: 0.35rem;
  margin: 0;
  align-items: center;
  flex-wrap: wrap;
}

.itv-main-menu-col .itv-desc-toolbar .btn {
  height: 1.9rem;
  min-height: 1.9rem;
  line-height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.itv-time-select {
  width: 6.25rem;
  min-width: 6.25rem;
  height: 1.9rem;
  min-height: 1.9rem;
  font-size: 0.74rem;
}

.itv-time-select.itv-pickup-time {
  width: 4.7rem;
  min-width: 4.7rem;
}

.itv-meals-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.16rem 0.34rem;
  border-radius: 4px;
  color: rgba(45, 38, 32, 0.55);
  background: rgba(65, 50, 37, 0.09);
  border: 1px solid rgba(45, 38, 32, 0.18);
}

.itv-meals-badge__m {
  opacity: 0.5;
  min-width: 0.58rem;
  text-align: center;
  color: rgba(45, 38, 32, 0.42);
  font-weight: 600;
}

.itv-meals-badge__m.is-on {
  opacity: 1;
  color: #3d5c28;
  font-weight: 700;
}

.itv-meals-badge__sep {
  opacity: 0.38;
  margin: 0 0.06rem;
  font-weight: 500;
  color: rgba(45, 38, 32, 0.35);
}

.itv-meals-exc {
  font-size: 0.62rem;
  gap: 0.12rem;
  flex-shrink: 0;
  color: var(--muted);
}

.itv-meals-exc__lbl {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Rich editor: swatch pickers (empty at rest; colored squares when open) */
.rte-swatch-picker {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  vertical-align: middle;
}

.rte-swatch-trigger {
  width: 1.9rem;
  min-width: 1.9rem;
  height: 1.9rem;
  min-height: 1.9rem;
  padding: 0;
  margin: 0;
  border-radius: 6px;
  cursor: pointer;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.72rem 0.72rem;
}

.rte-swatch-picker--color .rte-swatch-trigger {
  border: 1px solid #1f2937;
  background-image: linear-gradient(#1f2937, #1f2937);
}

.rte-swatch-picker--highlight .rte-swatch-trigger {
  border: 1px solid #1f2937;
  background-image: linear-gradient(#fff59d, #fff59d);
}

.rte-swatch-picker.is-open .rte-swatch-trigger,
.rte-swatch-trigger:hover,
.rte-swatch-trigger:focus-visible {
  box-shadow: 0 0 0 2px rgba(65, 50, 37, 0.1);
}

.rte-swatch-menu {
  position: absolute;
  top: calc(100% + 0.12rem);
  left: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.rte-swatch-menu[hidden] {
  display: none !important;
}

.rte-swatch-opt {
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
  min-height: 1.35rem;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.rte-swatch-opt:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.itv-desc-toolbar .rte-swatch-picker,
.rte-toolbar .rte-swatch-picker {
  flex-shrink: 0;
}

.itv-main-desc-row {
  margin-top: 0.25rem;
  margin-bottom: 0.35rem;
}

.itv-desc-editor {
  min-height: 8rem;
  resize: vertical;
  overflow: auto;
  font-size: 0.8em;
  line-height: 1.35;
  padding: 0.42rem 0.55rem;
  background: #fff;
  border: 1px solid rgba(65, 50, 37, 0.18);
  border-radius: 6px;
}

.itv-main-gd-block {
  margin-top: 0.55rem;
  border-top: 1px solid var(--border);
  padding-top: 0.55rem;
}

/* Itinerary day description: default ≈ 15 text lines; scroll if longer; user can resize (come Day tour) */
#itv-d-desc-rich {
  height: calc(1.35em * 15 + 1.1rem);
  min-height: calc(1.35em * 15 + 1.1rem);
  overflow-y: auto;
  resize: vertical;
}

@media (max-width: 980px) {
  .itv-main-top-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }

  .itv-main-top-actions {
    justify-content: flex-start;
  }

  .itv-main-menu-col {
    justify-content: flex-start;
  }
}

.itv-day-main-actions {
  margin-top: 0.65rem;
}

.itv-cost-detail-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Cost detail modal: compact read-only view */
.itv-cost-detail-modal {
  line-height: 1.22;
  font-size: 0.82rem;
}

.itv-cost-detail-modal .itv-cost-detail-table th,
.itv-cost-detail-modal .itv-cost-detail-table td {
  padding: 0.2rem 0.28rem;
  vertical-align: top;
}

.itv-cost-detail-modal .itv-cost-detail-table td.itv-cdt-tight-pr {
  padding-right: 0.08rem;
}

.itv-cost-detail-table td.itv-cdt-cell--total-label {
  vertical-align: middle;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.itv-cost-detail-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 0.78rem;
}

/* Widths: Day, Date, Desc, Tickets/Guide/Meals/Hotel cost/Extra −25% vs prior eq; Transport unchanged; Hotel name ×2 vs prior eq */
.itv-cdt-col--day {
  width: 2.6%;
  min-width: 1.35rem;
}

.itv-cdt-col--date {
  width: 5.6%;
  min-width: 2.95rem;
}

.itv-cdt-col--title {
  width: 37.25%;
  min-width: 7rem;
}

.itv-cdt-col--tg {
  width: 4.4%;
  min-width: 1.75rem;
}

.itv-cdt-col--tr {
  width: 5.85%;
  min-width: 2.3rem;
}

.itv-cdt-col--hotel-name {
  width: 11.7%;
  min-width: 4.75rem;
}

.itv-cdt-col--desc {
  width: 15%;
  min-width: 4.5rem;
}

.itv-cost-detail-modal .itv-cost-detail-table thead th:nth-child(1),
.itv-cost-detail-modal .itv-cost-detail-table thead th:nth-child(2),
.itv-cost-detail-modal .itv-cdt-cell--day,
.itv-cost-detail-modal .itv-cdt-cell--date {
  text-align: center !important;
}

.itv-cost-detail-modal .itv-cdt-cell--day,
.itv-cost-detail-modal .itv-cdt-cell--date {
  font-variant-numeric: tabular-nums;
}

.itv-cdt-cell--desc {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.itv-cost-detail-table th,
.itv-cost-detail-table td {
  border-right: 1px solid var(--panel-border);
}

.itv-cost-detail-table th:first-child,
.itv-cost-detail-table td:first-child {
  border-left: 1px solid var(--panel-border);
}

/* Day rows: Cambodia vs other countries; transition = border / cross-country travel days */
.itv-cost-detail-table tbody tr.itv-cdt-row--kh {
  background-color: rgba(22, 163, 74, 0.07);
}

.itv-cost-detail-table tbody tr.itv-cdt-row--ext {
  background-color: rgba(37, 99, 235, 0.065);
}

.itv-cost-detail-table tbody tr.itv-cdt-row--unk {
  background-color: rgba(107, 114, 128, 0.06);
}

.itv-cost-detail-table tbody tr.itv-cdt-row--transition {
  background-color: rgba(217, 119, 6, 0.11);
}

.itv-cost-detail-table tbody tr.itv-cdt-row--fuel .itv-cdt-cell--total-label,
.itv-cost-detail-table tbody tr.itv-cdt-row--fuel .itv-cdt-fuel-val {
  color: #dc2626;
  font-weight: 700;
}

.itv-cost-detail-table tbody tr.itv-cdt-row--total-pax {
  background-color: rgba(15, 23, 42, 0.028);
  font-weight: 600;
}

.itv-cost-detail-table tbody tr.itv-cdt-row--total-pax td {
  border-top: 1px solid var(--panel-border);
}

.itv-cost-detail-table tbody tr.itv-cdt-row--total {
  background-color: rgba(15, 23, 42, 0.05);
  font-weight: 600;
}

.itv-cost-detail-table tbody tr.itv-cdt-row--total td {
  border-top: 1px solid var(--panel-border);
}

.itv-tl-foc-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(126, 173, 90, 0.35), rgba(65, 139, 168, 0.28));
  color: #1e3a2f;
  border: 1px solid rgba(126, 173, 90, 0.45);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.itv-cost-detail-summary {
  margin-top: 0.75rem;
  font-size: 0.86rem;
  line-height: 1.25;
}

.itv-cost-detail-summary__block {
  padding: 0.08rem 0;
}

.itv-cost-detail-summary__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.22rem 0;
}

.itv-cost-detail-summary__lbl {
  flex: 1 1 auto;
  min-width: 8rem;
  text-align: left;
}

.itv-cost-detail-summary__val {
  flex: 0 0 auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.itv-cost-detail-summary__block--grand {
  margin-top: 0.2rem;
  padding-top: 0.35rem;
}

.itv-cost-detail-sep {
  border: none;
  border-top: 1px solid var(--border, #e5e7eb);
  margin: 0.55rem 0;
}

.itv-day-side-col {
  min-width: 0;
  border-left: 1px solid var(--border);
  padding-left: 0.65rem;
}

.itv-day-side-h {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.itv-day-side-inner {
  display: flex;
  flex-direction: column;
}

.itv-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.itv-guide-head .itv-day-side-h {
  margin-top: 0.12rem;
}

.itv-cost-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
}

.itv-cost-toggle__inp {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.itv-cost-toggle__track {
  display: block;
  width: 2.35rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #c8c0b8;
  transition: background 0.15s ease;
  position: relative;
}

.itv-cost-toggle__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.25rem - 4px);
  height: calc(1.25rem - 4px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
  transition: transform 0.15s ease;
}

.itv-cost-toggle__inp:checked + .itv-cost-toggle__track {
  background: var(--accent, #7ead5a);
}

.itv-cost-toggle__inp:checked + .itv-cost-toggle__track::after {
  transform: translateX(1.1rem);
}

.itv-cost-toggle__inp:disabled + .itv-cost-toggle__track {
  opacity: 0.45;
  cursor: not-allowed;
}

.itv-cost-section.is-collapsed .itv-cost-section__body,
.itv-rst-nk-block.is-collapsed .itv-cost-section__body {
  display: none;
}

.itv-cost-section.is-collapsed .itv-guide-head,
.itv-rst-nk-block.is-collapsed .itv-guide-head {
  margin-bottom: 0;
}

.itv-rst-nk-block {
  margin-top: 0.15rem;
}

.itv-rst-nk-block + .itv-rst-nk-block {
  margin-top: 0.45rem;
}

.itv-cost-section {
  padding: 0.32rem 0.35rem;
  border-radius: 8px;
  transition: background-color 120ms ease;
}

.itv-cost-section:hover {
  background: rgba(65, 50, 37, 0.055);
}

.itv-day-side-inner > .itv-cost-section:first-of-type:hover {
  margin-top: 0.2rem;
}

.itv-guide-empty {
  font-size: 0.82rem;
  color: #c0392b;
  margin: 0 0 0.5rem;
}

.itv-cost-sep {
  border-top: 1px solid var(--border);
  margin: 0.45rem 0 0.55rem;
  margin-left: 5px;
  margin-right: 5px;
}

.itv-cost-placeholder {
  font-size: 0.82rem;
  color: var(--panel-muted);
  margin: 0 0 0.4rem;
}

.itv-hotel-sel-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
}

.itv-hotel-sel-input {
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 5.25rem);
}

.itv-hotel-night-rate {
  flex: 0 0 auto;
  font-size: 0.78rem;
  text-align: right;
}

.itv-hotel-sel-cell .itv-hotel-night-rate {
  max-width: 5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.itv-hotel-rows {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.itv-hotel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) 2.75rem auto;
  gap: 0.45rem;
  align-items: center;
}

.itv-hotel-row input[data-itv-h-qty] {
  font-size: 0.74rem;
}

.itv-hotel-row-pad {
  width: 1.8rem;
  display: inline-block;
}

.itv-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.6rem;
  margin: 0.2rem 0 0.45rem;
}

.itv-cost-box {
  border: none;
  border-radius: 0;
  padding: 0.2rem 0.1rem;
  min-width: 0;
}

.itv-cost-box-h {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
}

.pc-file-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.pc-file-preview {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  background: #fff;
}

.pc-file-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 3px;
}

.pc-file-pill {
  font-size: 0.6rem;
  color: var(--panel-muted);
}

.pc-file-hover {
  display: none;
  position: absolute;
  right: 105%;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  max-height: 220px;
  padding: 0.2rem;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
  z-index: 35;
}

.pc-file-hover img {
  width: 100%;
  height: auto;
  max-height: 210px;
  object-fit: contain;
}

.pc-file-preview:hover .pc-file-hover {
  display: block;
}

.pc-sub-picker {
  position: relative;
  min-width: 12rem;
}

.pc-sub-wrap {
  overflow: visible;
}

.pc-sub-toggle {
  min-width: 7rem;
}

.pc-sub-menu {
  position: absolute;
  z-index: 36;
  top: calc(100% + 0.2rem);
  left: 0;
  width: min(22rem, 60vw);
  max-height: 14rem;
  overflow: auto;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #fff;
  padding: 0.35rem 0.45rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Above following Post-confirm accordions (e.g. International flights) */
.postconfirm-panel .pc-sub-menu {
  z-index: 80;
}

.postconfirm-panel .pc-core-group:has(.pc-sub-menu:not([hidden])) {
  position: relative;
  z-index: 5;
  overflow: visible;
}

.pc-sub-opt {
  display: block;
  font-size: 0.78rem;
  margin: 0 0 0.25rem;
}

.pc-sub-opt:last-child {
  margin-bottom: 0;
}

/* Post-confirm: allow hover previews to escape panel/table clipping */
.postconfirm-panel,
.postconfirm-panel .panel-body-pad,
.postconfirm-panel .table-wrap,
.postconfirm-panel table.data,
.postconfirm-panel table.data td {
  overflow: visible;
}

.postconfirm-panel .pc-flight-inc-td {
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
  width: 3.25rem;
  padding-left: 0.2rem;
  padding-right: 0.2rem;
}

.postconfirm-panel .pc-flight-inc-td .btn {
  min-width: 2.75rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.pc-com-hint {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--panel-muted);
  font-weight: 400;
}

.pc-com-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.postconfirm-panel--comms .panel-body-pad--comms {
  padding-top: 0.55rem;
}

.pc-com-inbox {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  gap: 0;
  min-height: min(70vh, 42rem);
  align-items: stretch;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-bg);
}

.pc-com-inbox__list {
  border: 0;
  border-right: 1px solid var(--panel-border);
  border-radius: 0;
  background: var(--panel-surface-2);
  overflow: auto;
  max-height: none;
  min-height: min(70vh, 42rem);
  padding: 0.45rem 0.4rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pc-com-inbox__list-label {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--panel-muted);
  padding: 0.15rem 0.4rem 0.35rem;
}

.pc-com-inbox-empty {
  margin: 0.5rem 0.35rem;
  font-size: 0.8rem;
}

.pc-com-inbox-item {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  text-align: left;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  padding: 0.5rem 0.55rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.pc-com-inbox-item:hover {
  background: rgba(65, 50, 37, 0.04);
}

.pc-com-inbox-item.is-active {
  border-color: rgba(126, 173, 90, 0.45);
  background: #fff;
  box-shadow: 0 1px 2px rgba(65, 50, 37, 0.05);
}

.pc-com-inbox-item__top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: space-between;
}

.pc-com-inbox-item__title {
  font-weight: 650;
  font-size: 0.8rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--panel-text);
}

.pc-com-inbox-item__meta {
  font-size: 0.68rem;
  color: var(--panel-muted);
  text-transform: capitalize;
}

.pc-com-inbox-item__preview {
  font-size: 0.73rem;
  color: var(--panel-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-com-inbox__detail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel-bg);
}

.pc-com-detail {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: min(70vh, 42rem);
  height: 100%;
}

.pc-com-detail-empty {
  border: 0;
  border-radius: 0;
  min-height: 16rem;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  color: var(--panel-muted);
}

.pc-com-detail__head {
  padding: 0.65rem 0.85rem 0.55rem;
  border-bottom: 1px solid var(--panel-border);
  background: #fff;
}

.pc-com-meta {
  display: grid;
  grid-template-columns: 7.5rem 7.5rem minmax(0, 1fr) auto;
  gap: 0.45rem 0.55rem;
  align-items: end;
}

.pc-com-del {
  align-self: end;
  margin-bottom: 1px;
}

.pc-com-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-height: 12rem;
  max-height: none;
  overflow: auto;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, #fafafb 0%, #fff 100%);
  border: 0;
}

.pc-com-timeline-empty {
  margin: auto 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--panel-muted);
  line-height: 1.4;
  max-width: 26rem;
  align-self: center;
}

.pc-com-bubble {
  max-width: min(36rem, 88%);
  border-radius: 9px;
  padding: 0.45rem 0.65rem 0.5rem;
  border: 1px solid var(--panel-border);
  background: #fff;
}

.pc-com-bubble--outbound {
  align-self: flex-end;
  background: #f3f8ef;
  border-color: rgba(126, 173, 90, 0.35);
}

.pc-com-bubble--inbound {
  align-self: flex-start;
  background: #fff;
  border-color: var(--panel-border);
}

.pc-com-bubble__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.5rem;
  font-size: 0.68rem;
  color: var(--panel-muted);
  margin-bottom: 0.2rem;
}

.pc-com-bubble__who {
  font-weight: 650;
  color: var(--panel-text);
}

.pc-com-bubble__subj {
  font-size: 0.78rem;
  font-weight: 650;
  margin-bottom: 0.15rem;
}

.pc-com-bubble__body {
  font-size: 0.84rem;
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
  color: var(--panel-text);
}

.pc-com-bubble .pc-com-status {
  display: inline-block;
  margin-top: 0.3rem;
}

.pc-com-compose {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0.85rem;
  border-top: 1px solid var(--panel-border);
  background: #fff;
}

.pc-com-compose__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
}

.pc-com-compose__label {
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--panel-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pc-com-compose__tpl {
  display: flex;
  flex: 1 1 16rem;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.pc-com-compose__tpl .pc-com-tpl {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none !important;
  width: 100%;
}

.pc-com-compose__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.4rem;
}

.pc-com-field--subject,
.pc-com-field--message {
  width: 100%;
}

.pc-com-status {
  font-size: 0.65rem;
  line-height: 1;
  font-weight: 650;
  white-space: nowrap;
  padding: 0.22rem 0.4rem;
  border-radius: 999px;
  background: rgba(127, 107, 87, 0.1);
  color: var(--panel-muted);
}

.pc-com-status.is-sent,
.pc-com-status.is-opened {
  color: #3f6f28;
  background: rgba(126, 173, 90, 0.18);
}

.pc-com-status.is-received {
  color: #1f6b45;
  background: rgba(31, 107, 69, 0.12);
}

.pc-com-status.is-draft {
  color: #8a5a12;
  background: rgba(196, 140, 48, 0.16);
}

.pc-com-status.is-empty {
  color: var(--panel-muted);
  background: rgba(127, 107, 87, 0.08);
}

.pc-com-field {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.pc-com-field > span {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--panel-muted);
}

/* Global .inp-sm is max-width:140px — without this, Communications looks empty */
.postconfirm-panel--comms .inp-sm,
.postconfirm-panel--comms input.inp-sm,
.postconfirm-panel--comms select.inp-sm,
.postconfirm-panel--comms textarea.inp-sm,
.pc-com-field .inp-sm,
.pc-com-compose .inp-sm,
.pc-com-meta .inp-sm,
.pc-com-compose__tpl .pc-com-tpl {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}

.pc-com-body {
  resize: vertical;
  min-height: 7.5rem;
  max-height: 18rem;
  width: 100% !important;
  max-width: none !important;
  font-family: inherit;
  line-height: 1.4;
}

.pc-com-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.1rem;
}

.pc-com-actions-sec {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.pc-com-attach-picker {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: var(--panel-surface-2);
}

.pc-com-attach-picker__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.pc-com-attach-picker__label {
  font-size: 0.68rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--panel-muted);
}

.pc-com-attach-picker__actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.pc-com-attach-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.35rem 0.75rem;
}

.pc-com-attach-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--panel-text);
  cursor: pointer;
  min-width: 0;
}

.pc-com-attach-opt--extra {
  cursor: default;
}

.pc-com-attach-opt input {
  margin-top: 0.15rem;
  flex: 0 0 auto;
}

.pc-com-attach-opt span {
  min-width: 0;
  line-height: 1.3;
  flex: 1 1 auto;
}

.pc-com-attach-empty {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.8rem;
  color: var(--panel-muted);
  line-height: 1.4;
}

.pc-com-attach-note {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: var(--panel-muted);
  line-height: 1.35;
}

.pc-com-attach-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.pc-com-attach-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(126, 173, 90, 0.4);
  background: rgba(126, 173, 90, 0.12);
  color: var(--panel-text);
  font-size: 0.72rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

a.pc-com-attach-chip:hover {
  border-color: var(--accent-dim);
  background: rgba(126, 173, 90, 0.2);
}

.gcom-page .panel-body-pad,
.gcom-panel__body {
  padding-top: 0.55rem;
}

.gcom-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.gcom-panel__header {
  padding-left: 0.15rem;
  padding-right: 0.15rem;
  border-bottom: 0;
  margin-bottom: 0.15rem;
}

.gcom-panel__header .panel-title {
  letter-spacing: -0.01em;
}

.gcom-panel__header .pc-com-hint {
  max-width: 40rem;
}

.gcom-filters {
  display: grid;
  grid-template-columns: minmax(12rem, 1.35fr) 8.5rem 8rem 8rem 8.5rem auto;
  gap: 0.5rem 0.6rem;
  align-items: end;
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 248, 249, 0.95)),
    var(--panel-surface-2);
}

.gcom-filters__search {
  min-width: 0;
}

.gcom-filters .pc-com-field > span {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 650;
}

.gcom-filters .inp-sm {
  width: 100% !important;
  max-width: none !important;
  min-height: 2rem;
  border-radius: 8px;
  background: #fff;
}

.gcom-filters__count {
  font-size: 0.76rem;
  color: var(--panel-muted);
  padding-bottom: 0.4rem;
  white-space: nowrap;
}

.gcom-filters__count strong {
  color: var(--panel-text);
  font-weight: 650;
}

.gcom-item.is-archived {
  opacity: 0.68;
}

.gcom-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.gcom-inbox {
  display: grid;
  grid-template-columns: minmax(16rem, 21rem) minmax(0, 1fr);
  gap: 0.75rem;
  min-height: min(72vh, 44rem);
  align-items: stretch;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.gcom-inbox__list {
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background:
    linear-gradient(165deg, #f7f6f4 0%, #f3f1ee 48%, #f8f8f9 100%);
  overflow: auto;
  padding: 0.55rem 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-height: min(72vh, 44rem);
  max-height: min(72vh, 44rem);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.gcom-inbox__list:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 0 0 2px rgba(126, 173, 90, 0.32);
}

.gcom-inbox__list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.15rem 0.45rem 0.45rem;
}

.gcom-inbox__list-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--panel-muted);
}

.gcom-inbox__list-hint {
  font-size: 0.66rem;
  color: rgba(127, 107, 87, 0.75);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.gcom-empty {
  margin: 1.25rem 0.65rem;
  text-align: center;
  line-height: 1.45;
}

.gcom-item {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  text-align: left;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  padding: 0.58rem 0.62rem 0.58rem 0.7rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
  position: relative;
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.gcom-item::before {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.14s ease;
}

.gcom-item:hover {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(65, 50, 37, 0.06);
}

.gcom-item.is-active {
  border-color: rgba(126, 173, 90, 0.28);
  background: #fff;
  box-shadow: 0 1px 3px rgba(65, 50, 37, 0.06);
}

.gcom-item.is-active::before {
  background: var(--accent);
}

.gcom-item:focus-visible {
  outline: 2px solid rgba(126, 173, 90, 0.5);
  outline-offset: 1px;
}

.gcom-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.gcom-item__title {
  font-weight: 650;
  font-size: 0.84rem;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--panel-text);
}

.gcom-item__meta {
  font-size: 0.7rem;
  color: var(--panel-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gcom-item__preview {
  font-size: 0.74rem;
  color: rgba(127, 107, 87, 0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}

.gcom-inbox__detail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
  min-height: min(72vh, 44rem);
  box-shadow: 0 8px 24px rgba(65, 50, 37, 0.04);
}

.gcom-detail {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: min(72vh, 44rem);
}

.gcom-detail-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  color: var(--panel-muted);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(126, 173, 90, 0.06), transparent 55%),
    #fff;
}

.gcom-detail__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--panel-border);
  background: linear-gradient(180deg, #fff, #fbfbfa);
}

.gcom-detail__client {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  color: var(--panel-text);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.gcom-detail__sub {
  margin-top: 0.28rem;
  font-size: 0.78rem;
  color: var(--panel-muted);
  line-height: 1.4;
}

.gcom-detail__timeline {
  flex: 1 1 auto;
  overflow: auto;
  padding: 1rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background:
    linear-gradient(180deg, #f7f6f4 0%, #fafaf9 28%, #fff 100%);
}

.gcom-detail__timeline .pc-com-bubble {
  box-shadow: 0 1px 2px rgba(65, 50, 37, 0.04);
}

.gcom-detail__hint {
  margin: 0;
  padding: 0.65rem 1.1rem 0.8rem;
  border-top: 1px solid var(--panel-border);
  font-size: 0.72rem;
  color: var(--panel-muted);
  background: #fcfcfb;
  line-height: 1.4;
}

@media (max-width: 960px) {
  .pc-com-meta {
    grid-template-columns: 1fr 1fr;
  }

  .pc-com-field--contact {
    grid-column: 1 / -1;
  }

  .pc-com-del {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .gcom-filters {
    grid-template-columns: 1fr 1fr;
  }

  .gcom-filters__search {
    grid-column: 1 / -1;
  }

  .gcom-filters__count {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .pc-com-inbox {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .pc-com-inbox__list {
    min-height: 0;
    max-height: 11rem;
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .pc-com-detail {
    min-height: 0;
  }

  .pc-com-compose__tpl {
    justify-content: stretch;
    max-width: none;
  }

  .pc-com-compose__tpl .pc-com-tpl {
    max-width: none;
  }

  .pc-com-card__actions {
    justify-content: flex-start;
  }

  .gcom-inbox {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 0.65rem;
  }

  .gcom-inbox__list {
    min-height: 0;
    max-height: 13rem;
  }

  .gcom-detail {
    min-height: 0;
  }

  .gcom-inbox__detail {
    min-height: 0;
  }
}

.itv-ticket-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.25rem;
}

.itv-ticket-name {
  min-width: 0;
  font-size: 0.8rem;
  color: var(--panel-text);
}

.itv-ticket-price {
  font-size: 0.8rem;
  color: var(--panel-muted);
  font-variant-numeric: tabular-nums;
}

.itv-oth-variant-row {
  margin: 0 0 0.35rem;
}

.itv-oth-variant-row__line1 {
  margin-bottom: 0.12rem;
}

.itv-oth-variant-sel {
  display: block;
  width: calc(100% - 1.45rem);
  max-width: 100%;
  margin: 0 0 0 1.45rem;
  font-size: 0.72rem;
}

.itv-ticket-block {
  margin-bottom: 0.45rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.itv-ticket-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.itv-ticket-part {
  margin: 0.35rem 0 0 0.15rem;
}

.itv-tk-subset-lbl {
  display: block;
  margin-bottom: 0.25rem;
}

.itv-ticket-part-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}

.itv-tk-pax-lbl {
  font-size: 0.72rem;
  color: var(--panel-muted);
}

.itv-tk-pax-inp {
  width: 2.5rem;
  min-height: 1.55rem;
  padding: 0.12rem 0.3rem;
  font-size: 0.72rem;
}

.itv-tk-pax-hint {
  flex-basis: 100%;
  grid-column: 1 / -1;
  font-size: 0.64rem;
  white-space: nowrap;
}

.itv-tk-subset-inner {
  margin-top: 0.35rem;
  padding-left: 0.15rem;
}

.itv-tk-num-fields {
  display: grid;
  grid-template-columns: auto auto auto auto;
  align-items: center;
  column-gap: 0.24rem;
  row-gap: 0.35rem;
}

.itv-tk-num-fields .itv-tk-pax-lbl {
  margin-right: 0.06rem;
  white-space: nowrap;
}

.itv-tk-mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
}

.itv-tk-roster-fields {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
  max-height: 9rem;
  overflow: auto;
  padding: 0.25rem 0;
}

.itv-tk-roster-row {
  margin: 0 !important;
}

.itv-tk-roster-incomplete-link {
  color: #b91c1c;
  font-weight: 700;
  text-decoration: underline;
}

/* Request detail: quote-phase companion travelers */
.req-travelers-help {
  margin: 0 0 0.65rem;
  max-width: 52rem;
}

.rq-travelers-table-wrap {
  margin-top: 0.35rem;
}

.rq-travelers-table .rq-tr-cell-ch {
  white-space: nowrap;
}

.rq-travelers-table .rq-tr-ch-lbl {
  font-size: 0.8rem;
}

.rq-tr-name-inp {
  min-width: 12rem;
}

.rq-tr-notes-inp {
  min-width: 8rem;
}

.rq-travelers-softwarn {
  margin: 0 0 0.65rem;
  max-width: 52rem;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  background: rgba(180, 83, 9, 0.08);
  color: var(--panel-text, #2a241c);
  border: 1px solid rgba(180, 83, 9, 0.22);
}

.itv-tk-mode-sel {
  font-size: 0.76rem;
}

.itv-empty-red {
  margin: 0;
  font-size: 0.8rem;
  color: #c0392b;
}

.itv-rst-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

.itv-rst-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
}

.itv-rst-row--search {
  grid-template-columns: minmax(0, 60%) minmax(0, 40%);
}

.itv-rst-menuprice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.45rem;
  align-items: center;
}
.itv-rst-payby {
  max-width: 92px;
}

.itv-guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 45%) minmax(0, 55%);
  gap: 0.45rem 0.7rem;
  margin-bottom: 0.5rem;
}

.itv-guide-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

/* Hotel room lines: full-width rows, then + button, then capacity warning below */
.itv-guide-cell.itv-hotel-rooms-cell {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.itv-guide-cell.itv-hotel-rooms-cell .itv-hotel-rows {
  width: 100%;
  min-width: 0;
}

.itv-trn-vehicles-cell {
  /* Single horizontal strip: label + count × type (+ more vehicles) + + Fees */
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center !important;
  gap: 0.55rem 0.65rem;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.itv-trn-veh-block {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  flex: 1 1 auto;
  min-width: 0;
}

.itv-trn-vehicles-list {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  flex: 0 1 auto;
  min-width: 0;
}

.itv-trn-veh-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 0 0 auto;
}

.itv-trn-veh-row + .itv-trn-veh-row {
  padding-left: 0.55rem;
  margin-left: 0.1rem;
  border-left: 1px solid var(--panel-border, #e5e7eb);
}

.itv-trn-veh-row .itv-trn-veh-count {
  box-sizing: border-box;
  width: 4.7rem;
  min-width: 4.7rem;
  flex: 0 0 auto;
  text-align: right;
  font-size: 0.78rem;
  line-height: 1.2;
  padding: 0.3rem 0.22rem;
  font-variant-numeric: tabular-nums;
  height: auto;
  min-height: calc(0.6rem + 1.2em);
}
.itv-trn-veh-row .itv-trn-veh-count::-webkit-inner-spin-button,
.itv-trn-veh-row .itv-trn-veh-count::-webkit-outer-spin-button {
  height: 1rem;
  opacity: 0.85;
}

.itv-trn-veh-row .itv-trn-veh-x {
  color: var(--panel-muted);
  font-size: 0.78rem;
  font-weight: 600;
  flex: 0 0 auto;
}

.itv-trn-veh-row .itv-trn-veh-type {
  flex: 0 1 17rem;
  min-width: 9rem;
  max-width: 19rem;
  width: 100%;
  line-height: 1.2;
  min-height: calc(0.6rem + 1.2em);
  box-sizing: border-box;
}

.itv-trn-veh-row .itv-trn-veh-del {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #6b7280;
  border-radius: 4px;
  width: 1.4rem;
  height: 1.4rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex: 0 0 auto;
}

.itv-trn-veh-row .itv-trn-veh-del:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.itv-trn-veh-fees-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  flex: 0 0 auto;
  min-width: 0;
}
.itv-trn-veh-fees-toolbar .itv-trn-veh-add {
  flex: 0 0 auto;
  margin: 0;
  min-width: 1.75rem;
}
.itv-trn-veh-fees-toolbar .itv-trn-veh-fees-k {
  margin: 0;
}
.itv-trn-veh-fees-toolbar .itv-guide-v--num {
  margin-left: 0.1rem;
}

.itv-guide-k {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--panel-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.itv-guide-v {
  font-size: 0.82rem;
  color: var(--panel-text);
  min-width: 0;
}

.itv-guide-v--num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.itv-guide-sel {
  min-width: 0;
  padding: 0.3rem 0.45rem;
  font-size: 0.78rem;
  flex: 1;
}

.itv-guide-sel--lang {
  flex: 0 0 3.9rem;
  min-width: 3.9rem;
  max-width: 3.9rem;
}

.itv-guide-free-input {
  font-size: 0.72rem;
  padding: 0.25rem 0.4rem;
  line-height: 1.2;
}

.itv-guide-free-input::placeholder {
  font-size: 0.72rem;
}

.itv-guide-inc {
  margin-left: auto;
  white-space: nowrap;
}

.itv-guide-flag {
  margin: 0;
}

.itv-guide-skip-xfer-cell {
  gap: 0.35rem;
}

.itv-info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 1px solid var(--panel-muted, #9ca3af);
  color: var(--panel-muted, #9ca3af);
  font-size: 0.62rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  cursor: help;
  flex-shrink: 0;
  user-select: none;
}

.itv-info-tip:focus-visible {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 1px;
}

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

.itv-day-side-note {
  margin: 0 0 0.65rem;
  line-height: 1.4;
}

.itv-day-side-full-btn {
  margin-top: 0.2rem;
  align-self: flex-end;
  display: inline-flex;
}

.itv-day-main-empty,
.itv-day-side-empty {
  padding: 0.5rem 0;
}

@media (max-width: 960px) {
  .itv-day-by-day-panel .itv-day-split {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .itv-day-list-col {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 0.65rem;
  }

  .itv-day-side-col {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 0.65rem;
  }

  .itv-guide-grid {
    grid-template-columns: 1fr;
  }

  .itv-guide-inc {
    margin-left: 0;
  }

  .itv-guide-v--num {
    text-align: left;
  }

  .itv-two-col {
    grid-template-columns: 1fr;
  }

  .itv-day-list {
    max-height: 12rem;
  }
}

.itv-tab-panel[hidden] {
  display: none !important;
}

.itv-tab-panel[data-itv-panel="pdf"] {
  padding-top: 0.75rem;
}

.itv-pdf-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 0.85rem 1rem;
  align-items: start;
  padding-top: 0.85rem;
}
@media (max-width: 960px) {
  .itv-pdf-layout {
    grid-template-columns: 1fr;
  }
}
.itv-pdf-sidebar {
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: #faf9f7;
  padding: 0.85rem 0.72rem 0.68rem;
  max-height: calc(100vh - 220px);
  overflow: auto;
}
.itv-pdf-sidebar-title {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #3d342c;
}
.itv-pdf-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.42rem;
  font-size: 0.76rem;
  color: #4a4a52;
}
.itv-pdf-field--compact {
  margin-bottom: 0.38rem;
}
.itv-pdf-field--compact .input-sm {
  font-size: 0.76rem;
}
.itv-pdf-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.25rem 0.45rem;
  margin-bottom: 0.38rem;
}
.itv-pdf-field--inline {
  flex: none;
  min-width: 0;
  margin-bottom: 0;
}
.itv-pdf-deadline-inp {
  width: 100%;
  max-width: none;
  font-size: 0.76rem;
}
.itv-pdf-cover-inline {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.22rem;
  justify-content: flex-end;
  min-width: 0;
}
.itv-pdf-cover-pick {
  margin: 0;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.74rem;
  padding: 0.22rem 0.48rem;
}
.itv-pdf-cover-pick input[type="file"] {
  display: none;
}
.itv-pdf-field span {
  font-weight: 600;
}
.itv-pdf-field .input-sm,
.itv-pdf-field textarea.input-sm {
  width: 100%;
  font-size: 0.78rem;
}
.itv-pdf-placeholder-hint {
  margin: 0.35rem 0 0;
  line-height: 1.35;
}
.itv-pdf-placeholder-details {
  margin-top: 0.45rem;
  line-height: 1.35;
}
.itv-pdf-placeholder-details summary {
  cursor: pointer;
  font-size: 0.72rem;
  color: #7a7268;
  user-select: none;
}
.itv-pdf-placeholder-details[open] summary {
  margin-bottom: 0.25rem;
}
.itv-pdf-placeholder-hint code {
  font-size: 0.72rem;
}
.itv-pdf-cover-status {
  display: block;
  margin-top: 0.2rem;
}
.itv-pdf-sidebar-section {
  border-top: 1px solid #e8e4de;
  margin-top: 0.35rem;
  padding-top: 0.28rem;
}
.itv-pdf-sidebar-section--flush {
  margin-top: 0.15rem;
  padding-top: 0.15rem;
  border-top: none;
}
.itv-pdf-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 0 0.35rem;
  padding: 0.2rem 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #3d342c;
}
.itv-pdf-section-toggle:disabled {
  cursor: default;
  opacity: 0.65;
}
.itv-pdf-section-title {
  font-size: 0.8rem;
  font-weight: 700;
}
.itv-pdf-section-chevron {
  font-size: 0.72rem;
  color: #7a7268;
  flex-shrink: 0;
  margin-left: 0.35rem;
}
.itv-pdf-section-body.is-collapsed {
  display: none;
}
.itv-pdf-section-body .itv-pdf-field {
  margin-bottom: 0.35rem;
}
.itv-pdf-section-body .itv-pdf-field:last-child {
  margin-bottom: 0;
}
.itv-pdf-incl-excl-summary {
  margin: 0 0 0.45rem;
  line-height: 1.35;
  color: #4a4038;
}
.itv-pdf-incl-excl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.itv-pdf-incl-excl-modal-hint {
  margin: 0 0 0.65rem;
}
.itv-pdf-incl-excl-lang-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.itv-pdf-incl-excl-lang-tabs .btn.is-active {
  background: #2f6b6d;
  border-color: #2f6b6d;
  color: #fff;
}
.itv-pdf-incl-excl-modal .form-row {
  margin-bottom: 0.85rem;
}
.itv-pdf-incl-excl-modal .rte-editor p,
.itv-pdf-incl-excl-modal .rte-editor li,
.pdf-lists-settings .rte-editor p,
.pdf-lists-settings .rte-editor li,
.pdf-closing-settings .rte-editor p,
.pdf-closing-settings .rte-editor li {
  display: block;
  margin: 0 0 0.45em;
  line-height: 1.4;
}
.itv-pdf-incl-excl-modal .rte-editor p:last-child,
.itv-pdf-incl-excl-modal .rte-editor li:last-child,
.pdf-lists-settings .rte-editor p:last-child,
.pdf-lists-settings .rte-editor li:last-child,
.pdf-closing-settings .rte-editor p:last-child,
.pdf-closing-settings .rte-editor li:last-child {
  margin-bottom: 0;
}
.itv-pdf-incl-excl-modal .rte-editor {
  min-height: 15rem;
  max-height: min(32rem, 42vh);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.itv-pdf-incl-excl-modal .incl-excl-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}
@media (max-width: 720px) {
  .itv-pdf-incl-excl-modal .incl-excl-modal-grid {
    grid-template-columns: 1fr;
  }
}
.pdf-lists-settings__intro {
  margin: 0 0 0.75rem;
}
.settings-page--pdf-lists {
  max-width: min(1200px, 100%);
  width: 100%;
}
.pdf-lists-settings {
  padding: 0.9rem 1.15rem 1.1rem;
}
.pdf-lists-settings__tabs {
  margin-bottom: 0.75rem;
}
.pdf-lists-settings__section-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.pdf-lists-textarea-grid,
.pdf-lists-rte-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}
@media (max-width: 900px) {
  .pdf-lists-textarea-grid,
  .pdf-lists-rte-grid {
    grid-template-columns: 1fr;
  }
}
.pdf-lists-settings .rte-editor {
  min-height: 14rem;
  max-height: min(28rem, 50vh);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.pdf-lists-settings .form-row {
  margin-bottom: 0;
}
.pdf-list-textarea {
  width: 100%;
  min-height: 16rem;
  resize: vertical;
  line-height: 1.45;
  font-family: inherit;
  box-sizing: border-box;
}
.pdf-lists-settings__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  padding: 0.35rem 0 0.15rem;
}

/* Settings → PDF closing (mirrors PDF lists layout) */
.settings-page--pdf-closing {
  max-width: min(1200px, 100%);
  width: 100%;
}
.pdf-closing-settings {
  padding: 0.9rem 1.15rem 1.1rem;
}
.pdf-closing-settings__intro {
  margin: 0 0 0.75rem;
}
.pdf-closing-settings__tabs {
  margin-bottom: 0.85rem;
}
.pdf-closing-settings__pane {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.pdf-closing-settings__section-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #1f2937);
}
.pdf-closing-settings__section-title--spaced {
  margin-top: 0.35rem;
}
.pdf-closing-settings__pane--global {
  gap: 0.5rem;
}
.pdf-closing-settings__pane-head {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.15rem;
}
.pdf-closing-settings__pane-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.pdf-closing-settings__block-body--process .pdf-closing-settings__hint {
  margin-top: 0;
}
.pdf-closing-settings__block--compact-text .rte-editor {
  font-size: 0.82rem;
  line-height: 1.32;
}
.pdf-closing-settings__block--compact-text .rte-editor p,
.pdf-closing-settings__block--compact-text .rte-editor li {
  margin: 0 0 0.28em;
  line-height: 1.32;
}
.pdf-closing-settings__hint {
  margin: 0 0 0.55rem;
  line-height: 1.45;
}
.pdf-closing-settings__hint--lead {
  margin-bottom: 0.75rem;
}
.pdf-closing-process-preview {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  background: #fff;
  overflow-x: auto;
}
.pdf-closing-process-preview img {
  display: block;
  width: 80%;
  max-width: 80%;
  margin: 0 auto;
  height: auto;
}
.pdf-closing-process-fields {
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}
@media (max-width: 720px) {
  .pdf-closing-process-fields {
    grid-template-columns: 1fr;
  }
}
.pdf-closing-settings__block {
  margin: 0;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: var(--bg, #fff);
  overflow: hidden;
}
.pdf-closing-settings__block + .pdf-closing-settings__block {
  margin-top: 0.5rem;
}
.pdf-closing-settings__block-head {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text, #1f2937);
  background: var(--surface-2, #f8fafc);
  border-bottom: 1px solid transparent;
}
.pdf-closing-settings__block-head::-webkit-details-marker {
  display: none;
}
.pdf-closing-settings__block-head::before {
  content: "▸";
  font-size: 0.72rem;
  color: var(--muted, #6b7280);
  transition: transform 0.15s ease;
}
.pdf-closing-settings__block[open] > .pdf-closing-settings__block-head {
  border-bottom-color: var(--border, #e5e7eb);
}
.pdf-closing-settings__block[open] > .pdf-closing-settings__block-head::before {
  transform: rotate(90deg);
}
.pdf-closing-settings__block-body {
  padding: 0.75rem 0.85rem 0.85rem;
}
.pdf-closing-settings__block-body .pdf-lists-rte-grid {
  margin-bottom: 0;
}
.pdf-closing-country-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(126, 173, 90, 0.15);
  color: #4a6741;
}
.pdf-closing-country-name {
  font-weight: 600;
}
.pdf-closing-country-url {
  margin-bottom: 0.35rem;
}
.pdf-closing-settings__country-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pdf-closing-settings__qr-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.pdf-closing-settings__qr-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: var(--bg, #fff);
  overflow: hidden;
}
.pdf-closing-settings__qr-head {
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text, #1f2937);
  background: var(--surface-2, #f8fafc);
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.pdf-closing-settings__qr-grid {
  padding: 0.65rem 0.75rem 0.75rem;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.85rem;
}
.pdf-closing-settings__qr-url {
  grid-column: 1 / -1;
}
@media (max-width: 720px) {
  .pdf-closing-settings__qr-grid {
    grid-template-columns: 1fr;
  }
  .pdf-closing-settings__qr-url {
    grid-column: auto;
  }
}
.pdf-closing-settings__pane-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding-top: 0.25rem;
}
.pdf-closing-settings__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  padding: 0.85rem 0 0.15rem;
  margin-top: 0.35rem;
  border-top: 1px solid var(--border, #e5e7eb);
}
.pdf-closing-settings .rte-editor {
  min-height: 12rem;
  max-height: min(26rem, 46vh);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.pdf-closing-settings .form-row {
  margin-bottom: 0;
}
.pdf-closing-settings .rte-head {
  margin-bottom: 0.35rem;
}
.pdf-closing-settings .rte-actions {
  margin-top: 0.25rem;
}

.itv-pdf-field--notes {
  margin-bottom: 0;
}
.itv-pdf-notes-inp {
  font-size: 0.72rem;
  line-height: 1.35;
  min-height: 4.65rem;
  resize: vertical;
}
.itv-pdf-cover-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.itv-pdf-cover-file {
  flex: 1;
  min-width: 0;
  max-width: calc(100% - 2.1rem);
}
.itv-pdf-clear-cover-btn {
  flex-shrink: 0;
  width: 1.75rem;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  line-height: 1;
  font-size: 1rem;
}
.itv-pdf-cover-ok {
  display: none;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  line-height: 1.75rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1f7a4d;
  border: 1px solid #b8dfc8;
  border-radius: 6px;
  background: #eef8f1;
}
.itv-pdf-cover-ok.is-on {
  display: block;
}
.itv-pdf-sidebar-divider {
  border-top: 1px solid #e8e4de;
  margin: 0.55rem 0 0.35rem;
}
.itv-pdf-field--row {
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
}
.itv-pdf-field--row input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}
.itv-pdf-sidebar input[type="checkbox"] {
  accent-color: var(--brand-green-dim);
}
.itv-pdf-quot-variants {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  margin: 0.08rem 0 0.35rem;
}
.itv-pdf-quot-variant {
  margin-bottom: 0;
  font-size: 0.76rem;
  cursor: pointer;
}
.itv-pdf-quot-variant.itv-pdf-field--row {
  gap: 0.45rem;
}
.itv-pdf-quot-variant--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.itv-pdf-quot-options-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.15rem 0 0.28rem;
}
.itv-pdf-quot-options-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #4a4a52;
}
.itv-pdf-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  border: 1px solid #c5bdb3;
  background: #fff;
  color: #7a7268;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  flex-shrink: 0;
}
.itv-pdf-quot-preview {
  margin: 0.25rem 0 0;
  line-height: 1.35;
}
.itv-pdf-main {
  min-width: 0;
}

.traveldocs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #f8f7f4;
}
.traveldocs-generate-status {
  font-style: italic;
}
.traveldocs-generate-status.is-warn { color: #b07a17; font-style: normal; }
.traveldocs-generate-status.is-error { color: #b13a3a; font-style: normal; }
.traveldocs-generate-status.is-ok { color: #1f7a4d; font-style: normal; }
.traveldocs-hint {
  flex: 1 1 100%;
  margin: 0;
  line-height: 1.35;
}

.itv-pdf-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 0.45rem;
}

.itv-pdf-subtab {
  appearance: none;
  background: #f3f1ee;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.32rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #4a4a52;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.itv-pdf-subtab:hover {
  background: #ebe7e2;
}
.itv-pdf-subtab.is-active {
  background: #0f4c5c;
  color: #fff;
  border-color: #0f4c5c;
}

.itv-pdf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
}

.itv-pdf-toolbar-spacer {
  flex: 1 1 auto;
}

.itv-pdf-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #5a5a5a;
}
.itv-pdf-lang select.select-sm {
  font-size: 0.78rem;
  padding: 0.18rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  background: #fff;
}

.itv-pdf-status {
  font-size: 0.74rem;
  color: #6a6a72;
  font-style: italic;
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.itv-pdf-status.is-warn { color: #b07a17; font-style: normal; }
.itv-pdf-status.is-error { color: #b13a3a; font-style: normal; }
.itv-pdf-status.is-ok { color: #1f7a4d; font-style: normal; }

.itv-pdf-archive-status {
  display: block;
  width: 100%;
  margin: -0.35rem 0 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: #f6f7f8;
  border: 1px solid var(--panel-border, #e2e2e8);
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: normal;
}
.itv-pdf-archive-status.is-warn {
  color: #8a5a00;
  background: #fff8ea;
  border-color: #e8c878;
}
.itv-pdf-archive-status.is-error {
  color: #8f2f2f;
  background: #fff0f0;
  border-color: #e8a0a0;
}
.itv-pdf-archive-status.is-ok {
  color: #1f7a4d;
  background: #eef8f1;
  border-color: #9fd4b3;
}

.itv-pdf-hint {
  max-width: 28rem;
  line-height: 1.35;
}

.itv-pdf-preview-wrap[hidden] {
  display: none !important;
}

.itv-pdf-frame {
  position: relative;
  display: block;
  width: 100%;
  min-height: 72vh;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: #fafaf7;
  box-shadow: inset 0 0 0 1px rgba(65, 50, 37, 0.04);
  overflow: hidden;
}

.itv-pdf-embed {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
  background: #fff;
}

.itv-pdf-fallback {
  position: absolute;
  bottom: 8px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.55rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  font-size: 0.72rem;
  color: #5a5a5a;
  pointer-events: auto;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.itv-pdf-fallback-link {
  color: #0f4c5c;
  font-weight: 600;
  text-decoration: underline;
  word-break: break-all;
}

.itv-pdf-multi {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.itv-pdf-multi-col {
  display: flex;
  flex-direction: column;
}
.itv-pdf-multi-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6a6a72;
  margin-bottom: 0.3rem;
}
.itv-pdf-frame--multi {
  min-height: 60vh;
}

@media (max-width: 900px) {
  .itv-pdf-multi {
    grid-template-columns: 1fr;
  }
  .itv-pdf-frame--multi {
    min-height: 48vh;
  }
}

.itv-tab-placeholder {
  padding: 0.5rem 0;
}

[data-del-sgh].icon-btn {
  font-size: 70%;
  line-height: 0;
}

[data-del-sgh].icon-btn .icon-trash {
  display: block;
}

.sgh-table {
  table-layout: fixed;
  width: 100%;
}

.sgh-table th:nth-child(1),
.sgh-table td:nth-child(1) {
  width: 16%;
}
.sgh-table th:nth-child(2),
.sgh-table td:nth-child(2) {
  width: 26%;
}
.sgh-table th:nth-child(3),
.sgh-table td:nth-child(3) {
  width: 11%;
}
.sgh-table th:nth-child(4),
.sgh-table td:nth-child(4) {
  width: 11%;
}
.sgh-table th:nth-child(5),
.sgh-table td:nth-child(5) {
  width: 11%;
}
.sgh-table th:nth-child(6),
.sgh-table td:nth-child(6) {
  width: 13%;
}
.sgh-table th:nth-child(7),
.sgh-table td:nth-child(7) {
  width: 12%;
  text-align: right;
}

.sgh-usd {
  font-size: 0.85em;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.sgh-row:hover td {
  font-weight: 700;
}

[data-del-sgh].icon-btn:hover {
  color: #d22;
}

.dt-daytour-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  background: rgba(247, 251, 255, 0.72);
  border: 1px solid #dbe6f2;
  border-radius: 10px;
  padding: 0.42rem 0.52rem;
}

.dt-country-nav {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: rgba(247, 251, 255, 0.72);
  border: 1px solid #dbe6f2;
  border-radius: 10px;
  padding: 0.45rem 0.52rem;
}

.dt-country-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dt-country-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--panel-muted);
}

.dt-country-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.dt-country-btn {
  border-radius: 8px;
  border-color: #c9d8eb;
  background: #ffffff;
}

.dt-country-btn.is-active {
  background: #edf5ff;
  border-color: #91afd5;
  color: #23476f;
}

.dt-daytour-toolbar .filter-contact {
  flex: 1 1 12rem;
  min-width: 10rem;
  border-color: #cfd9e6;
  border-radius: 8px;
  background: #ffffff;
}

.dt-lang-flags {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.dt-lang-btn {
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.22rem 0.4rem;
  min-width: 2.1rem;
  border: 1px solid #cad9ec;
  border-radius: 8px;
  background: #ffffff;
}

.dt-lang-btn.is-active {
  background: #edf4ff;
  border-color: #93b0d4;
}

.panel-header--daytour-list {
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}

.panel-header__daytour-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  width: 100%;
}

.daytour-list-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.daytour-list-tools .filter-contact {
  flex: 1 1 12rem;
  min-width: 10rem;
  border-color: #cfd9e6;
  border-radius: 8px;
  background: #ffffff;
}

.dt-table {
  table-layout: fixed;
  width: 100%;
}

.dt-table thead th {
  background: #f4f8ff;
  color: #4f6078;
  border-bottom: 1px solid #d8e3f1;
}

.dt-table tbody td {
  border-bottom-color: #e6edf7;
}

.dt-table.dt-table--with-ticket th:nth-child(1),
.dt-table.dt-table--with-ticket td:nth-child(1),
.dt-table.dt-table--with-ticket th:nth-child(2),
.dt-table.dt-table--with-ticket td:nth-child(2) {
  width: 12%;
}

.dt-table.dt-table--with-ticket th:nth-child(3),
.dt-table.dt-table--with-ticket td:nth-child(3) {
  width: auto;
  min-width: 0;
  max-width: 34%;
}

.dt-table.dt-table--with-ticket th:nth-child(4),
.dt-table.dt-table--with-ticket td:nth-child(4) {
  width: 7rem;
  text-align: left;
}

.dt-table.dt-table--with-ticket th:nth-child(5),
.dt-table.dt-table--with-ticket td:nth-child(5) {
  width: 20%;
}

.dt-table.dt-table--with-ticket th:nth-child(6),
.dt-table.dt-table--with-ticket td:nth-child(6) {
  width: 10%;
  text-align: right;
}

.dt-table.dt-table--no-ticket th:nth-child(1),
.dt-table.dt-table--no-ticket td:nth-child(1),
.dt-table.dt-table--no-ticket th:nth-child(2),
.dt-table.dt-table--no-ticket td:nth-child(2) {
  width: 14%;
}

.dt-table.dt-table--no-ticket th:nth-child(3),
.dt-table.dt-table--no-ticket td:nth-child(3) {
  width: auto;
  min-width: 0;
  max-width: 48%;
}

.dt-table.dt-table--no-ticket th:nth-child(4),
.dt-table.dt-table--no-ticket td:nth-child(4) {
  width: 7rem;
  text-align: left;
}

.dt-table.dt-table--no-ticket th:nth-child(5),
.dt-table.dt-table--no-ticket td:nth-child(5) {
  width: 10%;
  text-align: right;
}

.dt-th-photos {
  width: 7rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  text-align: left;
}

.dt-photos-cell {
  vertical-align: middle;
  text-align: left;
  white-space: nowrap;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  line-height: 0;
}

.dt-photo-mini-stack {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  line-height: 0;
}

.dt-photo-mini-stack--empty {
  min-height: 0.5rem;
}

.dt-photo-mini {
  display: inline-flex;
  line-height: 0;
  vertical-align: middle;
  flex-shrink: 0;
}

.dt-photo-mini:nth-child(1) {
  color: #1e6bba;
}

.dt-photo-mini:nth-child(2) {
  color: #7c3aed;
}

.dt-photo-mini:nth-child(3) {
  color: #0f766e;
}

.dt-row:hover .dt-photo-mini:nth-child(1) {
  color: #155a94;
}

.dt-row:hover .dt-photo-mini:nth-child(2) {
  color: #5b21b6;
}

.dt-row:hover .dt-photo-mini:nth-child(3) {
  color: #0d5c56;
}

.dt-photo-mini__svg {
  display: block;
  width: 27px;
  height: 27px;
}

.dt-row {
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.dt-row:hover {
  background: #f7fbff;
}

.dt-row:hover td {
  font-weight: 600;
}

.dt-row:focus-visible {
  outline: 2px solid rgba(126, 166, 217, 0.45);
  outline-offset: -2px;
}

@media (max-width: 900px) {
  .dt-daytour-toolbar {
    gap: 0.45rem;
    padding: 0.36rem 0.42rem;
  }

  .dt-daytour-toolbar .filter-contact {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
  }

  .daytour-list-tools .filter-contact {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
  }

  .dt-table {
    table-layout: auto;
  }
}

.catalogs-page {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.catalogs-split {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 0.65rem;
}

.catalogs-col {
  min-width: 0;
}

.catalogs-col--list .tg-lang-heading {
  margin: 0;
  padding: 0.5rem 0.75rem 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--panel-muted);
  border-bottom: 1px solid var(--panel-border);
}

.catalogs-col--days .tg-lang-heading {
  margin: 0;
  padding: 0.5rem 0.75rem 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--panel-muted);
  border-bottom: 1px solid var(--panel-border);
}

.catalogs-table {
  table-layout: fixed;
  width: 100%;
}

.catalogs-table th:nth-child(1),
.catalogs-table td:nth-child(1) {
  width: 9%;
}

.catalogs-table th:nth-child(2),
.catalogs-table td:nth-child(2) {
  width: 12%;
  text-align: left;
}

.catalogs-table th:nth-child(3),
.catalogs-table td:nth-child(3) {
  width: 28%;
}

.catalogs-table th:nth-child(4),
.catalogs-table td:nth-child(4) {
  width: 24%;
}

.catalogs-table th:nth-child(5),
.catalogs-table td:nth-child(5) {
  width: 8%;
  text-align: center;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.catalogs-table th:nth-child(6),
.catalogs-table td:nth-child(6) {
  width: 19%;
  text-align: right;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.catalog-row {
  cursor: pointer;
}

.catalog-row.is-active {
  background: rgba(59, 130, 246, 0.1);
}

.catalog-row:hover td {
  font-weight: 700;
}

/* Step 4 UI polish (Catalog list + Tour days) */
.catalogs-page .panel.panel--compact.reqd-panel--tourmenu {
  border-color: #dce4ef;
  box-shadow: 0 10px 22px rgba(23, 40, 74, 0.06);
}

.catalogs-page .panel-header {
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.95) 0%, rgba(246, 250, 255, 0.95) 100%);
  border-bottom-color: #d9e3f0;
}

.catalogs-page .dt-country-nav {
  background: rgba(247, 251, 255, 0.7);
  border: 1px solid #dbe6f2;
  border-radius: 10px;
  padding: 0.45rem 0.5rem;
}

.catalogs-page .dt-country-btn {
  border-radius: 8px;
  border-color: #c9d8eb;
  background: #ffffff;
}

.catalogs-page .dt-country-btn.is-active {
  background: #edf5ff;
  border-color: #91afd5;
}

.catalogs-page .dt-daytour-toolbar {
  gap: 0.52rem;
}

.catalogs-page .dt-daytour-toolbar .filter-contact {
  border-color: #cfd9e6;
  border-radius: 8px;
}

/* Catalogs / Day tours search — wide field; beat .filter-contact / dense caps */
.catalogs-page label.rq-main-search-wrap.catalogs-search-wrap,
.daytour-page label.rq-main-search-wrap.catalogs-search-wrap,
.daytour-page label.rq-main-search-wrap.daytour-search-wrap {
  flex: 1 1 84rem !important;
  width: 84rem !important;
  max-width: 100% !important;
  min-width: 42rem !important;
}

.catalogs-page .catalogs-search-wrap .filter-contact,
.catalogs-page .catalogs-search-wrap #catalog-filter-search,
.catalogs-page .catalogs-search-wrap .rq-main-search,
.daytour-page .daytour-search-wrap .filter-contact,
.daytour-page .daytour-search-wrap #daytour-filter-city,
.daytour-page .daytour-search-wrap .rq-main-search {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: 1 1 auto !important;
  box-sizing: border-box !important;
}

.catalogs-page .dt-lang-btn {
  border: 1px solid #cad9ec;
  border-radius: 8px;
  background: #ffffff;
}

.catalogs-page .dt-lang-btn.is-active {
  background: #edf4ff;
  border-color: #93b0d4;
}

.catalogs-col {
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  background: #f9fbff;
  overflow: hidden;
}

.catalogs-col .table-wrap {
  background: #ffffff;
}

.catalog-inline-preview {
  margin-top: 0.4rem;
  width: 100%;
  max-width: 220px;
  max-height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
}

.catalog-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.45rem 0.8rem;
  padding: 0.55rem 0.8rem;
}

.catalog-detail-body {
  padding: 0.55rem 0.8rem 0.8rem;
}

.catalog-cover-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.catalog-cover-card {
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 0.55rem;
}

.catalog-cover-card--full {
  grid-column: 1 / -1;
}

.catalog-cover-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 8px;
}

.catalog-summary-block {
  margin-top: 0.4rem;
}

.catalog-tour-split {
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 0.7rem;
}

.catalog-tour-days {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.catalog-day-btn.is-active {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.38);
  color: #1e40af;
}

.catalog-tour-content {
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 0.65rem;
  min-height: 8rem;
  background: var(--panel-input-bg);
}

.catalog-notes-wrap {
  max-width: 60rem;
}

.catalogs-col--list .tg-lang-heading,
.catalogs-col--days .tg-lang-heading {
  background: linear-gradient(180deg, rgba(245, 250, 255, 0.95) 0%, rgba(239, 246, 255, 0.95) 100%);
  border-bottom-color: #d7e3f1;
  color: #4a5d78;
}

.catalogs-table thead th {
  background: #f4f8ff;
  color: #4f6078;
  border-bottom: 1px solid #d8e3f1;
}

.catalogs-table tbody td {
  border-bottom-color: #e6edf7;
}

.catalog-row {
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.catalog-row:hover {
  background: #f7fbff;
}

.catalog-row:hover td {
  font-weight: 600;
}

.catalog-row.is-active {
  background: rgba(126, 166, 217, 0.14);
  box-shadow: inset 0 0 0 1px rgba(126, 166, 217, 0.24);
}

.catalogs-col .icon-btn {
  border-radius: 8px;
}

.catalogs-col .icon-btn:hover {
  background: #edf4ff;
  color: #314b6e;
}

@media (max-width: 1100px) {
  .catalogs-split {
    grid-template-columns: 1fr;
  }

  .catalogs-col--days {
    order: 2;
  }
}

/* Step 1 UI foundation (scoped to catalog detail only) */
.catalog-detail-editor {
  background: linear-gradient(180deg, #fbfcff 0%, #f7f9fc 100%);
  border-color: #dce4ef;
  box-shadow: 0 14px 30px rgba(23, 40, 74, 0.08);
}

.catalog-detail-editor .panel-header {
  border-bottom: 1px solid #d7e0ec;
  padding-top: 0.52rem;
  padding-bottom: 0.52rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(4px);
}

.catalog-detail-editor .panel-title {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: #1f2a3d;
}

.catalog-detail-editor .btn.btn-compact {
  border-radius: 8px;
}

.catalog-detail-editor .btn.btn-sm.btn-ghost.btn-compact {
  background: #f3f7fc;
  border-color: #cad8ea;
  color: #2c4466;
  font-weight: 600;
}

.catalog-detail-editor .btn.btn-sm.btn-ghost.btn-compact:hover {
  background: #eaf1fb;
  border-color: #b5c9e2;
}

.catalog-detail-editor .btn.btn-sm.btn-primary.btn-compact {
  background: linear-gradient(135deg, #8fc06a, #7ead5a);
  border-color: #6e9a50;
  color: #1f2f14;
  font-weight: 700;
}

.catalog-detail-editor .inp-compact,
.catalog-detail-editor .ce-inp,
.catalog-detail-editor .rte-editor {
  border-color: #cfd9e6;
  border-radius: 8px;
  background: #ffffff;
}

.catalog-country-editor {
  margin-top: 4px;
}
.catalog-country-group + .catalog-country-group {
  margin-top: 8px;
}
.catalog-country-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}
.catalog-country-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.catalog-country-chk {
  font-size: 0.78rem;
  white-space: nowrap;
}
.catalog-kv-row--countries .catalog-country-editor {
  max-width: 100%;
}

.catalog-combo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 0 0.5rem 0.35rem;
}
.catalog-combo-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.catalog-combo-chip.is-active {
  border-color: #7ea6d9;
  background: #eef4fb;
  color: #1e3a5f;
}
.catalog-detail-editor .inp-compact:focus,
.catalog-detail-editor .ce-inp:focus,
.catalog-detail-editor .rte-editor:focus {
  border-color: #7ea6d9;
  box-shadow: 0 0 0 2px rgba(126, 166, 217, 0.18);
}

.catalog-detail-editor .catalog-row-50 {
  padding: 0.58rem 0.82rem;
  gap: 1rem;
}

.catalog-detail-editor .rte-head {
  margin-bottom: 0.36rem;
}

.catalog-detail-editor .rte-toolbar {
  gap: 0.26rem;
}

.catalog-detail-editor .rte-toolbar .btn {
  min-height: 1.45rem;
  padding: 0.12rem 0.4rem;
  border-radius: 7px;
  border-color: #c7d5e7;
  background: #f8fbff;
}

.catalog-detail-editor .rte-toolbar .btn:hover {
  background: #edf4fd;
  border-color: #adc2de;
}

.catalog-row-50 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  padding: 0.45rem 0.7rem;
}

.catalog-row-50--days {
  border-top: 1px solid var(--panel-border);
  margin-top: 0.25rem;
}

.catalog-kv-row {
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.24rem;
}

.catalog-kv-row > label {
  text-align: right;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--panel-muted);
}

.catalog-col-left .catalog-kv-row > div {
  font-size: 0.76rem;
}

.catalog-col-left .catalog-kv-row {
  grid-template-columns: 6.8rem 1fr;
  gap: 0.45rem;
}

.catalog-col-left .catalog-kv-row > label {
  text-align: left;
  justify-self: start;
}

.catalog-col-left .catalog-kv-row .inp-compact {
  min-height: 1.5rem;
  padding-top: 0.12rem;
  padding-bottom: 0.12rem;
}

.catalog-kv-row--editable select.inp-compact {
  width: 100%;
  max-width: 100%;
  border-color: color-mix(in srgb, var(--accent, #0f4c5c) 35%, var(--border));
  background: #fff;
  cursor: pointer;
}

.catalog-endpoint-hint {
  margin: 0.2rem 0 0;
  line-height: 1.25;
}

#cat-detail-notes,
#cat-detail-flights {
  width: 100%;
  max-width: 100%;
}

.catalog-col-right .catalog-kv-row {
  grid-template-columns: 5.8rem 1fr;
  gap: 0.35rem;
}

.catalog-col-right .catalog-kv-row > label {
  text-align: left;
  justify-self: start;
  font-weight: 700;
}

.catalog-summary-editor-wrap .rte-label {
  font-size: 0.73rem;
  font-weight: 700;
  text-align: left;
}

.catalog-summary-editor-wrap .rte-head {
  grid-template-columns: 5.8rem 1fr auto;
  column-gap: 0.35rem;
}

#cat-detail-header-title {
  width: 100%;
  max-width: 100%;
  font-size: 0.74rem;
  padding-top: 0.1rem;
  padding-bottom: 0.1rem;
}

.catalog-kv-row--photos {
  align-items: start;
}

.catalog-photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.catalog-photo-slot-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.catalog-photo-slot-label {
  font-size: 0.7rem;
  color: var(--panel-muted);
}

.catalog-photo-slot {
  width: 72px;
  height: 56px;
  border: 1px dashed rgba(65, 50, 37, 0.28);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
  position: relative;
}

.catalog-photo-slot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-photo-clear {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  line-height: 1;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.catalog-day-list-col {
  border-right: 1px solid #d7e1ee;
  padding-right: 0.78rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(247, 250, 255, 0.68) 100%);
  border-radius: 10px;
}

.catalog-day-line {
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  padding: 0.35rem 0.42rem;
  margin-bottom: 0.32rem;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  background: #ffffff;
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.catalog-day-line:hover {
  border-color: #b8cce6;
  background: #f7faff;
}

.catalog-day-line.is-active {
  border-color: #7ea6d9;
  background: rgba(126, 166, 217, 0.13);
  box-shadow: inset 0 0 0 1px rgba(126, 166, 217, 0.2);
}

.catalog-day-line-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #355176;
}

.catalog-day-line-subtitle {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: #4b5563;
  line-height: 1.25;
  max-width: 11rem;
  white-space: normal;
}

.catalog-day-pick-btn {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
}

.catalog-day-line-fields {
  display: grid;
  grid-template-columns: 0.4fr 1.6fr;
  gap: 0.28rem;
}

.catalog-day-line-fields .ce-inp {
  min-height: 1.45rem;
  padding-top: 0.1rem;
  padding-bottom: 0.1rem;
  font-size: 0.74rem;
}

.catalog-day-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
}

.catalog-day-list-head > strong {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4d5d75;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.catalog-lang-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  margin-right: auto;
  min-width: 1.7rem;
  height: 1.25rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  border: 1px solid transparent;
}

.catalog-lang-badge--it {
  color: #14532d;
  background: #dcfce7;
  border-color: #86efac;
}

.catalog-lang-badge--en {
  color: #1e3a8a;
  background: #dbeafe;
  border-color: #93c5fd;
}

.catalog-lang-flags {
  gap: 0.4rem;
}

.catalog-lang-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.28rem;
  min-width: 3.1rem !important;
  padding: 0.28rem 0.55rem !important;
  opacity: 0.55;
  filter: grayscale(0.35);
  background: #f3f4f6 !important;
  border: 1px solid #d1d5db !important;
  color: #6b7280 !important;
  box-shadow: none !important;
}

.catalog-lang-btn__flag {
  font-size: 1rem;
  line-height: 1;
}

.catalog-lang-btn__code {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.catalog-lang-btn.is-active {
  opacity: 1;
  filter: none;
  font-weight: 700;
}

.catalog-lang-btn.is-active.is-lang-it {
  background: #dcfce7 !important;
  border-color: #16a34a !important;
  color: #14532d !important;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25) !important;
}

.catalog-lang-btn.is-active.is-lang-en {
  background: #dbeafe !important;
  border-color: #2563eb !important;
  color: #1e3a8a !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25) !important;
}

.catalogs-page .catalog-lang-btn.is-active,
.catalog-detail-head-actions .catalog-lang-btn.is-active {
  background: inherit;
}

.catalog-day-list-fixed {
  height: 440px;
  min-height: 440px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.catalog-detail-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  margin-left: auto;
  background: rgba(245, 249, 255, 0.95);
  border: 1px solid #d6e2f0;
  border-radius: 10px;
  padding: 0.18rem 0.28rem;
}

.catalog-detail-head-actions .dt-lang-btn {
  border: 1px solid #cddbed;
  border-radius: 8px;
  background: #ffffff;
}

.catalog-detail-head-actions .dt-lang-btn.is-active {
  border-color: #93b0d4;
  background: #edf4ff;
  box-shadow: inset 0 0 0 1px rgba(147, 176, 212, 0.2);
}

.catalog-detail-editor .panel-header,
.catalog-detail-editor .catalog-row-50,
.catalog-detail-editor .catalog-day-line,
.catalog-detail-editor .btn,
.catalog-detail-editor .dt-lang-btn,
.catalog-detail-editor .catalog-save-badge {
  transition: all 0.18s ease;
}

.catalog-save-badge {
  display: inline-flex;
  align-items: center;
  height: 1.5rem;
  padding: 0 0.42rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.catalog-save-badge.is-saved {
  background: rgba(52, 168, 83, 0.14);
  color: #165f31;
}

.catalog-save-badge.is-unsaved {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}

.catalog-day-desc-col .rte-editor,
.catalog-day-desc-col .dtm-desc-input {
  min-height: 13.2rem;
}

.catalog-day-desc-col .rte-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4d5d75;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.catalog-row-50--days {
  min-height: 440px;
}

@media (max-width: 1200px) {
  .catalog-detail-editor .catalog-row-50 {
    gap: 0.75rem;
    padding: 0.52rem 0.66rem;
  }

  .catalog-col-left .catalog-kv-row {
    grid-template-columns: 6.2rem 1fr;
  }

  .catalog-col-right .catalog-kv-row {
    grid-template-columns: 5.2rem 1fr;
  }

  .catalog-summary-editor-wrap .rte-head {
    grid-template-columns: 5.2rem 1fr auto;
  }

  .catalog-day-line-fields {
    grid-template-columns: 0.5fr 1.5fr;
  }
}

@media (max-width: 900px) {
  .catalog-detail-editor .panel-header {
    align-items: flex-start;
    gap: 0.45rem;
  }

  .catalog-detail-head-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .catalog-detail-editor .catalog-row-50 {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .catalog-col-left .catalog-kv-row,
  .catalog-col-right .catalog-kv-row {
    grid-template-columns: 6.6rem 1fr;
  }

  .catalog-summary-editor-wrap .rte-head {
    grid-template-columns: 1fr;
    row-gap: 0.32rem;
  }

  .catalog-day-list-col {
    border-right: none;
    padding-right: 0;
    border-radius: 8px;
  }

  .catalog-day-list-fixed,
  .catalog-row-50--days {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .catalog-day-line-fields {
    grid-template-columns: 1fr;
  }

  .catalog-day-desc-col .rte-editor,
  .catalog-day-desc-col .dtm-desc-input {
    min-height: 10.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-detail-editor .panel-header,
  .catalog-detail-editor .catalog-row-50,
  .catalog-detail-editor .catalog-day-line,
  .catalog-detail-editor .btn,
  .catalog-detail-editor .dt-lang-btn,
  .catalog-detail-editor .catalog-save-badge {
    transition: none;
  }
}

.catalog-photo-hover-preview {
  position: fixed;
  z-index: 2200;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.12s ease, transform 0.12s ease;
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.catalog-photo-hover-preview.is-visible {
  opacity: 1;
  transform: scale(1);
}

.catalog-photo-hover-preview img {
  display: block;
  width: 300px;
  height: 210px;
  object-fit: cover;
  border-radius: 6px;
}

/* Suppliers page — same block pattern as Day Tours (toolbar / thead / regional lists) */
.suppliers-page {
  display: flex;
  flex-direction: column;
  --sup-block-gap: 0.75rem;
  gap: var(--sup-block-gap);
}

/* ~30% less space between regional title strip and the table below */
.suppliers-page .sup-region-strip + .reqd-panel {
  margin-top: calc(-0.3 * var(--sup-block-gap));
}

.suppliers-page > .reqd-panel--tourmenu:first-child {
  margin-top: 0;
}

.sup-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.sup-toolbar .select-compact {
  flex: 1 1 14rem;
  min-width: 12rem;
}

.sup-toolbar .btn {
  flex-shrink: 0;
  margin-left: auto;
}

.sup-region-strip {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #f0f0f0;
  box-shadow: var(--shadow);
  border: none;
}

.sup-region-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--panel-text);
}

.sup-table {
  table-layout: fixed;
  width: 100%;
}

.sup-logo-th {
  width: 2rem;
  max-width: 2rem;
  padding: 0.5rem 0.25rem 0.5rem 0;
  text-align: left;
  vertical-align: bottom;
}

.sup-logo-cell {
  width: 2rem;
  max-width: 2rem;
  padding: 0.35rem 0.35rem 0.35rem 0;
  vertical-align: middle;
  text-align: left;
}

.sup-logo {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  border-radius: 4px;
  object-fit: cover;
  background: rgba(65, 50, 37, 0.06);
}

.sup-table th:nth-child(1),
.sup-table td:nth-child(1) {
  width: 6.5%;
}
.sup-table th:nth-child(2),
.sup-table td:nth-child(2) {
  width: 11%;
}
.sup-table th:nth-child(3),
.sup-table td:nth-child(3) {
  width: 2.5%;
}
.sup-table th:nth-child(4),
.sup-table td:nth-child(4) {
  width: 20.5%;
}
.sup-table th:nth-child(5),
.sup-table td:nth-child(5) {
  width: 12%;
}
.sup-table th:nth-child(6),
.sup-table td:nth-child(6) {
  width: 20%;
}
.sup-table th:nth-child(7),
.sup-table td:nth-child(7) {
  width: 19%;
}
.sup-table th:nth-child(8),
.sup-table td:nth-child(8) {
  width: 8%;
}

.sup-row {
  cursor: pointer;
}

.sup-row:hover td {
  font-weight: 700;
}

[data-del-act].icon-btn {
  font-size: 70%;
  line-height: 0;
}

[data-del-act].icon-btn .icon-trash {
  display: block;
}

[data-del-act].icon-btn:hover {
  color: #d22;
}

/* Day tour edit modal */
.dtm-root .dtm-block {
  margin-bottom: 0.35rem;
}

.dtm-root .newreq-block > .subhead-compact.newreq-section-title {
  margin-bottom: 0.65rem;
}

.dtm-sgh-sum-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dtm-sgh-sum-wrap .dtm-sum-readonly {
  flex: 1;
  min-width: 0;
}

.dtm-sgh-usd-suffix {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.dtm-route-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  align-items: start;
}

.dtm-details-block .dtm-details-row1 {
  margin-bottom: 4px;
}

.dtm-details-row1 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 0.85rem;
  align-items: start;
}

.dtm-details-row2 {
  display: grid;
  grid-template-columns:
    minmax(0, 9.25rem)
    minmax(0, 12rem)
    minmax(0, 9.25rem)
    minmax(0, 12rem)
    minmax(8.25rem, 10.75rem);
  gap: 0.6rem 0.5rem;
  align-items: end;
}

.dtm-details-row2-photos {
  min-width: 0;
  align-self: end;
  justify-self: end;
}

.dtm-details-row2-photos .dtm-photo-inline-wrap {
  width: 100%;
  max-width: 10.75rem;
}

.dtm-detail-route-field .inp-compact {
  max-width: 11.2rem;
  width: 100%;
  box-sizing: border-box;
}

.dtm-photo-inline-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  min-width: 0;
  align-self: end;
}

@media (max-width: 960px) {
  .dtm-route-3 {
    grid-template-columns: 1fr;
  }
  .dtm-details-row1 {
    grid-template-columns: 1fr;
  }
  .dtm-details-row2 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .dtm-details-row2-photos {
    grid-column: 1 / -1;
    justify-self: stretch;
    max-width: none;
  }
  .dtm-details-row2-photos .dtm-photo-inline-wrap {
    max-width: 10.5rem;
    margin-left: 0;
  }
  .dtm-detail-route-field .inp-compact {
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .dtm-details-row2 {
    grid-template-columns: 1fr;
  }
  .dtm-details-row2-photos {
    grid-column: 1;
    justify-self: stretch;
  }
  .dtm-details-row2-photos .dtm-photo-inline-wrap {
    max-width: 100%;
  }
  .dtm-photo-inline-wrap {
    max-width: 100%;
  }
}

/* Day tour modal — photo slots (3) */
.dtm-photo-hint {
  margin: 0 0 0.65rem;
}

.dtm-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
  align-items: start;
}

@media (max-width: 720px) {
  .dtm-photo-grid {
    grid-template-columns: 1fr;
  }
}

/* Inline row (Details): evitare catena min-height:0 + max-height:100% che collassa l’altezza dell’img */
.dtm-photo-inline-wrap .dtm-photo-slot {
  max-width: 100%;
  min-width: 0;
  min-height: 4.85rem;
  aspect-ratio: 1;
  align-self: start;
}

.dtm-photo-inline-wrap .dtm-photo-thumb {
  min-height: 4.5rem;
  height: 100%;
  padding: 0.2rem;
  box-sizing: border-box;
}

.dtm-photo-inline-wrap .dtm-photo-thumb-inner {
  min-height: 4rem;
  height: 100%;
}

.dtm-photo-inline-wrap .dtm-photo-thumb-img {
  max-width: 100%;
  max-height: 4.75rem;
  min-height: 2.25rem;
  width: auto;
  height: auto;
  object-fit: contain;
}

.dtm-photo-slot {
  position: relative;
  border: 1px dashed rgba(100, 120, 150, 0.45);
  border-radius: 10px;
  background: var(--panel-input-bg, #f8fafc);
  min-height: 5.2rem;
  overflow: visible;
}

.dtm-photo-slot--filled {
  border-style: solid;
  border-color: #bfcee3;
  background: #ffffff;
}

.dtm-photo-clear {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 4;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  margin: 0;
  line-height: 1;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #4a5f78;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(15, 30, 60, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.dtm-photo-slot--filled .dtm-photo-clear {
  opacity: 1;
  pointer-events: auto;
}

.dtm-photo-slot--filled:hover .dtm-photo-clear {
  color: #b42318;
  background: #fff5f5;
}

.dtm-photo-clear:focus-visible {
  outline: 2px solid rgba(126, 166, 217, 0.55);
  outline-offset: 1px;
  opacity: 1;
  pointer-events: auto;
}

.dtm-photo-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5.2rem;
  padding: 0.35rem;
  cursor: pointer;
  border-radius: 9px;
}

.dtm-photo-thumb-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 4.2rem;
}

.dtm-photo-placeholder {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  padding: 0.25rem;
}

.dtm-photo-thumb-img {
  display: block;
  max-width: 100%;
  max-height: 4.2rem;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

/* Thumbnail riempie lo slot così il pop si ancora al centro visivo della cella */
.dtm-photo-slot > .dtm-photo-thumb {
  width: 100%;
  box-sizing: border-box;
}

/* Sotto lo slot: in modal con overflow-y:auto un pop sopra (bottom:100%) viene ritagliato → striscia bianca */
.dtm-photo-hover-pop {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  bottom: auto;
  margin-left: auto;
  margin-right: auto;
  width: max-content;
  max-width: min(360px, 90vw);
  transform: none;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 35, 70, 0.2);
  border: 2px solid #ffffff;
  background: #ffffff;
}

.dtm-photo-hover-pop img {
  display: block;
  width: auto;
  max-width: min(360px, 90vw);
  height: auto;
  max-height: min(520px, 65vh);
  object-fit: contain;
  vertical-align: middle;
}

.dtm-photo-slot--filled:hover .dtm-photo-hover-pop {
  opacity: 1;
}

.dtm-loc-search-wrap {
  position: relative;
}

.dtm-loc-suggest {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  max-height: 210px;
  overflow-y: auto;
  background: var(--panel-input-bg, #fff);
  border: 1px solid rgba(65, 50, 37, 0.18);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  padding: 0.2rem 0;
}

.dtm-loc-suggest[hidden] {
  display: none !important;
}

.dtm-loc-pick {
  appearance: none;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 0.86rem;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  color: var(--text);
}

.dtm-loc-pick:hover {
  background: rgba(126, 173, 90, 0.12);
}

.dtm-inline-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
  align-items: start;
}

@media (max-width: 720px) {
  .dtm-inline-2 {
    grid-template-columns: 1fr;
  }
}

.dtm-desc-two-blocks {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 0.75rem 1rem;
  align-items: stretch;
}

.dtm-desc-two-blocks--single {
  grid-template-columns: minmax(0, 1fr);
}

.dtm-desc-block {
  margin-bottom: 0 !important;
}

.dtm-desc-block .form-row + .form-row {
  margin-top: 0.58rem;
}

@media (max-width: 900px) {
  .dtm-desc-two-blocks {
    grid-template-columns: 1fr;
  }
}

.dtm-subblock {
  margin-bottom: 0.75rem;
}

.dtm-subblock:last-child {
  margin-bottom: 0;
}

.dtm-desc-input {
  min-height: 5rem;
  resize: vertical;
}

.rte-toolbar {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.rte-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.rte-label.field-label {
  margin: 0;
}

.rte-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.translate-inline-msg {
  display: inline-block;
  font-size: 0.78rem;
  line-height: 1.2;
}

.translate-inline-msg[hidden] {
  display: none !important;
}

.translate-inline-msg.is-error {
  color: #b43a3a;
}

.translate-inline-msg.is-info {
  color: var(--muted);
}

@media (max-width: 900px) {
  .rte-head {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .rte-actions {
    justify-self: start;
  }
}

.rte-editor {
  min-height: 8.5rem;
  resize: vertical;
  line-height: 1.4;
  overflow: auto;
  white-space: normal;
  background: #ffffff;
  border: 1px solid rgba(65, 50, 37, 0.18);
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  box-sizing: border-box;
}

/* Day tour modal: description EN/IT ≈ 10 righe all’apertura; contenuto lungo scrolla; resize per alzare */
.dtm-root .dtm-desc-block .rte-editor {
  height: calc(1.4em * 10 + 1.1rem);
  min-height: calc(1.4em * 10 + 1.1rem);
  overflow-y: auto;
  resize: vertical;
}

.dtm-guide-textarea {
  min-height: 12rem;
  resize: vertical;
}

.dtm-gd-title-row {
  margin-bottom: 0.35rem;
}

.dtm-sightseeing-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 0.85rem 1rem;
  align-items: start;
}

.dtm-sgh-left {
  min-width: 0;
}

.dtm-sgh-city-filter {
  width: 100%;
  box-sizing: border-box;
}

.dtm-sgh-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.dtm-no-tickets-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  line-height: 1.35;
  cursor: pointer;
}

.dtm-no-tickets-opt input {
  margin-top: 0.15rem;
}

.dtm-no-tickets-hint {
  font-size: 0.78rem;
}

#dtm-ticket-pickers.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.dtm-sgh-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.65rem;
}

.dtm-sgh-col {
  min-width: 0;
}

.dtm-sgh-col .field-label {
  display: block;
  margin-bottom: 0.28rem;
}

.dtm-multi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.2rem;
}

.dtm-sgh-right {
  min-width: 0;
}

.dtm-sgh-sum-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dtm-sum-readonly {
  font-weight: 600;
  text-align: right;
  min-width: 7rem;
}

@media (max-width: 900px) {
  .dtm-sightseeing-row {
    grid-template-columns: 1fr;
  }
  .dtm-sgh-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .dtm-sgh-split {
    grid-template-columns: 1fr;
  }
}

.dtm-multiselect {
  width: 100%;
  min-height: 10.5rem;
  font-size: 0.82rem;
}

/* Day tour ticket lists: allinea cifre; "per person" ha prezzi all'inizio (xx - xx USD - …) */
.dtm-multiselect--per-person,
.dtm-multiselect--group {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.dtm-fees-slot .field-label {
  display: block;
  margin-bottom: 0.35rem;
}

.dtm-fees-slot select.inp-compact {
  width: 100%;
  box-sizing: border-box;
}

.dtm-inline-1-mobile {
  grid-template-columns: 1fr;
}

.dtm-fees-placeholder {
  min-height: 2.75rem;
  padding: 0.5rem 0.55rem;
  border: 1px dashed rgba(65, 50, 37, 0.2);
  border-radius: 6px;
  font-size: 0.86rem;
}

.newtour-modal .newtour-country-list {
  max-height: 180px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.newtour-modal .newreq-inline-2 .pick-det {
  margin: 0;
}

.newtour-modal .newtour-destination-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.newtour-modal .newtour-top-grid {
  grid-template-columns: 1fr 1fr;
}

.newtour-modal .newreq-col-side .newreq-inline-3 {
  margin-top: 0.65rem;
}

.newtour-modal .newtour-room-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
}
.newtour-modal .newtour-v1-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.newtour-modal .newtour-v1-col {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.65rem 0.7rem 0.7rem;
  background: #fff;
}
.newtour-modal .newtour-v1-col .newreq-section-title {
  margin-top: 0;
}
.newtour-modal .newtour-room-grid--v1 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.newtour-modal .newtour-tl-wrap {
  display: grid;
  gap: 0.45rem;
}
.newtour-modal .newtour-tl-toggle {
  font-weight: 500;
}
.newtour-modal .newtour-tl-fields {
  border-left: 2px solid #e5e7eb;
  padding-left: 0.65rem;
}
.newtour-modal .newtour-tl-fields.is-hidden {
  display: none;
}
.newtour-modal .newtour-tl-grid {
  display: grid;
  grid-template-columns: minmax(0, 10rem) minmax(0, 10rem);
  gap: 0.6rem;
}
.newtour-modal .newtour-tl-note {
  margin: 0.1rem 0 0;
}

@media (max-width: 1100px) {
  .newtour-modal .newtour-room-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .newtour-modal .newtour-v1-grid {
    grid-template-columns: 1fr;
  }
  .newtour-modal .newtour-room-grid--v1 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .newtour-modal .newtour-tl-grid {
    grid-template-columns: 1fr;
  }
}

.form-grid--compact {
  gap: 0.55rem;
}

/* Version settings — TL FOC (compact; fields only when enabled) */
.form-grid--compact .itv-ver-tl-foc-wrap {
  grid-column: 1 / -1;
}
.itv-ver-tl-foc-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.itv-ver-tl-foc-chk {
  font-weight: 500;
}
.itv-ver-tl-foc-extra {
  margin-top: 0.35rem;
  padding: 0.45rem 0 0 0.6rem;
  border-left: 2px solid #e5e7eb;
}
.itv-ver-tl-foc-extra.is-hidden {
  display: none;
}
.itv-ver-tl-foc-extra__grid {
  display: grid;
  grid-template-columns: minmax(0, 7rem) minmax(0, 7.5rem);
  gap: 0.5rem 1rem;
  align-items: end;
}
.itv-svc-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.75rem;
}

.itv-svc-panel__title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.itv-svc-panel__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.itv-svc-wrap {
  max-width: 100%;
}

.itv-svc-table th,
.itv-svc-table td {
  vertical-align: middle;
}

.itv-svc-row--ok {
  background: rgba(16, 185, 129, 0.1);
}

.itv-svc-row--pend {
  background: transparent;
}

.itv-svc-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.itv-svc-check input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: #0f766e;
  cursor: pointer;
}

.itv-svc-check-cell {
  white-space: nowrap;
}

.itv-svc-name strong {
  font-weight: 700;
}

.itv-svc-alarm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  margin: 0.55rem 0 0.15rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.88rem;
  line-height: 1.35;
}

.itv-svc-alarm__btn {
  margin-left: auto;
}

.itv-tab__warn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-left: 0.2rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.itv-ops-alarm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  margin: 0.35rem 0 0.15rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #f97316;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.88rem;
  line-height: 1.35;
}

.itv-ops-missing-arr {
  margin: 0 0 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.85rem;
}

.itv-ops-table th,
.itv-ops-table td {
  vertical-align: middle;
}

.itv-ops-row--ok {
  background: rgba(16, 185, 129, 0.1);
}

.itv-ops-row--over {
  background: rgba(220, 38, 38, 0.08);
}

.itv-ops-row--soon {
  background: rgba(245, 158, 11, 0.1);
}

.itv-ops-row--miss {
  background: rgba(148, 163, 184, 0.12);
}

button.urgency-item {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  padding: 14px 10px;
  margin: 10px 10px 0 0;
  background: #f0f0f0;
}

button.urgency-item:hover {
  background: #e7e7e7;
}

button.urgency-item--overdue {
  background: #fee2e2;
}

button.urgency-item--overdue:hover {
  background: #fecaca;
}

button.urgency-item--today {
  background: #ffedd5;
}

button.urgency-item--today:hover {
  background: #fed7aa;
}

.urgency-item--empty {
  cursor: default;
}

.urgency-sub {
  font-size: 0.75rem;
  color: var(--panel-muted);
  margin-top: 0.2rem;
  font-weight: 400;
}

.ui-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  font-size: 0.82rem;
}

.ui-switch__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.ui-switch__track {
  position: relative;
  width: 2.1rem;
  height: 1.2rem;
  border-radius: 999px;
  background: #cbd5e1;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.ui-switch__thumb {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
  transition: transform 0.15s ease;
}

.ui-switch.is-on .ui-switch__track,
.ui-switch__input:checked + .ui-switch__track {
  background: #0f766e;
}

.ui-switch.is-on .ui-switch__thumb,
.ui-switch__input:checked + .ui-switch__track .ui-switch__thumb {
  transform: translateX(0.9rem);
}

.ui-switch__text {
  color: var(--panel-text);
  font-weight: 500;
}


.itv-sup-tour-code-field input {
  display: block;
  width: 100%;
  margin-top: 0.2rem;
}

.field-label.field-label--dense {
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: #64748b;
}
.inp-compact.inp-compact--full {
  width: 100%;
  min-width: 0;
}
.itv-ver-tl-foc-extra__note {
  margin: 0.35rem 0 0;
  line-height: 1.35;
}
.itv-quot-tl-note__cell {
  padding-top: 0.4rem;
  border-top: 1px solid #e5e7eb;
}

.toolbar--wrap {
  flex-wrap: wrap;
}

.grid-stats--compact .stat-card {
  padding: 0.65rem 0.85rem;
}

.grid-stats--compact .stat-value {
  font-size: 1.35rem;
}

html[data-density="dense"] .topbar {
  padding: 0.55rem 0.8rem;
}

html[data-density="dense"] .page-title {
  font-size: 1.16rem;
}

html[data-density="dense"] .urgencies-rail {
  padding: 0.5rem 0.48rem;
}

html[data-density="dense"] .view-root {
  padding: 0.5rem 0.7rem 0.7rem;
}

html[data-density="dense"] .grid-stats {
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

html[data-density="dense"] .stat-card {
  padding: 0.5rem 0.62rem;
}

html[data-density="dense"] .stat-value {
  font-size: 1.2rem;
}

html[data-density="dense"] .panel-header,
html[data-density="dense"] .panel-header--compact {
  padding: 0.4rem 0.55rem;
}

html[data-density="dense"] table.data th,
html[data-density="dense"] table.data td {
  padding: 0.32rem 0.45rem;
}

html[data-density="dense"] .data--compact th,
html[data-density="dense"] .data--compact td {
  padding: 0.26rem 0.35rem;
  font-size: 0.78rem;
}

html[data-density="dense"] .filters-row {
  padding: 0.26rem 0.42rem;
  gap: 0.35rem;
}

html[data-density="dense"] .filter-contact {
  min-width: 145px;
  width: 180px;
}

html[data-density="dense"] .btn {
  padding: 0.24rem 0.5rem;
}

html[data-density="dense"] .btn-sm,
html[data-density="dense"] .btn-compact {
  padding: 0.14rem 0.32rem;
  font-size: 0.72rem;
}

html[data-density="dense"] #density-badge.topbar-toggle-chip {
  font-size: 0.68rem;
  padding: 0.28rem 0.38rem;
}

html[data-density="dense"] input,
html[data-density="dense"] select,
html[data-density="dense"] textarea {
  padding: 0.26rem 0.4rem;
}

html[data-density="dense"] .modal-header,
html[data-density="dense"] .modal-footer {
  padding: 0.45rem 0.6rem;
}

html[data-density="dense"] .modal-body {
  padding: 0.55rem;
}

html[data-density="dense"] .form-grid {
  gap: 0.42rem;
}

html[data-density="dense"] .form-row {
  gap: 0.14rem;
}

@media (max-width: 820px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .urgencies-rail,
  .main {
    grid-column: 1;
  }

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1 1 auto;
  }

  .sidebar-footer {
    flex-direction: row;
    margin-top: 0;
    width: 100%;
  }

  .sidebar-footer .btn,
  .sidebar-footer .file-label {
    flex: 1;
  }

  .urgencies-rail {
    display: none;
  }
}

/* Contrast normalization pass (Transportation + Day Tours) */
.trn-page .panel.panel--compact.reqd-panel--tourmenu {
  background: #ffffff;
  border: 1px solid #cfdaea;
  box-shadow: 0 12px 26px rgba(18, 39, 74, 0.08);
}

.trn-page .panel-header {
  background: linear-gradient(180deg, #f9fcff 0%, #eef5ff 100%);
  border-bottom: 1px solid #d1deef;
}

.trn-head-actions {
  background: #eef5ff;
  border-color: #bfd1e8;
}

.trn-matrix-panel {
  background: #f5f9ff;
  border-color: #cfdced;
}

.trn-matrix-table thead th {
  background: #eaf2ff;
  color: #3f5472;
  border-bottom: 1px solid #cddced;
}

.trn-matrix-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.trn-row:hover,
.trn-row:hover td {
  background: #edf5ff;
}

.trn-route-dist,
.trn-ccy {
  color: #4c607c;
}

.trn-dep-inp,
.trn-route-inp,
.trn-price-inp {
  background: #ffffff;
  border-color: #bfcee3;
}

.trn-page input.trn-price-inp.trn-price-inp--zero,
.trn-matrix-table input.trn-price-inp.trn-price-inp--zero {
  background-color: #f87171 !important;
  background-image: none !important;
  border-color: #dc2626 !important;
  color: #7f1d1d;
  -webkit-appearance: none;
  appearance: none;
}

.trn-matrix-table .trn-price-inp.trn-price-inp--has-price {
  font-weight: 700;
}

.trn-dep-inp:focus,
.trn-route-inp:focus,
.trn-price-inp:focus {
  box-shadow: 0 0 0 2px rgba(90, 134, 191, 0.22);
}

.dt-daytour-toolbar,
.dt-country-nav {
  background: #f5f9ff;
  border: 1px solid #cfdaea;
  box-shadow: 0 6px 16px rgba(18, 39, 74, 0.06);
}

.dt-country-label {
  color: #445c7a;
}

.dt-country-btn {
  background: #ffffff;
  border-color: #bfd1e8;
}

.dt-country-btn.is-active {
  background: #eaf2ff;
  border-color: #88a9d1;
  color: #1f3f66;
}

.dt-daytour-toolbar .filter-contact {
  background: #ffffff;
  border-color: #bfcee3;
}

.dt-lang-btn {
  background: #ffffff;
  border-color: #bfd1e8;
}

.dt-lang-btn.is-active {
  background: #eaf2ff;
  border-color: #88a9d1;
}

.dt-table thead th {
  background: #eaf2ff;
  color: #3f5472;
  border-bottom: 1px solid #cddced;
}

.dt-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.dt-row:hover,
.dt-row:hover td {
  background: #edf5ff;
}

/* Final matching pass: shared panel/table surfaces across Guides, Transportation, Day Tours */
.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .panel.panel--compact.reqd-panel--tourmenu,
.trn-page .panel.panel--compact.reqd-panel--tourmenu,
.dt-page .panel.panel--compact.reqd-panel--tourmenu {
  background: #ffffff;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .tg-guide-table thead th,
.trn-matrix-table thead th,
.dt-table thead th {
  background: #eaf2ff;
}

/* Step 8 UI polish (Requests) */
.requests-page .panel.panel--compact.reqd-panel--tourmenu {
  background: #ffffff;
  border: 1px solid #cfdaea;
  box-shadow: 0 10px 22px rgba(23, 40, 74, 0.06);
}

.requests-page .panel-header {
  background: linear-gradient(180deg, #f9fcff 0%, #eef5ff 100%);
  border-bottom: 1px solid #d1deef;
}

.requests-page .requests-block1-filters,
.requests-page .requests-block1-filters--dates {
  background: #f5f9ff;
  border: 1px solid #cfdaea;
  border-radius: 10px;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.requests-page #rq-filter-contact,
.requests-page #rq-filter-partner,
.requests-page #rq-filter-status,
.requests-page #rq-filter-destination,
.requests-page .rq-filter-date-sized {
  border-color: #bfcee3;
  border-radius: 8px;
  background: #ffffff;
}

.requests-page .requests-filter-actions .btn {
  border-radius: 8px;
}

.requests-colhead-panel table.data thead th,
.tg-guide-table.requests-table thead th {
  background: #eaf2ff;
  color: #3f5472;
  border-bottom: 1px solid #cddced;
}

.tg-guide-table.requests-table tbody td {
  border-bottom-color: #e6edf7;
}

.requests-data-panel .req-row:nth-child(even) td {
  background: #fbfdff;
}

.requests-data-panel .req-row:hover td {
  background: #edf5ff;
}

.requests-data-panel .req-row.req-row--confirmed td {
  background: rgba(187, 247, 208, 0.45);
}

.requests-data-panel .req-row:focus-visible {
  outline: 2px solid rgba(126, 166, 217, 0.45);
  outline-offset: -2px;
}

/* Requests UX refresh: single search + status tabs + advanced toggle */
.requests-main-toolbar {
  align-items: center;
  gap: 0.35rem 0.55rem;
  border: none !important;
  padding: 0.05rem 0 0.05rem !important;
  background: transparent !important;
}

.rq-main-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1 1 82rem;
  min-width: 56rem;
  max-width: none;
}

.rq-main-search-icon {
  position: absolute;
  left: 0.55rem;
  color: #6883a6;
  line-height: 1;
  opacity: 0.72;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
}

.rq-main-search {
  width: 100%;
  min-height: 2rem !important;
  padding-left: 1.65rem !important;
  border-radius: 11px !important;
}

.rq-status-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  flex-wrap: wrap;
}

.rq-status-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: #60758f;
  border-radius: 8px;
  padding: 0.1rem 0.32rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.14s ease;
}

.rq-status-tab:hover {
  background: transparent;
  color: #335376;
}

.rq-status-tab.is-active {
  background: transparent;
  color: #1f3f66;
  box-shadow: inset 0 -2px 0 #88a9d1;
}

.requests-advanced {
  margin-top: 0.16rem;
}

.requests-advanced.is-hidden {
  display: none;
}

.requests-page .tg-guide-block1-toolbar.requests-block1-toolbar {
  gap: 0.12rem;
  padding-bottom: 0.2rem;
}

.requests-page .requests-block1-filters,
.requests-page .requests-block1-filters--dates {
  padding-top: 0.12rem;
  padding-bottom: 0.12rem;
}

.rq-icon-btn {
  min-width: 2rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rq-icon-btn svg {
  display: block;
}

.requests-filter-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Requests final alignment fix (search + status tabs on one line) */
.requests-page .requests-main-toolbar {
  display: grid !important;
  grid-template-columns: minmax(7.3rem, 0.45fr) auto auto;
  grid-template-areas: "search status clear";
  align-items: center;
  gap: 0.08rem;
  width: 100%;
}

.requests-page .rq-main-search-wrap {
  grid-area: search;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

.requests-page .rq-main-search {
  width: 100% !important;
  min-height: 2.72rem !important;
  border-radius: 12px !important;
  font-size: 0.86rem !important;
}

.requests-page .rq-main-search::placeholder {
  font-size: 1.1em;
}

.requests-page .rq-main-search.filter-contact {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: none !important;
}

.requests-page .rq-status-tabs {
  grid-area: status;
  display: inline-flex !important;
  align-items: center;
  gap: 0.24rem;
  flex-wrap: nowrap !important;
  white-space: nowrap;
}

.requests-page .rq-status-tab {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.98rem !important;
  font-weight: 600 !important;
  padding: 0.12rem 0.28rem !important;
  border-radius: 8px !important;
  color: #4f6785;
}

.requests-page .rq-status-tab:hover {
  border: none !important;
  background: #eef1f4 !important;
  box-shadow: none !important;
  color: #2f5278;
}

.requests-page .rq-status-tab.is-active {
  border: none !important;
  background: #dff5e4 !important;
  box-shadow: none !important;
  color: #215c35 !important;
}

.requests-page .requests-filter-actions .btn {
  width: auto !important;
  min-width: 0 !important;
}

.requests-page #rq-toggle-advanced {
  margin-left: 0;
}

.requests-page .requests-filter-actions {
  grid-area: clear;
  justify-self: end;
  margin-left: 0 !important;
}

.requests-page .rq-icon-btn {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 1.95rem;
  height: 1.95rem;
}

.requests-page .rq-icon-btn--with-label {
  width: auto;
  min-width: 0;
  padding: 0 0.2rem;
  gap: 0.22rem;
}

.requests-page .rq-icon-btn-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4f6785;
  line-height: 1;
}

@media (max-width: 860px) {
  .requests-page .requests-main-toolbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "search clear"
      "status clear";
  }

  .requests-page .rq-main-search-wrap {
    grid-area: search;
  }

  .requests-page .rq-status-tabs {
    grid-area: status;
    flex-wrap: wrap !important;
    white-space: normal;
  }

  .requests-page .requests-filter-actions {
    grid-area: clear;
    justify-self: end;
    margin-left: 0;
  }
}

.requests-table-panel {
  margin-top: 0 !important;
}

@media (max-width: 980px) {
  .requests-main-toolbar {
    align-items: stretch;
  }

  .rq-main-search-wrap {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }

  .rq-status-tabs {
    width: 100%;
  }
}

/* Step 9 - Kimi harmony pass (start pages only) */
.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) .panel.panel--compact.reqd-panel--tourmenu,
.trn-page .panel.panel--compact.reqd-panel--tourmenu,
.dt-page .panel.panel--compact.reqd-panel--tourmenu,
.requests-page .panel.panel--compact.reqd-panel--tourmenu {
  border-radius: 12px;
  border-color: #cfdbea;
  box-shadow: 0 12px 26px rgba(18, 39, 74, 0.07);
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) table.data thead th,
.trn-page table.data thead th,
.dt-page table.data thead th,
.requests-page table.data thead th {
  background: #eaf2ff;
  color: #3f5472;
  border-bottom: 1px solid #cddced;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) table.data tbody tr:nth-child(even) td,
.trn-page table.data tbody tr:nth-child(even) td,
.dt-page table.data tbody tr:nth-child(even) td,
.requests-page table.data tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.tg-guides-page:not(.requests-page):not(.clients-page):not(.rs-rest-page) table.data tbody tr:hover td,
.trn-page table.data tbody tr:hover td,
.dt-page table.data tbody tr:hover td,
.requests-page table.data tbody tr:hover td {
  background: #edf5ff;
}

/* Keep confirmed requests green even with global zebra overrides. */
.requests-page table.data tbody tr.req-row.req-row--confirmed td {
  background: rgba(187, 247, 208, 0.45);
}

.requests-page table.data tbody tr.req-row.req-row--confirmed:hover td {
  background: rgba(167, 243, 208, 0.58);
}

.requests-page table.data tbody tr.req-row.req-row--cancelled td {
  background: rgba(156, 163, 175, 0.2);
}

.requests-page table.data tbody tr.req-row.req-row--cancelled:hover td {
  background: rgba(148, 163, 184, 0.28);
}

.requests-page .rq-status-tab.is-active {
  background: #dff5e4 !important;
  color: #215c35 !important;
}

.requests-page .req-status--pending {
  background: #f59e0b;
}

.requests-page .req-status--progress {
  background: #f97316;
}

.requests-page .req-status--confirmed {
  background: #22c55e;
}

.requests-page .req-status--cancelled {
  background: #ef4444;
}

/* Step 10 - Kimi harmony extension (Clients, Hotels, Restaurants, Catalogs, Guide fees, Suppliers, Statistics, Request detail) */
.clients-page .panel.panel--compact.reqd-panel--tourmenu,
.rs-rest-page .panel.panel--compact.reqd-panel--tourmenu,
.catalogs-page .panel.panel--compact.reqd-panel--tourmenu,
.catalog-detail-editor.panel.panel--compact.reqd-panel--tourmenu,
.gf-fees-page .panel.panel--compact.reqd-panel--tourmenu,
.suppliers-page .panel.panel--compact.reqd-panel--tourmenu,
.statistics-page .panel.panel--compact.reqd-panel--tourmenu,
.request-detail-page .panel.panel--compact.reqd-panel {
  border-radius: 12px;
  border: 1px solid #cfdbea;
  box-shadow: 0 12px 26px rgba(18, 39, 74, 0.07);
  background: #ffffff;
}

.rs-rest-page .tg-guide-block1-toolbar,
.catalogs-page .dt-country-nav,
.catalogs-page .dt-daytour-toolbar,
.catalog-detail-editor .catalog-detail-head-actions,
.gf-fees-page .gf-fee-svc-toolbar,
.suppliers-page .sup-toolbar,
.statistics-page .stats-toolbar {
  background: #f5f9ff;
  border: 1px solid #cfdaea;
  border-radius: 10px;
}

/* Clients list: keep search flush like Requests (no inner chrome box on toolbar) */
.clients-page .tg-guide-block1-toolbar.clients-block1-toolbar {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0.22rem 0.75rem 0.42rem;
}

.clients-page .select-compact,
.rs-rest-page .select-compact,
.catalogs-page .select-compact,
.catalog-detail-editor .inp-compact,
.catalog-detail-editor .ce-inp,
.catalog-detail-editor .rte-editor,
.gf-fees-page .select-compact,
.gf-fees-page .gf-fee-lang-grid .gf-lang-input,
.gf-fees-page .gf-unified-table .gf-price-input,
.gf-fees-page .gf-unified-table .gf-u-cell.inp-compact,
.suppliers-page .select-compact,
.statistics-page .select-compact,
.request-detail-page .select-compact {
  background: #ffffff;
  border-color: #bfcee3;
  border-radius: 8px;
}

.clients-page table.data thead th,
.rs-rest-page table.data thead th,
.catalogs-page table.data thead th,
.catalog-detail-editor table.data thead th,
.gf-fees-page table.data thead th,
.suppliers-page table.data thead th,
.statistics-page table.data thead th,
.request-detail-page table.data thead th {
  background: #eaf2ff;
  color: #3f5472;
  border-bottom: 1px solid #cddced;
}

.clients-page table.data tbody tr:nth-child(even) td,
.rs-rest-page table.data tbody tr:nth-child(even) td,
.catalogs-page table.data tbody tr:nth-child(even) td,
.catalog-detail-editor table.data tbody tr:nth-child(even) td,
.gf-fees-page table.data tbody tr:nth-child(even) td,
.suppliers-page table.data tbody tr:nth-child(even) td,
.statistics-page table.data tbody tr:nth-child(even) td,
.request-detail-page table.data tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.clients-page table.data tbody tr:hover td,
.rs-rest-page table.data tbody tr:hover td,
.catalogs-page table.data tbody tr:hover td,
.catalog-detail-editor table.data tbody tr:hover td,
.gf-fees-page table.data tbody tr:hover td,
.suppliers-page table.data tbody tr:hover td,
.statistics-page table.data tbody tr:hover td,
.request-detail-page table.data tbody tr:hover td {
  background: #edf5ff;
}

.clients-page .clients-data-row:focus-visible,
.rs-rest-page .tg-guide-data-row:focus-visible,
.catalogs-page .catalog-row:focus-visible,
.catalog-detail-editor .catalog-day-line:focus-visible {
  outline: 2px solid rgba(126, 166, 217, 0.45);
  outline-offset: -2px;
}

.rs-rest-page .tg-guide-data-row .td-actions .icon-btn,
.clients-page .clients-data-row .td-actions .icon-btn,
.catalogs-page .catalog-row .icon-btn,
.catalog-detail-editor .catalog-day-list-head .btn,
.gf-fees-page .td-actions .icon-btn,
.gf-fees-page .gf-fee-lang-grid-del .icon-btn,
.request-detail-page .reqd-tour-col--actions .icon-btn,
.request-detail-page .reqd-tour-head-actions .icon-btn {
  border-radius: 8px;
}

.rs-rest-page .tg-guide-data-row .td-actions .icon-btn.tg-guide-del-btn:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

.gf-fees-page .td-actions .icon-btn:hover,
.gf-fees-page .gf-fee-lang-grid-del .icon-btn:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

.clients-page .clients-data-row .td-actions .icon-btn:hover,
.catalogs-page .catalog-row .icon-btn:hover,
.catalog-detail-editor .catalog-day-list-head .btn:hover,
.request-detail-page .reqd-tour-col--actions .icon-btn:hover,
.request-detail-page .reqd-tour-head-actions .icon-btn:hover {
  background: #edf4ff;
  color: #314b6e;
}

.catalogs-page .catalog-row.is-active {
  background: rgba(126, 166, 217, 0.16);
  box-shadow: inset 0 0 0 1px rgba(126, 166, 217, 0.24);
}

.catalog-detail-editor .catalog-save-badge.is-saved {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
}

.catalog-detail-editor .catalog-save-badge.is-unsaved {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}

/* Guide fees — Kimi harmony (service header strip + languages inset; complements Step 10) */
.gf-fees-page .gf-fee-svc-head-section .gf-fee-svc-head.panel-header {
  background: linear-gradient(180deg, #f9fcff 0%, #eef5ff 100%);
  border-bottom: 1px solid #d1deef !important;
}

.gf-fees-page .gf-fee-svc-toolbar {
  padding: 0.28rem 0.45rem;
  gap: 0.45rem;
}

.gf-fees-page .gf-fee-lang-section .gf-fee-lang-grid {
  background: linear-gradient(180deg, #fbfdff 0%, #f1f6ff 100%);
  border: 1px solid #e4ecf7;
  border-radius: 10px;
  margin: 0.42rem 0.75rem 0.5rem;
  padding: 0.6rem 0.78rem 0.85rem;
}

/* Suppliers — Kimi harmony (toolbar + regional strips; complements Step 10) */
.suppliers-page > .reqd-panel--tourmenu:first-child .panel-header {
  background: linear-gradient(180deg, #f9fcff 0%, #eef5ff 100%);
  border-bottom: 1px solid #d1deef;
}

.suppliers-page .sup-toolbar {
  padding: 0.32rem 0.75rem 0.55rem;
  gap: 0.55rem;
}

.suppliers-page .panel.panel--compact.reqd-panel--tourmenu.sup-region-strip {
  background: linear-gradient(180deg, #f4f8ff 0%, #e8f1ff 100%);
  border: 1px solid #cfdbea;
  box-shadow: 0 8px 18px rgba(18, 39, 74, 0.05);
  border-radius: 12px;
  padding: 0.62rem 0.95rem;
}

.suppliers-page .sup-region-title {
  color: #3f5472;
}

.suppliers-page .sup-row:hover td {
  font-weight: 500;
}

/* Statistics — Kimi harmony (year toolbar + summary; complements Step 10) */
.statistics-page > .reqd-panel--tourmenu .panel-header {
  background: linear-gradient(180deg, #f9fcff 0%, #eef5ff 100%);
  border-bottom: 1px solid #d1deef;
}

.statistics-page .stats-toolbar {
  padding: 0.32rem 0.75rem 0.5rem;
  gap: 0.5rem;
  align-items: center;
  border-bottom: none;
}

.statistics-page .stats-toolbar .select-compact {
  min-width: 6.5rem;
  max-width: 12rem;
}

.statistics-page .stats-year-summary {
  padding: 0.45rem 0.75rem 0.1rem;
  margin: 0;
  color: #6b7f9a;
}

.statistics-page .statistics-page__empty {
  padding: 1.1rem 1.15rem;
  margin: 0;
}

/* Request detail — Kimi harmony (tour blocks + grid rows; panels via Step 10) */
.request-detail-page .reqd-tour-block {
  background: #ffffff;
  border: 1px solid #cfdbea;
  box-shadow: 0 12px 26px rgba(18, 39, 74, 0.07);
  border-radius: 12px;
  padding: 0.88rem 1rem;
}

.request-detail-page .reqd-tour-menu {
  color: #5a7194;
}

.request-detail-page .reqd-tour-row {
  border-top-color: #e6edf7;
}

.request-detail-page .reqd-tour-row[data-go]:hover {
  background: #edf5ff;
}

.request-detail-page .reqd-tour-head[data-edit-tour-info]:hover {
  background: rgba(126, 166, 217, 0.14);
}

.request-detail-page .reqd-tour-row--confirmed {
  background: rgba(187, 247, 208, 0.38);
}


.request-detail-page .request-detail-page__empty {
  padding: 1.1rem 1.15rem;
  margin: 0;
}

/* Step 11 - Kimi micro-refine (density, rhythm, contrast) */
.requests-page .panel-header,
.clients-page .panel-header,
.rs-rest-page .panel-header,
.trn-page .panel-header,
.dt-page .panel-header,
.catalogs-page .panel-header,
.catalog-detail-editor .panel-header,
.gf-fees-page .panel-header,
.suppliers-page .panel-header,
.statistics-page .panel-header {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.requests-page .panel-title,
.clients-page .panel-title,
.rs-rest-page .panel-title,
.trn-page .panel-title,
.dt-page .panel-title,
.catalogs-page .panel-title,
.catalog-detail-editor .panel-title,
.gf-fees-page .panel-title,
.suppliers-page .panel-title,
.statistics-page .panel-title {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.requests-page table.data th,
.clients-page table.data th,
.rs-rest-page table.data th,
.trn-page table.data th,
.dt-page table.data th,
.catalogs-page table.data th,
.catalog-detail-editor table.data th,
.gf-fees-page table.data th,
.suppliers-page table.data th,
.statistics-page table.data th,
.request-detail-page table.data th {
  font-size: 0.74rem;
  letter-spacing: 0.055em;
}

.requests-page table.data td,
.clients-page table.data td,
.rs-rest-page table.data td,
.trn-page table.data td,
.dt-page table.data td,
.catalogs-page table.data td,
.catalog-detail-editor table.data td,
.gf-fees-page table.data td,
.suppliers-page table.data td,
.statistics-page table.data td,
.request-detail-page table.data td {
  padding-top: 0.42rem;
  padding-bottom: 0.42rem;
}

.requests-page .rq-status-tab,
.catalogs-page .dt-lang-btn,
.catalogs-page .dt-country-btn,
.dt-page .dt-lang-btn,
.dt-page .dt-country-btn {
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.requests-page .rq-status-tab {
  border-radius: 9px !important;
}

.requests-page .rq-status-tab.is-active {
  box-shadow: inset 0 -2px 0 rgba(33, 92, 53, 0.26) !important;
}

.clients-page .empty-state,
.rs-rest-page .empty-state,
.dt-page .empty-state,
.catalogs-page .empty-state,
.gf-fees-page .empty-state,
.suppliers-page .empty-state,
.statistics-page .empty-state,
.request-detail-page .empty-state {
  color: #6b7f9a;
}

.catalog-detail-editor .catalog-day-line.is-active {
  background: rgba(126, 166, 217, 0.16);
  border-color: #7ea6d9;
}

/* Clients toolbar aligned to Requests search pattern */
.clients-page .clients-main-toolbar {
  display: grid !important;
  grid-template-columns: minmax(8rem, 0.91fr) !important;
  grid-template-areas: "search" !important;
  align-items: stretch !important;
  gap: 0.65rem !important;
  width: 100%;
  border: none !important;
  padding: 0.05rem 0 !important;
  background: transparent !important;
}

.clients-page .rq-main-search-wrap {
  grid-area: search !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  flex: none !important;
}

.clients-page .clients-main-search {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 2.72rem !important;
  padding-left: 1.65rem !important;
  border-radius: 12px !important;
  font-size: 0.86rem !important;
}

.clients-page .clients-main-search::placeholder {
  font-size: 1.1em;
}

.clients-page .clients-main-search.filter-contact {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: none !important;
}

/* Clients search: full row width like Requests (override .filter-contact caps) */
.clients-page .clients-main-search.select-compact.filter-contact,
.clients-page .clients-main-search.rq-main-search {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

@media (max-width: 980px) {
  .clients-page .clients-main-search {
    min-height: 2.48rem !important;
  }
}

@media (max-width: 860px) {
  .clients-page .clients-main-toolbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "search clear"
      "status clear";
  }

  .clients-page .clients-main-toolbar::before,
  .clients-page .clients-main-toolbar::after {
    display: none;
  }
}

@media (max-width: 980px) {
  .requests-page .panel-title,
  .clients-page .panel-title,
  .rs-rest-page .panel-title,
  .trn-page .panel-title,
  .dt-page .panel-title,
  .catalogs-page .panel-title,
  .catalog-detail-editor .panel-title,
  .gf-fees-page .panel-title,
  .suppliers-page .panel-title,
  .statistics-page .panel-title {
    font-size: 0.9rem;
  }

  .requests-page table.data th,
  .clients-page table.data th,
  .rs-rest-page table.data th,
  .trn-page table.data th,
  .dt-page table.data th,
  .catalogs-page table.data th,
  .catalog-detail-editor table.data th,
  .gf-fees-page table.data th,
  .suppliers-page table.data th,
  .statistics-page table.data th,
  .request-detail-page table.data th {
    font-size: 0.71rem;
  }
}

/* Hotels & Restaurants list — unified toolbar (country + single search + new), same grid rhythm as Requests */
.rs-rest-page .htl-list-block .htl-page-toolbar,
.rs-rest-page .rst-list-block .rst-page-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0.28rem 0.75rem 0.42rem;
}

.rs-rest-page .htl-main-toolbar,
.rs-rest-page .rst-main-toolbar {
  display: grid !important;
  /* Narrower country column (~half of previous), wider search */
  grid-template-columns: minmax(5.5rem, 0.22fr) minmax(7.3rem, 0.58fr) auto;
  grid-template-areas: "country search new";
  align-items: center;
  gap: 0.08rem;
  width: 100%;
  border: none !important;
  padding: 0.05rem 0 !important;
  background: transparent !important;
}

.rs-rest-page .htl-country-wrap,
.rs-rest-page .rst-country-wrap {
  grid-area: country;
  min-width: 0;
}

.rs-rest-page .htl-country-select,
.rs-rest-page .rst-country-select {
  width: 100%;
  max-width: 100%;
  min-height: 2.72rem !important;
  padding-top: 0.22rem !important;
  padding-bottom: 0.22rem !important;
  font-size: 0.86rem !important;
  border-radius: 12px !important;
}

.rs-rest-page .htl-search-wrap,
.rs-rest-page .rst-search-wrap {
  grid-area: search;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

.rs-rest-page .htl-main-search,
.rs-rest-page .rst-main-search {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 2.72rem !important;
  padding-left: 1.65rem !important;
  border-radius: 12px !important;
  font-size: 0.86rem !important;
}

.rs-rest-page .htl-main-search::placeholder,
.rs-rest-page .rst-main-search::placeholder {
  font-size: 1.1em;
}

.rs-rest-page .htl-main-toolbar .tg-guide-block1-new,
.rs-rest-page .rst-main-toolbar .tg-guide-block1-new {
  grid-area: new;
  justify-self: end;
}

@media (max-width: 860px) {
  .rs-rest-page .htl-main-toolbar,
  .rs-rest-page .rst-main-toolbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "country new"
      "search new";
  }
}

/* Supplier internal flights table */
.itv-sif-flight-no {
  max-width: 84px;
}
.itv-sif-net-pax {
  max-width: 70px;
}
.itv-sif-net-group-cell {
  white-space: nowrap;
  vertical-align: middle;
}
.itv-sif-net-group-wrap {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.35rem;
  max-width: 100%;
}
.itv-sif-net-group-val {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.itv-sif-net-ccy {
  font-size: 0.8rem;
  flex-shrink: 0;
}
.itv-sif-time-cell {
  white-space: nowrap;
  vertical-align: middle;
}
.itv-sif-time-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
}
.itv-sif-time-sel {
  max-width: 3.25rem;
  min-width: 2.85rem;
}
.itv-sif-time-sep {
  opacity: 0.55;
  font-size: 0.85rem;
  user-select: none;
}

/* Our ticketing flight fields: tighter internal padding to free space for content */
.itv-sup-if-table .inp-sm,
.itv-sup-if-table select.inp-sm,
.itv-sup-if-table .itv-sif-time-sel {
  padding: 0.2rem 0.28rem;
}

/* Date field length -10% (from 140px base) */
.itv-sup-if-table input[data-itv-sif-field="date"] {
  max-width: 126px;
}

/* Airline field length +10% (from 140px base) */
.itv-sup-if-table input[data-itv-sif-field="airline"] {
  max-width: 154px;
}

.itv-suppliers-wrap .itv-supplier-block--section + .itv-supplier-block--section {
  margin-top: 0.85rem;
}

.itv-suppliers-head {
  align-items: center;
}

.itv-suppliers-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.itv-supplier-block--section {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface, #fff) 96%, #f5f8fc 4%);
  overflow: hidden;
}

.itv-supplier-block-head {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.5rem 0.8rem;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(110, 130, 160, 0.2);
}

.itv-supplier-block-head::-webkit-details-marker {
  display: none;
}

.itv-supplier-block-head__identity {
  min-width: 0;
}

.itv-supplier-block-head__identity .itv-sup-identity {
  margin: 0;
}

.itv-supplier-block-head__total {
  white-space: nowrap;
  text-align: right;
  font-size: 0.86rem;
}

.itv-supplier-block-head__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.itv-sup-block-rm {
  flex-shrink: 0;
}

.itv-sup-head-total-label {
  color: var(--panel-muted);
  margin-right: 0.35rem;
}

.itv-supplier-block-head__chev {
  color: var(--panel-muted);
  transition: transform 0.15s ease;
}

.itv-supplier-block--section:not([open]) .itv-supplier-block-head__chev {
  transform: rotate(-90deg);
}

.itv-supplier-block--section .itv-supplier-block-body {
  padding-top: 0.5rem;
}

.itv-sup-identity__tag {
  font-weight: 600;
  opacity: 0.88;
}

/*
 * REVERSIBLE LAYOUT — Quotation tab 25% / 75% split (Markup + options | table).
 * To revert: remove .itv-quot-split* rules here and in app.js restore single-column
 * markup row + table (previous itv-quot-mk-row pattern).
 */
.itv-quotation-panel__head {
  border-bottom: 1px solid var(--border, #e5e7eb);
  margin-bottom: 0;
}

.itv-quotation-panel__head .panel-title {
  margin: 0;
}

.itv-quotation-panel__body {
  padding-top: 1rem;
  margin-top: 0;
}

.itv-quot-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  column-gap: 1.25rem;
  row-gap: 1rem;
  align-items: start;
}

.itv-quot-split__sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 0;
}

.itv-quot-sidebar-markup__title {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.45rem;
}

.itv-quot-mk-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.itv-quot-mk-stack-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.5rem;
  width: 100%;
}

.itv-quot-mk-stack-lbl {
  margin: 0;
  flex: 1 1 auto;
  min-width: 4rem;
}

.itv-quot-mk-stack-row .itv-quot-mk-inpwrap {
  flex: 0 0 auto;
}

.itv-quot-sidebar-qopts__label {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.65rem;
  opacity: 0.85;
  margin: 0 0 0.45rem;
}

.itv-quot-sidebar-room {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, #e5e7eb);
}

.itv-quot-sidebar-room__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.itv-quot-sidebar-room__title {
  display: inline-block;
  font-size: 0.82rem;
  margin: 0;
}

.itv-quot-sidebar-room__hint,
.itv-quot-sidebar-room__pax {
  margin: 0.25rem 0 0.5rem;
  line-height: 1.35;
}

.itv-qrm-en-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  margin: 0;
  cursor: pointer;
  white-space: nowrap;
}

.itv-qrm-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem 0.5rem;
}

.itv-qrm-field--full {
  grid-column: 1 / -1;
}

.itv-qrm-field label {
  display: block;
  margin-bottom: 0.12rem;
}

.itv-qrm-field--full label {
  font-size: 0.8rem;
}

.itv-qrm-inp {
  width: 100%;
  min-width: 0;
}

.itv-qrm-field--full .itv-qrm-inp {
  font-size: 0.8rem;
}

.itv-qrm-field--money {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.itv-qrm-field--money label {
  margin: 0;
  font-size: 0.72rem;
  white-space: nowrap;
}

.itv-qrm-inpwrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.28rem;
  flex-shrink: 0;
}

.itv-qrm-inp--money {
  width: 4.2rem;
  max-width: 4.2rem;
  min-height: 1.55rem;
  padding: 0.12rem 0.25rem;
  font-size: 0.76rem;
  text-align: right;
}

.itv-qrm-ccy {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.85;
  user-select: none;
}

.itv-qrm-field--pax label {
  font-size: 0.72rem;
  white-space: nowrap;
}

.itv-qrm-field--pax .itv-qrm-inp {
  max-width: 3.4rem;
  min-height: 1.55rem;
  padding: 0.12rem 0.25rem;
  font-size: 0.76rem;
}

.itv-quot-sidebar-room__hint {
  font-size: 0.72rem;
}

.itv-quot-room-split {
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--border, #e5e7eb);
}

.itv-quot-room-split--bad {
  border-color: #fca5a5;
  background: rgba(254, 226, 226, 0.35);
}

.itv-quot-room-split__title {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
}

.itv-quot-room-split-table {
  font-size: 0.78rem;
}

.itv-quot-room-split__note {
  margin: 0.45rem 0 0;
  line-height: 1.35;
}

.itv-quot-room-split__warn {
  margin: 0.35rem 0 0;
  color: #b45309;
  font-size: 0.78rem;
}

.itv-quot-room-split__err {
  margin: 0.25rem 0 0;
  color: #b91c1c;
  font-size: 0.82rem;
}

.itv-quot-main-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem);
  gap: 0.65rem;
  align-items: start;
}

.itv-quot-commercial {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border, #e5e7eb);
}

.itv-quot-commercial--main {
  margin-top: 0;
  padding: 0.55rem 0.65rem;
  border-top: none;
  border: 1px solid color-mix(in srgb, var(--border, #e5e7eb) 76%, #f59e0b 24%);
  border-radius: 8px;
  background: color-mix(in srgb, #fef3c7 35%, var(--surface, #fff) 65%);
}

.itv-quot-commercial--plan {
  margin-top: 0.5rem;
}

.itv-quot-commercial__title {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.itv-quot-commercial__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
}

.itv-quot-commercial__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.itv-quot-commercial__plan-head {
  margin-top: 0.55rem;
  padding-bottom: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.itv-quot-commercial-plan-table {
  font-size: 0.78rem;
}

.itv-quot-plan-pctwrap {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  min-width: 5.2rem;
}
.itv-quot-plan-pct {
  width: 4.6rem;
  min-width: 4.6rem;
  text-align: right;
}
.itv-quot-plan-amt {
  width: 6.5rem;
  min-width: 5.5rem;
  text-align: right;
}
.itv-quot-plan-pct-suffix {
  color: #6b7280;
  font-size: 0.72rem;
}
.pc-client-pay-table .pc-pay-pct-inp {
  width: 3.4rem;
  text-align: right;
}

.itv-quot-commercial__plan-note {
  margin: 0.35rem 0 0;
  line-height: 1.3;
}

.itv-quot-comm-badge {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.itv-quot-commercial__plan-note .itv-quot-comm-badge--plan {
  margin-top: 0;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.itv-quot-comm-badge--alert,
.itv-quot-comm-badge--under {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #f87171;
}

.itv-quot-comm-badge--over {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #4ade80;
}

.itv-quot-comm-badge--neutral {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.itv-quot-sidebar-extras .itv-quot-sidebar-room__head {
  margin-bottom: 0.35rem;
}

.itv-quot-extra-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 0.38rem 0.42rem;
  margin-bottom: 0.42rem;
  background: rgba(15, 23, 42, 0.02);
}

.itv-quot-extra-card__top,
.itv-quot-extra-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.itv-quot-extra-card__top {
  margin-bottom: 0.2rem;
}

.itv-quot-extra-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.78rem;
  padding: 0.2rem 0.35rem;
}

.itv-quot-extra-rm {
  flex: 0 0 auto;
  min-width: 1.65rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.itv-quot-extra-card__row + .itv-quot-extra-card__row {
  margin-top: 0.2rem;
}

.itv-quot-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  cursor: pointer;
  flex-shrink: 0;
}

.itv-quot-toggle__lbl {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0.45;
}

.itv-quot-toggle:has(.itv-quot-toggle__inp:not(:checked)) .itv-quot-toggle__lbl--off,
.itv-quot-toggle:has(.itv-quot-toggle__inp:checked) .itv-quot-toggle__lbl--on {
  opacity: 1;
  color: var(--accent, #7ead5a);
}

.itv-quot-toggle__inp {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.itv-quot-toggle__track {
  display: block;
  width: 1.85rem;
  height: 1rem;
  border-radius: 999px;
  background: #c8c0b8;
  transition: background 0.15s ease;
  position: relative;
  flex-shrink: 0;
}

.itv-quot-toggle__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1rem - 4px);
  height: calc(1rem - 4px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
  transition: transform 0.15s ease;
}

.itv-quot-toggle__inp:checked + .itv-quot-toggle__track {
  background: var(--accent, #7ead5a);
}

.itv-quot-toggle__inp:checked + .itv-quot-toggle__track::after {
  transform: translateX(0.85rem);
}

.itv-quot-extra-incl {
  text-align: right;
  flex: 1;
  min-width: 0;
}

.pc-client-pay-table input[readonly],
.pc-client-pay-table select[disabled],
.pc-client-pay-table input.pc-pay-field--locked {
  background: rgba(148, 163, 184, 0.14);
  pointer-events: none;
  cursor: not-allowed;
}

.itv-quote-variant-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.itv-quote-variant-stack .itv-quote-variant-chip {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.itv-quot-split__main {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
  border-left: 1px solid var(--border, #e5e7eb);
  padding-left: 1.25rem;
}

@media (max-width: 52rem) {
  .itv-quot-split {
    grid-template-columns: 1fr;
  }

  .itv-quot-split__main {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border, #e5e7eb);
    padding-top: 1rem;
  }

  .itv-quot-main-top {
    grid-template-columns: 1fr;
  }
}

.itv-quot-main-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}

.itv-quot-main-variant-name {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  min-width: 0;
}

.itv-quot-main-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}

.itv-quot-mk-inpwrap {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
}

.itv-quot-mk-inp {
  width: 3.84rem;
  max-width: 4.56rem;
  min-width: 3.24rem;
  text-align: center;
  direction: ltr;
  font-size: 0.72rem;
  padding: 0.1rem 0.16rem;
  line-height: 1.2;
}

.itv-quot-mk-suffix {
  font-size: 0.78rem;
  opacity: 0.8;
  user-select: none;
  flex-shrink: 0;
}

.itv-quot-sum-table {
  table-layout: fixed;
  width: 100%;
}

.itv-quot-sum-table th:nth-child(1),
.itv-quot-sum-table td:nth-child(1) {
  width: 38%;
}

.itv-quot-sum-table th:nth-child(2),
.itv-quot-sum-table td:nth-child(2) {
  width: 21%;
}

.itv-quot-sum-table th:nth-child(3),
.itv-quot-sum-table td:nth-child(3) {
  width: 20%;
}

.itv-quot-sum-table th:nth-child(4),
.itv-quot-sum-table td:nth-child(4) {
  width: 21%;
}

.itv-quot-sec-title {
  font-size: 1.05em;
  font-weight: 700;
}

.itv-quot-sum-table tr.itv-quot-main-row {
  cursor: pointer;
}

.itv-quot-sum-table tr.itv-quot-main-row:hover {
  background: rgba(0, 0, 0, 0.04);
}

.itv-quot-sum-table tr.itv-quot-detail-row td {
  padding: 0.35rem 0.5rem 0.6rem;
  background: var(--bg-muted, #f3f4f6);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.itv-quot-detail-inner {
  padding: 0.15rem 0 0.25rem 0;
}

.itv-quot-detail-match {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.itv-quot-detail-match col.itv-quot-col-s {
  width: 38%;
}

.itv-quot-detail-match col.itv-quot-col-n {
  width: 21%;
}

.itv-quot-detail-match col.itv-quot-col-m {
  width: 20%;
}

.itv-quot-detail-match col.itv-quot-col-sl {
  width: 21%;
}

.itv-quot-detail-match .itv-quot-dlabel {
  padding: 0.12rem 0.35rem 0.12rem 0.95rem;
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.35;
  vertical-align: top;
}

.itv-quot-detail-match .itv-quot-dnet {
  padding: 0.12rem 0.35rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
  vertical-align: top;
}

.itv-quot-detail-match .itv-quot-dempty {
  padding: 0;
}

.itv-quot-chev {
  display: inline-block;
  width: 1rem;
  opacity: 0.75;
  font-size: 0.85rem;
}


.reqd-revision-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 600;
  vertical-align: middle;
}


.rq-travelers-collapse {
  border: 1px solid var(--border, #d7dde7);
  border-radius: 10px;
  padding: 0.2rem 0.55rem 0.55rem;
  background: #fff;
}

.rq-travelers-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.1rem;
  font-size: 0.94rem;
}

.rq-travelers-summary::-webkit-details-marker {
  display: none;
}

.rq-travelers-summary::before {
  content: "▸";
  color: #64748b;
  font-size: 0.9rem;
  transform: translateY(-1px);
}

.rq-travelers-collapse[open] .rq-travelers-summary::before {
  content: "▾";
}

.rq-travelers-summary__count {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 0.08rem 0.4rem;
}

.rq-travelers-collapse__body {
  padding-top: 0.2rem;
}

.reqd-tour-col--version .reqd-revision-badge {
  margin-right: 0.35rem;
}

/* Itinerary import modal (catalog + bookmark) */
.ibk-load-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.ibk-load-tab {
  border: 1px solid #d0d6de;
  background: #fff;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #334155;
}
.ibk-load-tab.is-active {
  background: #f0f7eb;
  border-color: #7eaa58;
  color: #1c1c1f;
}
.ibk-load-split {
  display: flex;
  gap: 12px;
  min-height: 300px;
}
.ibk-load-list {
  flex: 0 0 38%;
  max-height: 360px;
  overflow: auto;
  border: 1px solid #d0d6de;
  border-radius: 8px;
  background: #fafbfc;
}
.ibk-load-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-bottom: 1px solid #e8ecf0;
  background: transparent;
  cursor: pointer;
}
.ibk-load-item:hover {
  background: #f4f6f8;
}
.ibk-load-item.is-selected {
  background: #eef6e6;
}
.ibk-load-item__name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #1c1c1f;
}
.ibk-load-item__meta {
  display: block;
  margin-top: 2px;
}
.ibk-load-preview {
  flex: 1;
  min-width: 0;
  border: 1px solid #d0d6de;
  border-radius: 8px;
  padding: 10px 12px;
  max-height: 360px;
  overflow: auto;
  font-size: 12px;
  background: #fff;
}
.ibk-load-preview-title {
  margin: 0 0 4px;
  font-size: 14px;
}
.ibk-load-preview-meta {
  margin: 0 0 10px;
}
.ibk-load-preview-day {
  padding: 8px 0;
  border-bottom: 1px solid #eef0f2;
}
.ibk-load-preview-day__title {
  font-weight: 700;
  color: #1c1c1f;
}
.ibk-load-preview-day__desc {
  margin-top: 3px;
  line-height: 1.4;
  color: #374151;
}
.ibk-load-preview-day__svc {
  margin-top: 2px;
}
.ibk-import-mode-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ibk-import-mode {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}
.ibk-lib-page > .panel + .panel {
  margin-top: 8px;
}
.ibk-lib-page .filters-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ibk-lib-filter-select {
  max-width: 330px;
  min-width: 330px;
  width: 330px;
}
.ibk-lib-row {
  cursor: pointer;
}
.ibk-lib-row.is-selected {
  background: #eef6e6;
}
.ibk-lib-page td.td-actions {
  text-align: right;
}
.ibk-lib-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ibk-lib-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  color: var(--muted);
  transition: color 0.12s ease, background 0.12s ease;
}
.ibk-lib-del-btn:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}
.ibk-lib-del-btn .icon-trash {
  display: block;
}
.ibk-lib-split {
  display: flex;
  gap: 10px;
  min-height: 360px;
}
.ibk-lib-table-wrap {
  flex: 0 1 60%;
  min-width: 0;
  max-width: 62%;
}
.ibk-lib-page .ibk-lib-table-wrap table.data--compact th:nth-child(3),
.ibk-lib-page .ibk-lib-table-wrap table.data--compact td:nth-child(3) {
  width: 1%;
  white-space: nowrap;
  padding-right: 0.2rem;
}
.ibk-lib-page .ibk-lib-table-wrap table.data--compact th:nth-child(4),
.ibk-lib-page .ibk-lib-table-wrap table.data--compact td:nth-child(4) {
  width: 1%;
  white-space: nowrap;
  padding-left: 0.2rem;
  padding-right: 0.15rem;
}
.ibk-lib-page .ibk-lib-table-wrap table.data--compact th:last-child,
.ibk-lib-page .ibk-lib-table-wrap table.data--compact td:last-child {
  width: 1%;
  white-space: nowrap;
  padding-left: 0.15rem;
}
.ibk-lib-preview-panel {
  flex: 0 1 40%;
  min-width: 0;
  min-height: 320px;
  max-height: 520px;
  overflow: auto;
}
.ibk-lib-row:hover {
  background: #f8fafb;
}
@media (max-width: 960px) {
  .ibk-lib-split {
    flex-direction: column;
  }
  .ibk-lib-preview-panel {
    flex: 1 1 auto;
    max-width: none;
    max-height: 360px;
  }
}

/* Finance / Bilanci */
.finance-page .panel-body-pad {
  padding: 0.85rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.finance-cash-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.finance-cash-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle, #e2e8f0);
  background: var(--panel-surface-2, #f8fafc);
}

.finance-cash-card--usd {
  border-left: 3px solid #2563eb;
}

.finance-cash-card--eur {
  border-left: 3px solid #059669;
}

.finance-cash-card__lbl {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.finance-cash-card__val {
  font-size: 1.25rem;
  line-height: 1.2;
}

.finance-asset-table tr.finance-asset-total td {
  border-top: 2px solid var(--border-subtle, #cbd5e1);
  background: #f8fafc;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.finance-tabs {
  margin-top: 0.15rem;
}

.finance-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}

.finance-toolbar__field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 7rem;
}

.finance-page__hint {
  margin: 0;
}

.finance-page__sub {
  margin: 0.35rem 0 0.45rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.finance-table th,
.finance-table td {
  white-space: nowrap;
}

.finance-dc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: flex-end;
  margin: 0.35rem 0 0.75rem;
}

.finance-dc-meta--toolbar {
  align-items: flex-end;
}

.finance-dc-meta--toolbar .btn {
  align-self: flex-end;
  margin-bottom: 0.05rem;
}

.finance-dc-meta__stats {
  margin-left: auto;
  align-self: center;
}

.fin-dc-xl {
  table-layout: fixed;
  width: 100%;
  min-width: 100%;
}

.fin-dc-xl col.fin-dc-col-supcode { width: 6%; }
.fin-dc-xl col.fin-dc-col-code { width: 5%; }
.fin-dc-xl col.fin-dc-col-client { width: 12%; }
.fin-dc-xl col.fin-dc-col-pax { width: 4%; }
.fin-dc-xl col.fin-dc-col-guide { width: 14%; }
.fin-dc-xl col.fin-dc-col-from { width: 8%; }
.fin-dc-xl col.fin-dc-col-to { width: 8%; }
.fin-dc-xl col.fin-dc-col-veh { width: 9%; }
.fin-dc-xl col.fin-dc-col-bike { width: 5%; }
.fin-dc-xl col.fin-dc-col-due { width: 8%; }
.fin-dc-xl col.fin-dc-col-notes { width: 10%; }
.fin-dc-xl col.fin-dc-col-act { width: 5%; }
.fin-dc-xl col.fin-dc-col-bal { width: 12%; }

.fin-dc-supcode {
  font-weight: 600;
  white-space: nowrap;
}

.fin-dc-hint {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.85rem;
}

.finance-toolbar__field--wide select {
  min-width: 11rem;
}

.finance-tabs--dc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
  margin: 0.1rem 0 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(42, 56, 32, 0.08);
}

.finance-tabs--dc .tab {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted, #6b7280);
  box-shadow: none;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.finance-tabs--dc .tab:hover {
  color: var(--text, #1f2937);
  background: rgba(42, 56, 32, 0.04);
}

.finance-tabs--dc .tab.is-active {
  color: #2a3820;
  background: rgba(126, 173, 90, 0.14);
  border-color: rgba(126, 173, 90, 0.35);
  font-weight: 600;
}

.finance-tabs--dc .tab--add {
  opacity: 0.85;
  border-style: dashed;
}

.finance-dc-meta__countries {
  align-self: center;
  margin-right: 0.35rem;
}

#sep-cc[multiple] {
  min-height: 6.5rem;
  padding: 0.35rem;
}

.fin-dc-fromto {
  line-height: 1.25;
  white-space: normal;
}

.fin-dc-fromto__date {
  display: block;
  font-weight: 700;
}

.fin-dc-fromto__city {
  color: var(--text-muted, #64748b);
  font-size: 0.74rem;
  font-weight: 400;
}

.fin-dc-veh {
  white-space: normal !important;
  line-height: 1.3;
}

.fin-dc-veh-line + .fin-dc-veh-line {
  margin-top: 0.12rem;
}

.fin-dc-code-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.fin-dc-code-link:hover {
  color: var(--accent, #0f766e);
}

.fin-dc-xl-row--pay {
  background: rgba(59, 130, 246, 0.12);
  cursor: pointer;
}

.fin-dc-xl-row--pay td {
  font-weight: 500;
}

.fin-dc-xl-row--credit {
  background: rgba(99, 102, 241, 0.12);
  cursor: pointer;
}

.fin-dc-xl-row--credit td {
  font-weight: 500;
}

.fin-dc-xl-row--extra {
  background: rgba(245, 158, 11, 0.14);
  cursor: pointer;
}

.fin-dc-xl-row--sale {
  background: rgba(16, 185, 129, 0.12);
}

.fin-dc-guide-name {
  font-weight: 700;
}

.fin-dc-guide-dates {
  font-weight: 400;
  color: var(--text-muted, #64748b);
}

.fin-dc-bike {
  white-space: normal !important;
  line-height: 1.25;
  text-align: center;
}

.fin-dc-bike-qty {
  display: block;
  font-weight: 700;
}

.fin-dc-bike-date {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
}

.fin-dc-pdf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.45rem;
  min-width: 2rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.finance-dc-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.fin-dc-bal--debt {
  color: #b45309;
}

.fin-dc-bal--credit {
  color: #047857;
}

.fin-dc-bal--settled {
  color: var(--text-muted, #64748b);
}

.fin-dc-row--debt {
  background: rgba(245, 158, 11, 0.06);
}

.fin-dc-row--credit {
  background: rgba(4, 120, 87, 0.06);
}

.fin-dc-pays {
  max-width: 14rem;
  white-space: normal !important;
  font-size: 0.78rem;
  line-height: 1.35;
}

.fin-dc-actions {
  white-space: nowrap;
}

.fin-dc-opening {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.95rem;
}

.fin-dc-month {
  margin: 1rem 0 1.35rem;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.fin-dc-month__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.55rem 0.85rem;
  background: #f3f0ea;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
}

.fin-dc-month__title {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.fin-dc-month__run {
  font-size: 0.88rem;
  margin: 0;
}

.fin-dc-xl-wrap {
  overflow-x: auto;
  width: 100%;
}

.fin-dc-xl th,
.fin-dc-xl td {
  font-size: 0.78rem;
  vertical-align: top;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fin-dc-xl th.num,
.fin-dc-xl td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.fin-dc-xl .fin-dc-guide,
.fin-dc-xl .fin-dc-notes,
.fin-dc-xl .fin-dc-veh,
.fin-dc-xl .fin-dc-fromto {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
}

.fin-dc-xl .fin-dc-guide,
.fin-dc-xl .fin-dc-notes {
  min-width: 0;
}

.fin-dc-due {
  color: #b91c1c !important;
  font-weight: 600;
}

.fin-dc-paid {
  color: #047857 !important;
  font-weight: 600;
}

.fin-dc-xl-row--ok {
  background: rgba(126, 173, 90, 0.12);
}

.fin-dc-xl-row--cancel {
  background: rgba(212, 92, 92, 0.14);
  color: #7f1d1d;
}

.fin-dc-xl-total td {
  background: #f8fafc;
  border-top: 2px solid #cbd5e1;
}

.fin-dc-code {
  font-weight: 700;
}

.sdc-pay-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-width: 22rem;
  margin: 0 auto;
  padding: 0.15rem 0.1rem 0.25rem;
}

.sdc-pay-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.sdc-pay-form .field-label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted, #64748b);
}

.sdc-pay-form .inp-compact {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.88rem;
  padding: 0.32rem 0.45rem;
}

.sdc-pay-form__note {
  min-height: 3.2rem !important;
  resize: vertical;
}

.sdc-pay-form__danger {
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle, #e2e8f0);
}

/* Cancel request — finance settlement */
.modal-panel--cancel-finance {
  max-width: 40rem;
}

.sdc-cancel-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.1rem 0.15rem 0.35rem;
}

.sdc-cancel-form__head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
}

.sdc-cancel-form__intro {
  margin: 0.35rem 0 0;
  line-height: 1.35;
}

.sdc-cancel-check {
  margin: 0;
}

.sdc-cancel-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 10px;
  background: #fafbfc;
}

.sdc-cancel-section__title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text, #1e293b);
}

.sdc-cancel-section__hint {
  margin: -0.15rem 0 0;
}

.sdc-cancel-money-live {
  margin: 0.35rem 0 0.15rem;
  font-variant-numeric: tabular-nums;
}

.sdc-cancel-empty {
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: #fff;
  border: 1px dashed var(--border-subtle, #cbd5e1);
}

.sdc-cancel-field-lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  margin-bottom: 0.22rem;
}

.sdc-cancel-field {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 0;
}

.sdc-cancel-field .inp-compact,
.sdc-cancel-field .select-compact {
  width: 100%;
  box-sizing: border-box;
}

.sdc-cancel-grid {
  display: grid;
  gap: 0.65rem 0.75rem;
}

.sdc-cancel-grid--2 {
  grid-template-columns: 1fr 1fr;
}

.sdc-cancel-tour-list,
.sdc-cancel-pen-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sdc-cancel-tour-row,
.sdc-cancel-pen-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(7.5rem, 0.9fr);
  gap: 0.55rem 0.75rem;
  align-items: end;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border-subtle, #e2e8f0);
}

.sdc-cancel-tour-row__meta,
.sdc-cancel-pen-row__label {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.sdc-cancel-tour-row__stats {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.78rem;
  color: var(--muted, #64748b);
}

.sdc-cancel-tour-row__diff {
  display: block;
  color: #9a3412;
  font-size: 0.74rem;
  line-height: 1.3;
}

.sdc-cancel-tour-row__stats em {
  font-style: normal;
  font-weight: 600;
  color: #64748b;
  margin-right: 0.2rem;
}

.sdc-cancel-pen-row__was {
  align-self: center;
}

.sdc-cancel-tour-row__field,
.sdc-cancel-pen-row__field {
  margin: 0;
  min-width: 0;
}

.sdc-cancel-tour-row__field .inp-compact,
.sdc-cancel-pen-row__field .inp-compact {
  width: 100%;
  box-sizing: border-box;
  text-align: right;
}

@media (max-width: 640px) {
  .sdc-cancel-grid--2,
  .sdc-cancel-tour-row,
  .sdc-cancel-pen-row {
    grid-template-columns: 1fr;
  }

  .sdc-cancel-pen-row__was {
    align-self: start;
  }
}

.itv-fin-sync-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #fbbf24;
  background: #fffbeb;
  color: #78350f;
}

.itv-fin-sync-banner__text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1 1 14rem;
  font-size: 0.84rem;
  line-height: 1.35;
}

.itv-fin-sync-banner__text .muted {
  color: #92400e;
}

.itv-fin-sync-banner .btn {
  flex: 0 0 auto;
}

.fin-amd-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.fin-amd-summary {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle, #e2e8f0);
}

.fin-amd-summary p {
  margin: 0 0 0.35rem;
}

.fin-amd-summary p:last-child {
  margin-bottom: 0;
}

.fin-amd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.finance-sales-actions {
  white-space: nowrap;
}

.finance-sales-cancelled-badge {
  margin-left: 0.35rem;
  vertical-align: middle;
  padding: 0.1rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.sdc-cancel-pen-warn {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.35;
  background: #f1f5f9;
  border: 1px solid var(--border-subtle, #cbd5e1);
  color: #334155;
}

.sdc-cancel-pen-warn--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
  font-weight: 600;
}

.sdc-pay-proof {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sdc-pay-proof__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.sdc-pay-proof__upload {
  display: inline-flex;
  cursor: pointer;
}

.sdc-pay-proof__upload span {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid rgba(65, 50, 37, 0.16);
  background: var(--panel-bg, #fff);
  color: var(--panel-text, #1f2937);
}

.sdc-pay-proof__upload:hover span {
  border-color: rgba(126, 173, 90, 0.55);
  color: var(--accent, #0f766e);
}

.sdc-pay-proof__preview {
  min-height: 2.5rem;
}

.sdc-pay-proof__empty {
  padding: 0.35rem 0;
}

.sdc-pay-proof__thumb {
  display: inline-block;
  padding: 0;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  max-width: 100%;
}

.sdc-pay-proof__thumb img {
  display: block;
  max-width: 10rem;
  max-height: 5.5rem;
  object-fit: cover;
}

.sdc-pay-proof__doc {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 6px;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  max-width: 100%;
}

.sdc-pay-proof__doc-icon {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 4px;
  padding: 0.2rem 0.35rem;
}

.sdc-pay-proof__doc-name {
  font-size: 0.78rem;
  color: var(--text, #1f2937);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
}

.sdc-pay-proof__hint {
  margin: 0;
}

.sdc-pay-proof__warn {
  margin: 0;
  color: #b45309;
}

.sdc-proof-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
}

.sdc-proof-lightbox__panel {
  width: min(720px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.sdc-proof-lightbox__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle, #e2e8f0);
  background: #f8fafc;
}

.sdc-proof-lightbox__body {
  padding: 0.75rem;
  overflow: auto;
  max-height: calc(90vh - 3.5rem);
  display: grid;
  place-items: center;
}

.sdc-proof-lightbox__img {
  max-width: 100%;
  max-height: calc(90vh - 5rem);
  object-fit: contain;
}

.sdc-proof-lightbox__frame {
  width: min(680px, 92vw);
  height: min(70vh, 560px);
  border: 0;
  background: #f1f5f9;
}

@media (max-width: 900px) {
  .finance-dc-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .finance-cash-cards {
    grid-template-columns: 1fr;
  }
}

/* Itinerary — hotel room capacity warnings (non-blocking) */
.itv-hotel-cap-warn-host {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  margin-top: 0.1rem;
}

.itv-hotel-cap-warn {
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #f59e0b;
  background: #fffbeb;
  color: #92400e;
  line-height: 1.35;
}

.itv-hotel-cap-warn--no-rooms {
  border-color: #d97706;
  background: #fff7ed;
}

.itv-hotel-cap-warn--excess {
  border-color: #ea580c;
  background: #fff7ed;
  color: #9a3412;
}

.itv-hotel-cap-hint {
  margin: 0.35rem 0 0;
  line-height: 1.35;
}

.itv-quot-hotel-cap-warn {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.itv-quot-hotel-cap-warn__title {
  margin: 0 0 0.35rem;
}

.itv-quot-hotel-cap-warn__list {
  margin: 0;
  padding-left: 1.15rem;
}

.itv-quot-hotel-cap-warn__list li {
  margin: 0.15rem 0;
}

/* Settings → Payment accounts (list + editor, supplier-style fields) */
.settings-page--payment-accounts {
  max-width: min(1100px, 100%);
  width: 100%;
  margin: 0;
}

.pa-settings__intro {
  margin: 0;
  padding: 0.75rem 1rem 0;
}

.pa-settings__sectabs {
  padding: 0.55rem 1rem 0;
  margin-bottom: 0;
}

.pa-settings-split {
  display: grid;
  grid-template-columns: minmax(11rem, 16rem) minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.65rem 1rem 0.75rem;
  align-items: start;
}

.pa-settings-list-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pa-settings-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: min(52vh, 520px);
  overflow-y: auto;
}

.pa-settings-list__item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  text-align: left;
  padding: 0.38rem 0.45rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: var(--bg, #fff);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  color: var(--text, #1f2937);
}

.pa-settings-list__item:hover {
  background: var(--surface-2, #f8fafc);
}

.pa-settings-list__item.is-active {
  border-color: rgba(126, 173, 90, 0.55);
  background: rgba(126, 173, 90, 0.08);
  font-weight: 600;
}

.pa-settings-list__logo {
  flex-shrink: 0;
  border-radius: 4px;
  object-fit: cover;
  object-position: center;
  background: #f3f4f6;
}

.pa-settings-list__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pa-settings-list__empty {
  padding: 0.35rem 0.15rem;
  list-style: none;
}

.pa-settings-editor {
  min-width: 0;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  background: var(--panel-bg, #fff);
}

.pa-settings-editor--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
}

.pa-settings-editor-page.client-edit-page .ce-main {
  padding: 0;
}

.pa-settings-editor-page .ce-field-grid {
  gap: 0.65rem 0.85rem;
  margin-top: 0.65rem;
}

.pa-settings-editor-page .ce-field-grid--2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pa-settings-editor-page .ce-field-grid--3col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pa-settings-editor-page .ce-field--full {
  grid-column: 1 / -1;
}

.pa-settings-editor-page select.ce-inp {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.86rem;
  padding: 0.42rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(65, 50, 37, 0.14);
  background: var(--panel-input-bg, #fff);
  color: var(--panel-text, #1f2937);
}

.pa-bank-editor__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem 1rem;
  align-items: start;
}

.pa-bank-logo-row {
  margin-bottom: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.pa-bank-logo-ring {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
}

.pa-settings-editor-page .ce-avatar-ring.pa-bank-logo-ring {
  border-radius: 8px;
}

.pa-bank-logo-ring .ce-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.pa-bank-editor__top {
  margin-top: 0;
}

.pa-settings-editor__actions {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border, #e5e7eb);
}

.pa-settings__save {
  margin: 0;
  padding: 0 1rem 0.85rem;
}

@media (max-width: 820px) {
  .pa-settings-split {
    grid-template-columns: 1fr;
  }

  .pa-settings-editor-page .ce-field-grid--3col,
  .pa-settings-editor-page .ce-field-grid--2col {
    grid-template-columns: 1fr;
  }

  .pa-bank-editor__head {
    grid-template-columns: 1fr;
  }
}

/* Agency catalogs */
.acat-page-note {
  padding: 4px 14px 10px;
}
.acat-row {
  cursor: pointer;
}
.acat-list-notes {
  margin-top: 2px;
}
.acat-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.acat-detail-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.acat-detail-title {
  margin: 0;
  font-size: 1.7rem;
}
.acat-meta-row {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 12px 24px;
  align-items: stretch;
}
.acat-meta-validity {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 240px;
}
.acat-validity-field {
  display: flex;
  align-items: center;
  gap: 10px;
}
.acat-validity-label {
  flex: 0 0 100px;
  width: 100px;
  font-size: 11px;
  color: var(--muted, #666);
  white-space: nowrap;
  margin: 0;
  padding: 0;
}
.acat-date-inp {
  flex: 0 0 128px;
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  font-size: 11px;
  padding: 3px 6px;
  box-sizing: border-box;
}
.acat-lang-field {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 2px;
}
.acat-lang-field .acat-validity-label {
  flex: 0 0 110px;
  width: 110px;
}
.acat-lang-flags {
  display: inline-flex;
  gap: 4px;
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-left: 24px;
}
.acat-validity-shortcuts {
  display: flex;
  gap: 6px;
  margin-top: 2px;
  padding-left: 110px;
}
.acat-meta-notes {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.acat-meta-notes textarea {
  flex: 1 1 auto;
  width: 100%;
  min-height: 96px;
  resize: vertical;
}
.btn.btn-xs {
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.6;
}
.acat-additem-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.acat-additem-row > select,
.acat-additem-row > input,
.acat-additem-row > button {
  height: 34px;
  box-sizing: border-box;
  align-self: stretch;
}
.acat-additem-row #acat-add-version {
  min-width: 260px;
}
.acat-additem-row #acat-add-title {
  min-width: 540px;
  width: 540px;
}
.acat-webimp-urlrow {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.acat-webimp-urlrow input {
  flex: 1;
  min-width: 0;
}
.acat-webimp-actions {
  margin: 4px 0 10px;
}
.acat-webimp-preview {
  max-height: min(48vh, 420px);
  overflow: auto;
  border: 1px solid var(--border, #e2e2e2);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--surface-2, #fafafa);
}
.acat-webimp-empty {
  margin: 0;
}
.acat-webimp-meta {
  margin: 0 0 8px;
}
.acat-webimp-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acat-webimp-day__head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}
.acat-webimp-day__n {
  font-variant-numeric: tabular-nums;
  color: var(--muted, #6b6b6b);
  min-width: 3.2rem;
}
.acat-webimp-day__desc {
  margin: 2px 0 0;
}
.acat-webimp-day__city--miss {
  color: #b45309;
}
.acat-webimp-cities {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px dashed var(--border, #d4d4d4);
  border-radius: 6px;
  background: #fffdf8;
}
.acat-webimp-cities__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 6px;
}
.acat-webimp-city-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

.cat-needs-review {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  color: #c62828;
  font-size: 0.95rem;
  line-height: 1;
  vertical-align: middle;
}
.cat-needs-review--inline {
  margin-left: 8px;
}
.cat-code-cell .cat-needs-review {
  margin-left: 4px;
}

.cat-batch-webimp {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 320px;
}
.cat-batch-scope-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cat-batch-scope.is-active {
  background: var(--accent-soft, #eef3f8);
  border-color: var(--accent, #3a6ea5);
}
.cat-batch-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.cat-batch-opt {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 0.9rem;
}
.cat-batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cat-batch-summary {
  margin-left: 4px;
}
.cat-batch-list {
  max-height: min(52vh, 460px);
  overflow: auto;
  border: 1px solid var(--border, #e2e2e2);
  border-radius: 6px;
  padding: 6px 8px;
  background: var(--surface-2, #fafafa);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cat-batch-row {
  display: grid;
  grid-template-columns: 18px 36px minmax(0, 1fr) minmax(140px, 0.7fr);
  gap: 8px;
  align-items: center;
  padding: 5px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.cat-batch-row:hover {
  background: rgba(0, 0, 0, 0.03);
}
.cat-batch-row.is-ready {
  background: rgba(46, 125, 50, 0.06);
}
.cat-batch-row.is-error {
  background: rgba(198, 40, 40, 0.06);
}
.cat-batch-row.is-exists {
  opacity: 0.72;
}
.cat-batch-row.is-fetching {
  background: rgba(58, 110, 165, 0.08);
}
.cat-batch-row__cc {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted, #666);
}
.cat-batch-row__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}
.cat-batch-row__status {
  text-align: right;
}
.cat-batch-apply-status {
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--accent, #3a6ea5);
}
.cat-promote .cat-promote-action {
  min-width: 220px;
  max-width: 100%;
}
.catalog-day-list-head {
  flex-wrap: wrap;
  gap: 6px;
}
.catalog-day-list-head > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.acat-items-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.acat-item-card {
  border: 1px solid var(--border, #e2e2e2);
}
.acat-item-body-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  align-items: start;
}
.acat-item-col--tiered,
.acat-item-col--hotels {
  min-width: 0;
}
.acat-tiered-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}
.acat-item-col--hotels .acat-hotel-costs {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.acat-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.acat-item-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted, #6b7280);
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
}
.acat-item-collapse-btn:hover {
  background: color-mix(in srgb, var(--surface-2, #f3f4f6) 80%, transparent);
  color: var(--text, #111);
}
.acat-item-collapse-chevron {
  display: inline-block;
  font-size: 12px;
  line-height: 1;
  transition: transform 0.15s ease;
  transform: rotate(90deg);
}
.acat-item-card.is-collapsed .acat-item-collapse-chevron {
  transform: rotate(0deg);
}
.acat-item-card.is-collapsed .acat-item-body-split {
  display: none;
}
.acat-item-title {
  flex: 1 1 auto;
  min-width: 160px;
  font-weight: 600;
}
.acat-item-title,
.acat-item-month,
.acat-item-globalk {
  height: 32px;
  box-sizing: border-box;
}
.acat-inline-field .acat-item-month,
.acat-inline-field .acat-item-globalk {
  align-self: stretch;
}
.acat-item-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.acat-inline-field {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: var(--muted, #666);
}
.acat-item-globalk {
  width: 92px;
}
.acat-proposed-note {
  margin: 0 0 8px;
}

.acat-help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--muted, #6b7280) 70%, transparent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: var(--muted, #6b7280);
  cursor: help;
  flex-shrink: 0;
  vertical-align: middle;
  user-select: none;
}

.acat-quote-section {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  margin-bottom: 10px;
  background: color-mix(in srgb, var(--surface, #fff) 92%, var(--surface-2, #f5f5f0) 8%);
}

.acat-quote-section--tiered-root {
  margin-bottom: 0;
}

.acat-quote-section--season {
  margin-bottom: 8px;
  border-style: dashed;
}

.acat-quote-section > summary {
  list-style: none;
  cursor: pointer;
}

.acat-quote-section > summary::-webkit-details-marker {
  display: none;
}

.acat-quote-section__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 13px;
}

.acat-quote-section--tiered-root > .acat-quote-section__head .acat-auto-agency-round {
  margin-left: auto;
  font-weight: 500;
}

.acat-quote-section__head::before {
  content: "▸";
  font-size: 11px;
  color: var(--muted, #6b7280);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.acat-quote-section--static > .acat-quote-section__head::before {
  content: none;
  display: none;
}

.acat-quote-section[open] > .acat-quote-section__head::before {
  transform: rotate(90deg);
}

.acat-quote-section__title {
  flex: 0 1 auto;
  min-width: 0;
}

.acat-quote-section__summary-extra {
  margin-left: auto;
  font-weight: 400;
}

.acat-quote-section__body {
  padding: 0 10px 10px;
}

.acat-global-hotel-mk,
.acat-agency-hotel-mk {
  max-width: 70px;
  width: 70px;
}

.acat-season-suppl-inp {
  max-width: 70px;
  width: 70px;
}

.acat-item-table td.acat-num,
.acat-item-table th.acat-num {
  text-align: right;
}
.acat-item-table .acat-suppl-inp {
  width: 96px;
  text-align: right;
}

.acat-hotel-costs--season .acat-season-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
}
.acat-season-toolbar .acat-scenario-add,
.acat-season-toolbar .acat-scenario-del {
  flex: 0 0 auto;
  box-sizing: border-box;
  height: 24px;
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  border-radius: 4px;
}
.acat-season-toolbar .acat-global-hotel-mk,
.acat-season-toolbar .acat-agency-hotel-mk {
  box-sizing: border-box;
  height: 24px;
  min-height: 24px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
  border-radius: 4px;
}
.acat-scenario-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.acat-scenario-switch-label {
  white-space: nowrap;
}
.acat-scenario-btns {
  display: inline-flex;
  gap: 3px;
}
.acat-scenario-btn {
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--border, #d1d5db);
  border-radius: 4px;
  background: #fff;
  color: var(--text, #1c1c1f);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.acat-scenario-btn:hover:not(:disabled) {
  border-color: var(--text, #1c1c1f);
}
.acat-scenario-btn.is-active {
  background: var(--text, #1c1c1f);
  border-color: var(--text, #1c1c1f);
  color: #fff;
}
.acat-scenario-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.acat-scenario-hint {
  margin: 0 0 8px;
}
.acat-season-hotel-cell {
  min-width: 180px;
  max-width: 260px;
}
.acat-season-hotel-picks {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.acat-season-hotel-picks .acat-scenario-hotel,
.acat-season-hotel-picks .acat-scenario-roomcat {
  width: 100%;
  max-width: 240px;
}
.acat-season-hotel-picks .acat-scenario-hotel {
  font-weight: 700;
}
.acat-season-hotel-picks .acat-scenario-hotel option {
  font-weight: 700;
}
.acat-season-grid .acat-season-col {
  min-width: 120px;
  vertical-align: bottom;
}
.acat-season-col-name {
  display: block;
  font-weight: 600;
}
.acat-season-col-dates {
  display: block;
  font-size: 10px;
  line-height: 1.3;
  max-width: 140px;
  white-space: normal;
}
.acat-season-date-red {
  color: #dc2626;
}
.acat-season-net-paren {
  color: var(--muted, #6b7280);
  font-size: 0.92em;
}
.acat-season-merge-note {
  margin: 0 0 8px;
  display: none;
}
.acat-mid-season-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.acat-season-tiered-block {
  margin-bottom: 14px;
}
.acat-season-tiered-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 6px;
}
.acat-season-suppl-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.acat-season-suppl-hint {
  white-space: nowrap;
}
.acat-season-tiered-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
}
.acat-season-total-ov {
  display: block;
  width: 88px;
  margin-top: 4px;
  font-size: 11px;
}
.acat-tiered-table-wrap {
  overflow-x: auto;
  margin-bottom: 4px;
}
.acat-tiered-table {
  font-size: 11px;
  min-width: 720px;
}
/* Slightly tighter gap between Pax and With hotel */
.acat-tiered-table th:first-child,
.acat-tiered-table td:first-child {
  padding-right: 4px;
  white-space: nowrap;
}
.acat-tiered-table th:nth-child(2),
.acat-tiered-table td:nth-child(2) {
  padding-left: 4px;
}
.acat-tiered-table th.acat-tier-prop-h,
.acat-tiered-table td.acat-tier-prop {
  width: 64px;
  padding-left: 4px;
  padding-right: 4px;
}
.acat-tiered-table .acat-tier-prop-inp {
  width: 56px;
  font-size: 11px;
  text-align: right;
  padding: 2px 4px;
}
.acat-tiered-table .acat-tier-prop-inp--derived {
  background: var(--surface-2, #f3f4f6);
  color: var(--muted, #6b7280);
  border-style: dashed;
  cursor: default;
}
.acat-tiered-table .acat-tier-calc {
  white-space: nowrap;
}
.acat-tiered-table tr.acat-tier-explode-row .acat-tier-explode-cell {
  cursor: pointer;
}
.acat-tiered-table tr.acat-tier-explode-row .acat-tier-explode-cell:hover {
  background: rgba(126, 173, 90, 0.12);
}
.acat-explode-btn {
  margin-left: 0.25rem;
  vertical-align: middle;
  min-width: 1.5rem;
  padding: 0 0.3rem;
  line-height: 1.2;
  font-weight: 700;
}
.acat-explode {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: min(78vh, 900px);
  overflow: auto;
  padding-right: 0.15rem;
}
.acat-explode-head {
  margin: 0;
  font-size: 0.95rem;
}
.acat-explode-summary {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  background: var(--surface-2, #f7f6f4);
  border: 1px solid var(--border, #e6e2dc);
  border-radius: 8px;
}
.acat-explode-line {
  display: grid;
  grid-template-columns: minmax(9.5rem, 12rem) 1fr;
  gap: 0.65rem 1rem;
  align-items: baseline;
  font-size: 0.9rem;
}
.acat-explode-line--block {
  align-items: start;
}
.acat-explode-k {
  color: var(--muted, #6b7280);
  font-weight: 600;
}
.acat-explode-v {
  font-variant-numeric: tabular-nums;
}
.acat-explode-list {
  line-height: 1.45;
  font-size: 0.84rem;
}
.acat-explode-formula-box {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(126, 173, 90, 0.35);
  background: rgba(126, 173, 90, 0.08);
}
.acat-explode-formula-title {
  font-weight: 700;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
}
.acat-explode-formula {
  font-size: 0.92rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.acat-explode-formula-steps {
  margin-top: 0.55rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.acat-explode-foot {
  margin: 0;
}
.modal-panel--acat-explode {
  width: min(980px, 96vw);
}
.acat-tier-mk-paren {
  margin-left: 2px;
}
.acat-tier-test.is-ok,
.acat-tier-tot.is-ok,
.acat-tier-calc-test.is-ok {
  color: #16a34a;
  font-weight: 600;
}
.acat-tier-test.is-warn,
.acat-tier-tot.is-warn,
.acat-tier-calc-test.is-warn {
  color: #dc2626;
  font-weight: 600;
}
.acat-tier-profit {
  font-weight: 600;
}
.acat-tier-calc-details {
  margin-top: 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.acat-tier-calc-details[open] {
  background: var(--surface-2, #f0f2ea);
  border-color: var(--border, #e2e2e2);
  padding: 8px 10px 10px;
}
.acat-tier-calc-details summary {
  cursor: pointer;
  user-select: none;
  margin-bottom: 4px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.acat-tier-calc-details summary::-webkit-details-marker {
  display: none;
}
.acat-tier-calc-details summary::before {
  content: "▸";
  font-size: 10px;
  color: var(--muted, #6b7280);
  transition: transform 0.15s ease;
}
.acat-tier-calc-details[open] summary {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--border, #e2e2e2) 70%, transparent);
  font-weight: 600;
  color: var(--text, #1f2937);
}
.acat-tier-calc-details[open] summary::before {
  transform: rotate(90deg);
}
.acat-tier-calc-details[open] .table-wrap {
  background: color-mix(in srgb, var(--surface, #fff) 55%, transparent);
  border-radius: 4px;
}
.acat-tier-calc-details[open] .acat-tier-calc-table thead th {
  background: color-mix(in srgb, var(--surface, #fff) 80%, var(--surface-2, #f0f2ea) 20%);
}
.acat-tier-profit-agency {
  font-weight: 600;
}
.acat-tier-calc-table {
  font-size: 10px;
  min-width: 480px;
}
.acat-tier-calc-table .acat-tier-veh-h,
.acat-tier-calc-table .acat-tier-veh-cell {
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted, #6b7280);
}
.acat-tier-calc-table .acat-tier-veh-h {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.acat-tier-calc-table .acat-tier-veh-cell.acat-tier-veh-cell--override {
  color: #dc2626 !important;
  font-weight: 700;
}
.acat-tier-tot-jump {
  font-weight: 600;
}
.acat-tier-delta.is-pos {
  color: #16a34a;
  font-weight: 600;
}
.acat-tier-delta.is-neg {
  color: #dc2626;
  font-weight: 600;
}
.acat-tier-delta.is-zero {
  color: var(--muted, #6b7280);
}

.acat-hotel-costs {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border, #e8e8e8);
}
.acat-hotel-costs-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}
.acat-hotel-costs-empty {
  margin: 0;
}
.acat-mk-mismatch-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #f87171;
  white-space: nowrap;
  vertical-align: middle;
  cursor: help;
}
.acat-hotel-warn {
  margin: 0 0 10px;
  padding: 8px 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  font-size: 12px;
  color: #9a3412;
}
.acat-hotel-warn-line + .acat-hotel-warn-line {
  margin-top: 4px;
}
.acat-hotel-group {
  margin-bottom: 12px;
}
.acat-hotel-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.acat-hotel-table td.acat-num,
.acat-hotel-table th.acat-num {
  text-align: right;
}
.acat-hotel-row--warn td {
  background: #fffbeb;
}
.acat-hotel-flag {
  color: #b45309;
  font-weight: 700;
}
.itv-hotel-warn {
  color: #b45309;
  font-size: 12px;
  font-weight: 600;
}

.acat-without-hotel-check {
  margin-top: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.35;
}
.acat-without-hotel-check__title {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}
.acat-without-hotel-check__msg {
  margin: 0;
}
.acat-without-hotel-check__list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}
.acat-without-hotel-check__list li + li {
  margin-top: 0.15rem;
}
.acat-without-hotel-check--ok {
  border: 1px solid color-mix(in srgb, var(--border, #e5e7eb) 70%, #16a34a 30%);
  background: color-mix(in srgb, #dcfce7 42%, var(--surface, #fff) 58%);
  color: #166534;
}
.acat-without-hotel-check--bad {
  border: 1px solid color-mix(in srgb, var(--border, #e5e7eb) 65%, #dc2626 35%);
  background: color-mix(in srgb, #fee2e2 45%, var(--surface, #fff) 55%);
  color: #991b1b;
}
.acat-without-hotel-check--muted {
  border: 1px solid var(--border, #e5e7eb);
  background: color-mix(in srgb, var(--surface-2, #f8fafc) 80%, var(--surface, #fff) 20%);
}

.acat-it-guide-uplift {
  margin-top: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.35;
}
.acat-it-guide-uplift__title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}
.acat-it-guide-uplift__msg {
  margin: 0 0 0.4rem;
}
.acat-it-guide-uplift__grid {
  display: grid;
  gap: 0.15rem;
}
.acat-it-guide-uplift__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.acat-it-guide-uplift__prices {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.acat-it-guide-uplift__sell-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
}
.acat-it-guide-uplift__sell-lbl {
  white-space: nowrap;
}
.acat-it-guide-sell-inp {
  width: 4.25rem;
  min-width: 4.25rem;
  padding: 0.15rem 0.3rem;
  font-size: 0.78rem;
  text-align: right;
}
.acat-it-guide-uplift__row--sub {
  margin-bottom: 0.25rem;
}
.acat-it-guide-uplift__warn {
  margin: 0.45rem 0 0.2rem;
  color: #9a3412;
}
.acat-it-guide-uplift__list {
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
  color: #9a3412;
}
.acat-it-guide-uplift--info {
  border: 1px solid color-mix(in srgb, var(--border, #e5e7eb) 70%, #2563eb 30%);
  background: color-mix(in srgb, #dbeafe 40%, var(--surface, #fff) 60%);
  color: #1e3a8a;
}
.acat-it-guide-uplift--warn {
  border: 1px solid color-mix(in srgb, var(--border, #e5e7eb) 65%, #f59e0b 35%);
  background: color-mix(in srgb, #fef3c7 45%, var(--surface, #fff) 55%);
  color: #92400e;
}
.acat-it-guide-uplift--muted {
  border: 1px solid var(--border, #e5e7eb);
  background: color-mix(in srgb, var(--surface-2, #f8fafc) 80%, var(--surface, #fff) 20%);
}

.acat-new-form #acat-new-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acat-editor-backbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  margin-bottom: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
}
.acat-editor-backbar__label {
  color: #9a3412;
  font-size: 12px;
}

@media (max-width: 900px) {
  .acat-item-body-split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  .acat-meta-row {
    grid-template-columns: 1fr;
  }
}

/* ========== AI-1 assistant drawer ========== */
.ai-fab {
  position: fixed;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 1200;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border, #e5e7eb) 70%, #0f766e 30%);
  background: color-mix(in srgb, #ecfdf5 55%, #fff 45%);
  color: #0f766e;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  cursor: pointer;
}
.ai-fab:hover,
.ai-fab.is-open {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}
.ai-drawer {
  position: fixed;
  top: 0.85rem;
  right: 0.85rem;
  left: auto;
  z-index: 1210;
  width: min(380px, calc(100vw - 1.5rem));
  height: min(86vh, 760px);
  max-height: calc(100vh - 1.5rem);
  background: color-mix(in srgb, #f8fafc 70%, #fff 30%);
  border: 1px solid color-mix(in srgb, var(--border, #e5e7eb) 75%, #0f766e 25%);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
}
.ai-drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.ai-drawer.is-floating {
  right: auto;
}
.ai-drawer.is-dragging {
  cursor: grabbing;
  user-select: none;
  transition: none;
}
.ai-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem 0.65rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border, #e5e7eb) 80%, transparent);
  background: #fff;
  flex: 0 0 auto;
  cursor: grab;
  touch-action: none;
}
.ai-drawer.is-dragging .ai-drawer__head {
  cursor: grabbing;
}
.ai-drawer__head-main {
  min-width: 0;
  flex: 1 1 auto;
}
.ai-drawer__head-actions {
  display: inline-flex;
  gap: 0.25rem;
  flex: 0 0 auto;
}
.ai-drawer__title {
  font-size: 0.95rem;
}
.ai-drawer__sub {
  margin: 0.2rem 0 0;
}
.ai-drawer__body {
  padding: 0.85rem 1rem 2rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /* block layout: flex children were shrinking (flex-shrink:1) so content
     never overflowed and the drawer could not scroll to the bottom */
  display: block;
}
.ai-drawer__section {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--border, #e5e7eb) 85%, #0f766e 15%);
  border-radius: 10px;
  padding: 0.75rem 0.8rem 0.85rem;
  margin-bottom: 0.75rem;
}
.ai-drawer__section-title {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  margin-bottom: 0.55rem;
  color: #134e4a;
}
.ai-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
}
.ai-field > span {
  color: #64748b;
}
.ai-field .inp-sm,
.ai-drawer .inp-sm {
  max-width: none !important;
  width: 100%;
}
.ai-field--check {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0 0.55rem;
}
.ai-drawer__status {
  min-height: 1.2rem;
  margin: 0.15rem 0 0.55rem;
}
.ai-drawer__preview {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--border, #e5e7eb) 70%, #0f766e 30%);
  border-radius: 10px;
  padding: 0.75rem 0.8rem;
  margin-bottom: 0.75rem;
}
.ai-drawer__preview-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f766e;
  margin-bottom: 0.4rem;
}
.ai-drawer__preview-title {
  font-weight: 650;
  margin-bottom: 0.35rem;
}
.ai-drawer__preview-body {
  font-size: 0.84rem;
  line-height: 1.45;
  color: #334155;
  white-space: normal;
}
.ai-drawer__preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}
.ai-drawer__settings-link {
  margin: 0.25rem 0 0;
}
.settings-ai-panel .form-row {
  align-items: center;
}
@media (max-width: 720px) {
  .ai-drawer {
    width: calc(100vw - 1rem);
    right: 0.5rem;
    top: 0.5rem;
    height: calc(100vh - 1rem);
    max-height: calc(100vh - 1rem);
  }
  .ai-fab {
    right: 0.85rem;
    bottom: 0.85rem;
  }
}

/* AI brief itinerary preview */
.ai-brief-days {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.35rem 0 0.15rem;
  max-height: 280px;
  overflow: auto;
}
.ai-brief-day {
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  background: color-mix(in srgb, #f0fdfa 55%, #fff 45%);
  border: 1px solid color-mix(in srgb, var(--border, #e5e7eb) 80%, #0f766e 20%);
}
.ai-brief-day__head {
  font-size: 0.72rem;
  margin-bottom: 0.15rem;
}
.ai-brief-day__title {
  font-weight: 650;
  font-size: 0.84rem;
  margin-bottom: 0.15rem;
}
.ai-brief-day__body {
  font-size: 0.78rem;
  line-height: 1.4;
  color: #475569;
}

/* Practice QA (AI-3) */
.ai-qa-hint { margin: 0 0 0.45rem; }
.ai-qa-panel { margin-top: 0.35rem; }
.ai-qa-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.45rem;
}
.ai-qa-pill {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
}
.ai-qa-pill.is-error { color: #991b1b; border-color: #fecaca; background: #fef2f2; }
.ai-qa-pill.is-warn { color: #9a3412; border-color: #fed7aa; background: #fff7ed; }
.ai-qa-pill.is-info { color: #1e3a8a; border-color: #bfdbfe; background: #eff6ff; }
.ai-qa-narrative {
  flex: 1 1 100%;
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #334155;
}
.ai-qa-ok {
  margin: 0.2rem 0 0.5rem;
  color: #0f766e;
  font-weight: 600;
}
.ai-qa-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.ai-qa-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.1rem 0.45rem;
  text-align: left;
  width: 100%;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.ai-qa-item:hover { border-color: #0f766e; }
.ai-qa-item__sev {
  grid-row: 1 / span 2;
  align-self: start;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding-top: 0.15rem;
}
.ai-qa-item.is-error .ai-qa-item__sev { color: #b91c1c; }
.ai-qa-item.is-warn .ai-qa-item__sev { color: #c2410c; }
.ai-qa-item.is-info .ai-qa-item__sev { color: #1d4ed8; }
.ai-qa-item__title { font-weight: 650; font-size: 0.82rem; }
.ai-qa-item__detail { grid-column: 2; font-size: 0.75rem; color: #64748b; line-height: 1.35; }

/* AI drawer accordion + staff coach */
.ai-acc {
  padding: 0;
  overflow: visible;
  margin-bottom: 0.55rem;
}
.ai-acc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.55rem;
  box-sizing: border-box;
  padding: 0.65rem 0.8rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: #134e4a;
  text-align: left;
  user-select: none;
}
.ai-acc__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #134e4a;
  line-height: 1.3;
}
.ai-acc__chev {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #0f766e;
  border-bottom: 2px solid #0f766e;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  flex: 0 0 auto;
  margin-left: 0.35rem;
}
.ai-acc.is-open .ai-acc__chev {
  transform: rotate(45deg);
}
.ai-acc__body {
  display: none;
  padding: 0 0.8rem 0.85rem;
}
.ai-acc.is-open .ai-acc__body {
  display: block;
}
.ai-acc .ai-drawer__preview {
  margin-top: 0.55rem;
  margin-bottom: 0.15rem;
}
.ai-coach-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.5rem;
}
.ai-coach-q {
  margin: 0 0 0.35rem;
}
.ai-coach-a {
  font-size: 0.84rem;
  line-height: 1.45;
  color: #334155;
}
.ai-drawer__section.ai-acc {
  margin-bottom: 0;
}


.ai-fill-err {
  margin: 0.45rem 0 0;
  color: #b91c1c;
  font-size: 0.8rem;
}
.ai-fill-action {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.ai-fill-action:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.ai-fill-alts {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.ai-fill-alt-btn {
  font-size: 0.72rem !important;
}
.ai-markup-hint {
  margin: 0.5rem 0 0;
  line-height: 1.35;
}

/* Visits archive — insert modal */
.vis-insert-results {
  max-height: min(52vh, 28rem);
  overflow: auto;
  margin-top: 0.55rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 6px;
}
.vis-insert-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.vis-insert-row:last-child {
  border-bottom: 0;
}
.vis-insert-row__main {
  min-width: 0;
  flex: 1;
}
.vis-insert-row__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
}
.vis-insert-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  flex: 0 0 auto;
}
.vis-insert-row__preview {
  margin-top: 0.2rem;
  line-height: 1.35;
}
.vis-insert-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: #334155;
  background: rgba(15, 23, 42, 0.08);
}
.vis-insert-badge--archive {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.12);
}
.vis-insert-badge--daytour {
  color: #a16207;
  background: rgba(161, 98, 7, 0.12);
}
.vis-insert-badge--itinerary {
  color: #1d4ed8;
  background: rgba(29, 78, 216, 0.12);
}
.ai-option-diff {
  font-size: 0.85rem;
  line-height: 1.4;
}
.ai-option-diff__rows {
  margin-top: 0.45rem;
}
