/* UIUX-01 app shell + components */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background: var(--page-bg);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ——— Shell ——— */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: var(--z-topbar);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, #1a5fd4, #0d9488);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 12px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { color: #fff; font-size: 0.95rem; }
.brand-text span { font-size: var(--fs-meta); color: #8b97a8; }
.nav-scroll { flex: 1; overflow: auto; padding: 10px 8px 16px; }
.nav-section {
  font-size: 0.68rem; letter-spacing: .06em; text-transform: uppercase;
  color: #8090a4; padding: 10px 10px 6px; font-weight: 600;
}
.nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--sidebar-text); text-decoration: none;
  border: 0; background: transparent; width: 100%; text-align: left;
  cursor: pointer;
}
.nav-link > span:not(.ico) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.2;
  max-height: 2.4em;
  word-break: break-word;
  min-width: 0;
}
.nav-link:hover { background: rgba(255,255,255,.05); text-decoration: none; color: #fff; }
.nav-link.active { background: var(--sidebar-active); color: #fff; }
.nav-link .ico {
  width: 1.1rem;
  height: 1.1rem;
  opacity: .9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 0; /* hide accidental text glyphs; SVG uses rem below */
  line-height: 0;
}
/* Sidebar icons: rem not em — parent .ico has font-size:0 so 1em would render 0×0 */
.nav-link .ico .ui-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
  color: currentColor;
  flex-shrink: 0;
}
.nav-link:hover .ico,
.nav-link:focus-visible .ico,
.nav-link.active .ico {
  opacity: 1;
}
.bn-ico .ui-icon,
.btn .ui-icon,
.dirty-ico .ui-icon,
.ctx-chevron .ui-icon,
.ui-icon-host .ui-icon {
  width: 1.05em;
  height: 1.05em;
  display: block;
}
.bn-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 0;
  height: 22px;
}
.dirty-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dirty-ico {
  display: inline-flex;
  font-size: 10px;
  line-height: 0;
}
.btn-icon .ui-icon,
.btn-menu .ui-icon {
  width: 18px;
  height: 18px;
}
.btn [data-combo-clear] .ui-icon,
[data-combo-clear] .ui-icon {
  width: 12px;
  height: 12px;
}
.ctx-chevron {
  display: inline-flex;
  font-size: 14px;
  line-height: 0;
}
/* UIUX-02M.2 — icons are SVG; never inherit text font for glyphs */
.ui-icon {
  flex: 0 0 auto;
  pointer-events: none;
  color: inherit;
}
.nav-note {
  margin: 12px 10px; padding: 8px 10px; border-radius: 6px;
  background: rgba(255,255,255,.04); font-size: var(--fs-meta); color: #9aa8ba;
}
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--header-height);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; position: sticky; top: 0; z-index: var(--z-topbar);
}
.topbar-title { font-weight: 600; font-size: var(--fs-h1); }
.topbar-crumb { color: var(--text-muted); font-size: var(--fs-label); }
.topbar-spacer { flex: 1; }
.topbar-meta { display: flex; align-items: center; gap: 8px; font-size: var(--fs-label); color: var(--text-secondary); }
.chip-env {
  background: var(--warning-bg); color: var(--warning);
  border: 1px solid #f3d9b0; border-radius: 999px;
  padding: 2px 8px; font-size: var(--fs-meta); font-weight: 600;
}
.workspace { flex: 1; padding: var(--content-pad); min-height: 0; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--control-height); height: auto; padding: 4px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-primary);
  cursor: pointer; font-weight: 500;
  white-space: normal; text-align: center; line-height: 1.2;
  max-width: 100%;
  /* UIUX-02T.3E — controlled 2-line chrome; footprint stays stable */
  display: -webkit-inline-box;
  display: inline-flex;
  -webkit-line-clamp: unset;
}
.btn .ui-i18n-2line,
.btn-label-wrap {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.2;
  max-height: 2.4em;
  word-break: break-word;
}
.btn:hover { background: #f8fafc; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger-bg); border-color: #f0b4ad; color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { min-height: 28px; height: auto; padding: 3px 8px; font-size: var(--fs-label); }
.btn-icon { width: var(--control-height); min-width: var(--control-height); padding: 0; flex-shrink: 0; }

/* ——— Forms ——— */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label, .field .lbl {
  font-size: var(--fs-label); color: var(--text-secondary); font-weight: 500;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-height: 2.5em;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.field.required label::after, .field.required .lbl::after { content: " *"; color: var(--danger); }
.control, .field input, .field select, .field textarea {
  height: var(--control-height); padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: #fff; width: 100%;
}
.field textarea { height: auto; min-height: 64px; padding: 8px 10px; resize: vertical; }
.control:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--primary-soft); border-color: var(--primary);
}
.control.is-invalid, .field input.is-invalid { border-color: var(--danger); background: #fff8f8; }
.field-hint { font-size: var(--fs-meta); color: var(--text-muted); }
.field-error { font-size: var(--fs-meta); color: var(--danger); }
.form-grid {
  display: grid; gap: 10px 12px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-10 { grid-column: span 10; }
.span-1 { grid-column: span 1; }
.span-12 { grid-column: span 12; }
@media (max-width: 1100px) {
  .span-1, .span-2, .span-3, .span-4, .span-5 { grid-column: span 6; }
  .span-6, .span-8, .span-10 { grid-column: span 12; }
}

/* ——— Combobox ——— */
.combo { position: relative; }
.combo-input-wrap { display: flex; gap: 4px; }
.combo-input-wrap input { flex: 1; }
.combo-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px);
  background: #fff; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  max-height: 220px; overflow: auto;
  z-index: var(--z-combo-dropdown); display: none;
}
.combo-menu.combo-menu-portal {
  position: fixed; right: auto;
  display: block; /* portaled menu leaves .combo.open — cannot rely on descendant selector */
  z-index: var(--z-combo-dropdown);
}
.combo-menu.combo-menu-portal.in-modal {
  z-index: var(--z-modal-combo-dropdown);
}
.combo-portal-root {
  position: fixed; inset: 0; pointer-events: none;
  z-index: var(--z-combo-dropdown); /* portal layer above control decoration (UIUX-02T.7D) */
}
.combo-portal-root.combo-portal-modal {
  z-index: var(--z-modal-combo-dropdown);
}
.combo-portal-root .combo-menu {
  pointer-events: auto;
  display: block;
}
.combo.open .combo-menu { display: block; }
.combo-option {
  padding: 7px 10px; cursor: pointer; display: flex; gap: 8px; align-items: baseline;
  white-space: normal; line-height: 1.35;
}
.combo-menu.combo-options-single-line .combo-option {
  white-space: nowrap;
  overflow: hidden;
  align-items: center;
  line-height: 1.35;
}
.combo-menu.combo-options-single-line .combo-option > span:not(.code) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* UIUX-02T.7C — select-like one-column list (Hotel; code hidden, left-aligned) */
.combo-menu.combo-options-simple .combo-option {
  display: block;
  padding: 8px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.combo-menu.combo-options-simple .combo-option .combo-option-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo-option:hover, .combo-option.active { background: var(--primary-soft); }
.combo-option .code {
  font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--text-muted);
  min-width: 2.5rem; flex-shrink: 0; font-weight: 600;
}
.combo-option .code::after { content: "|"; margin-left: 8px; color: var(--border-strong); font-weight: 400; }
.combo-empty { padding: 10px; color: var(--text-muted); font-size: var(--fs-label); }

/* ——— Badges / alerts ——— */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: 999px;
  font-size: var(--fs-meta); font-weight: 600; border: 1px solid transparent;
}
.badge-success { background: var(--success-bg); color: var(--success); border-color: #b7e4cb; }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: #f3d9b0; }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: #f0b4ad; }
.badge-info { background: var(--info-bg); color: var(--info); border-color: #c7dbff; }
.badge-neutral { background: var(--neutral-bg); color: var(--neutral); border-color: #d7dbe2; }
.alert {
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: #fff; font-size: var(--fs-label);
}
.alert-info { background: var(--info-bg); border-color: #c7dbff; color: #163a8a; }
.alert-warning { background: var(--warning-bg); border-color: #f3d9b0; color: #7a3b08; }
.alert-danger { background: var(--danger-bg); border-color: #f0b4ad; color: #7a241c; }

/* ——— Page chrome ——— */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.page-head h1 { margin: 0; font-size: var(--fs-h1); font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--text-muted); font-size: var(--fs-label); }
.toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 10px; padding: 8px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
}
.toolbar .grow { flex: 1; min-width: 180px; }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
}
.panel-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: var(--fs-h2);
}
.panel-bd { padding: 12px; }
.panel-ft {
  padding: 8px 12px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end; background: #fafbfc;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.split-master {
  display: grid; grid-template-columns: 280px 1fr; gap: 12px; min-height: 560px;
}
@media (max-width: 1100px) { .split-master { grid-template-columns: 1fr; } }
.list-pane { display: flex; flex-direction: column; min-height: 0; }
.list-search { padding: 8px; border-bottom: 1px solid var(--border); }
.list-items { overflow: auto; flex: 1; max-height: 640px; }
.list-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; border-bottom: 1px solid var(--border);
  cursor: pointer; background: transparent; border-left: 3px solid transparent;
  text-align: left; width: 100%;
}
.list-item:hover { background: #f7f9fc; }
.list-item.active { background: var(--primary-soft); border-left-color: var(--primary); }
.list-item .t { font-weight: 600; }
.list-item .s { font-size: var(--fs-meta); color: var(--text-muted); }

/* ——— Table ——— */
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
table.data {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: var(--fs-table);
}
table.data th, table.data td {
  padding: 7px 10px; border-bottom: 1px solid var(--border);
  text-align: left; vertical-align: middle; white-space: nowrap;
}
table.data th {
  position: sticky; top: 0; background: #f7f9fc; z-index: 1;
  font-weight: 600; color: var(--text-secondary); border-bottom-color: var(--border-strong);
}
table.data tbody tr { height: var(--table-row-h); cursor: pointer; }
table.data tbody tr:hover { background: #f7f9fc; }
table.data tbody tr.selected { background: var(--primary-soft); }
table.data .num { font-variant-numeric: tabular-nums; text-align: right; }
.table-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; font-size: var(--fs-label); color: var(--text-secondary);
}

/* ——— Tabs ——— */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 12px; align-items: stretch; }
.tab {
  appearance: none; border: 0; background: transparent;
  padding: 6px 10px; cursor: pointer; color: var(--text-secondary);
  border-bottom: 2px solid transparent; font-weight: 500;
  min-height: 36px; max-height: 44px;
  display: inline-flex; align-items: center; gap: 4px;
  white-space: normal; line-height: 1.15; text-align: center;
  flex: 0 1 auto; max-width: 9.5rem;
}
.tab .tab-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}
.tab:hover { color: var(--text-primary); background: #f7f9fc; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab.has-error { color: var(--danger); }
.tab-count {
  margin-left: 2px; font-size: var(--fs-meta); background: var(--neutral-bg);
  border-radius: 999px; padding: 0 6px; flex-shrink: 0;
}
.tab.active .tab-count { background: var(--primary-soft); color: var(--primary); }

/* ——— Booking / voucher dense layouts ——— */
.ops-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 10px; padding: 6px 8px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
}
.ops-bar .seg {
  display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden;
}
.ops-bar .seg button {
  border: 0; background: #fff; padding: 6px 10px; cursor: pointer; font-size: var(--fs-label);
}
.ops-bar .seg button.active { background: var(--primary); color: #fff; }
.booking-split {
  display: grid; grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.15fr);
  gap: 12px; margin-bottom: 60px;
}
@media (max-width: 1200px) { .booking-split { grid-template-columns: 1fr; } }
.voucher-split {
  display: grid; grid-template-columns: 1fr 300px; gap: 12px; margin-bottom: 60px;
}
@media (max-width: 1200px) { .voucher-split { grid-template-columns: 1fr; } }
.kv-grid {
  display: grid; grid-template-columns: minmax(96px, 112px) minmax(0, 1fr) minmax(96px, 112px) minmax(0, 1fr);
  gap: 6px 8px; align-items: start;
}
.kv-grid .k {
  font-size: var(--fs-label); color: var(--text-secondary);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-height: 2.5em;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding-top: 6px;
}
.kv-grid .v input, .kv-grid .v select, .kv-grid .v .combo, .kv-grid .v textarea { width: 100%; }
@media (max-width: 900px) {
  .kv-grid { grid-template-columns: minmax(88px, 100px) minmax(0, 1fr); }
}
.price-rail .row {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-label);
}
.price-rail .total { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.actionbar {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 8px 12px; background: rgba(255,255,255,.96);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: 0 -4px 16px rgba(31,35,41,.06); margin-top: 12px;
}
.actionbar .spacer { flex: 1; }
.status-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm); margin-bottom: 10px;
  border: 1px solid; font-weight: 600;
}
.status-banner.canceled { background: var(--danger-bg); border-color: #f0b4ad; color: var(--danger); }
.status-banner.confirmed { background: var(--success-bg); border-color: #b7e4cb; color: var(--success); }
.status-banner.draft { background: var(--neutral-bg); border-color: #d7dbe2; color: var(--neutral); }

/* Fast-entry sections (Modern Legacy — visible groups, not hidden tabs) */
.section-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  margin-bottom: 10px;
  overflow: hidden;
}
.section-block > summary,
.section-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; background: #f7f9fc; border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: var(--fs-h2); cursor: default;
}
.section-block > summary { cursor: pointer; list-style: none; }
.section-block > summary::-webkit-details-marker { display: none; }
.section-block > summary::after { content: ""; }
.section-bd { padding: 10px 12px; }
.voucher-main { min-width: 0; }
.voucher-split.sticky-price {
  align-items: start;
}
.voucher-split.sticky-price .price-rail {
  position: sticky; top: calc(var(--header-height) + var(--context-bar-h) + 12px);
}
.price-compact-mobile {
  display: none; margin-bottom: 10px; padding: 8px 12px;
  background: var(--primary-soft); border: 1px solid #c7dbff; border-radius: var(--radius-md);
  font-weight: 600;
}
.ops-kbd-hint {
  margin: 0 0 8px; padding: 6px 8px;
  font-size: 11px; color: var(--text-secondary);
  background: #f3f5f8; border-radius: var(--radius-sm); border: 1px dashed var(--border);
}
.ops-kbd-hint code {
  font-family: var(--font-mono); font-size: 11px;
  background: #fff; padding: 0 4px; border-radius: 3px; border: 1px solid var(--border);
}
.ops-field-error, .field-error {
  font-size: 11px; color: var(--danger); margin-top: 2px;
}
.smart-time.is-invalid,
.control.is-invalid,
input.is-invalid {
  border-color: var(--danger) !important; background: #fff8f8;
}
.smart-time { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
[data-ops-form] input:focus,
[data-ops-form] select:focus,
[data-ops-form] textarea:focus,
[data-ops-form] [data-combo-input]:focus {
  outline: 2px solid var(--primary-soft);
  outline-offset: 1px;
  border-color: var(--primary);
}
select.ops-normal-select:focus {
  box-shadow: 0 0 0 2px var(--primary-soft);
}

/* ——— Modal / drawer ——— */
.backdrop {
  position: fixed; inset: 0; background: rgba(15, 27, 45, .45);
  z-index: var(--z-backdrop); display: none;
}
.backdrop.open { display: block; }
.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 40px);
  background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  z-index: var(--z-modal); display: none; flex-direction: column;
}
.modal.open { display: flex; }
.modal.sm { width: min(440px, calc(100vw - 32px)); }
.modal.lg { width: min(980px, calc(100vw - 24px)); }
.modal.xl { width: min(1180px, calc(100vw - 16px)); }
.modal-hd, .drawer-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-hd h2, .drawer-hd h2 {
  margin: 0; font-size: 1rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-height: 2.5em;
  word-break: break-word;
}
.modal-bd, .drawer-bd { padding: 14px; overflow: auto; }
.modal-ft, .drawer-ft {
  padding: 8px 12px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap;
  background: #fafbfc; flex-shrink: 0;
}
.modal-ft .btn-primary,
.drawer-ft .btn-primary,
.actionbar .btn-primary,
.confirm-dialog .btn-primary,
.confirm-dialog .btn-danger {
  flex-shrink: 0;
}

/* UIUX-02T.3C — confirmation / dirty-confirm layer (above data-entry modal) */
.confirm-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 27, 45, .55);
  z-index: var(--z-confirm-backdrop);
  display: none;
}
.confirm-backdrop.open { display: block; }
.confirm-dialog {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  z-index: var(--z-confirm); display: none; flex-direction: column;
}
.confirm-dialog.open { display: flex; }
.confirm-dialog .modal-hd { padding: 10px 14px; }
.confirm-dialog .modal-bd { padding: 14px; }
.confirm-dialog .modal-ft { padding: 10px 14px; gap: 8px; }
html.force-mobile .confirm-dialog {
  width: min(440px, calc(100vw - 24px));
  top: 46%; /* keep clear of bottom nav */
}
@media (max-width: 767.98px) {
  .confirm-dialog {
    width: min(440px, calc(100vw - 24px));
    top: 46%;
  }
}
/* While confirm open, block pointer to underlying overlays */
html.confirm-open #ui-modal,
html.confirm-open #ui-drawer {
  pointer-events: none;
}
/* UIUX-02T.6: Transfer modal / type / next-leg styles moved to css/transfer.css */
.intent-hint { display: none; }
.pricing-state-inline {
  margin: 0; padding: 4px 8px; min-height: 28px;
  display: flex; align-items: center; font-size: 11px;
}
.flex.tight { gap: 4px; font-size: 11px; min-height: 28px; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh;
  width: min(560px, calc(100vw - 48px));
  background: #fff; box-shadow: var(--shadow-md);
  z-index: var(--z-drawer); display: none; flex-direction: column;
}
.drawer.open { display: flex; }
.excursion-cols {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; min-height: 280px;
}
.pick-col {
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
  display: flex; flex-direction: column;
}
.pick-col h3 {
  margin: 0; padding: 8px 10px; background: #f7f9fc; font-size: var(--fs-label);
  border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: .04em;
}
.pick-list { overflow: auto; max-height: 300px; }
.pick-item {
  display: block; width: 100%; text-align: left; border: 0; background: #fff;
  padding: 8px 10px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.pick-item:hover { background: #f7f9fc; }
.pick-item.active { background: var(--primary-soft); font-weight: 600; }

/* ——— States ——— */
.state-box {
  padding: 28px 16px; text-align: center; color: var(--text-secondary);
}
.state-box strong { display: block; color: var(--text-primary); margin-bottom: 4px; }
.skeleton {
  background: linear-gradient(90deg, #eef1f5 25%, #f7f9fc 37%, #eef1f5 63%);
  background-size: 400% 100%; animation: shimmer 1.2s ease infinite;
  border-radius: 4px; height: 12px; margin: 8px 0;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.checkrow { display: flex; gap: 14px; flex-wrap: wrap; }
.checkrow label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-label); }
.pup { color: var(--primary); font-weight: 700; font-size: var(--fs-meta); }
.dop { color: var(--accent); font-weight: 700; font-size: var(--fs-meta); }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); font-size: var(--fs-label); }
.badge-warn { background: var(--warning-bg); color: var(--warning); border-color: #f3d9b0; }
.btn-danger-outline { border-color: #f1b7b7; color: var(--danger); }
.arrdep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
@media (max-width: 900px) { .arrdep-grid { grid-template-columns: 1fr; } }
.guest-dense { grid-template-columns: minmax(96px, 112px) minmax(0, 1fr) minmax(96px, 112px) minmax(0, 1fr); }
.guest-dense .guest-name-span,
.guest-dense .pax-counts-span {
  grid-column: span 3;
}
/* UIUX-02T.3D — Guest Name ~two-line capacity; Enter advances (not Remark multiline) */
.control-guest-name {
  display: block;
  width: 100%;
  resize: none;
  min-height: 2.55em;
  max-height: 3.1em;
  line-height: 1.35;
  padding-top: 6px;
  padding-bottom: 6px;
  white-space: pre-wrap;
  overflow-y: auto;
  field-sizing: content; /* progressive; ignored where unsupported */
}
.pax-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 10px;
  align-items: end;
}
.pax-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pax-field label {
  font-size: var(--fs-meta);
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.2;
}
.pax-field .control {
  width: 100%;
  min-width: 0;
}
.control-computed {
  background: var(--neutral-bg);
  color: var(--text-primary);
  border-color: var(--border-strong);
  font-weight: var(--fw-semibold);
  cursor: default;
}
.pax-field-computed .control-computed {
  text-align: center;
}
.pax-hint {
  margin-top: 4px;
  font-size: var(--fs-meta);
  line-height: 1.25;
}
@media (max-width: 1100px) {
  .pax-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .guest-dense {
    grid-template-columns: minmax(88px, 100px) minmax(0, 1fr);
  }
  .guest-dense .guest-name-span,
  .guest-dense .pax-counts-span {
    grid-column: span 1;
  }
}
.hotel-timeline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0 0 10px; padding: 8px 10px;
  background: var(--primary-soft); border-radius: var(--radius-sm); font-size: var(--fs-label);
}
.ht-node { font-weight: 600; }
.ht-arrow { color: var(--text-muted); }
/* UIUX-02T.6: .xfer-list/card/rail* moved to css/transfer.css */
.price-resolved { font-weight: 700; color: var(--text-primary); font-size: var(--fs-body); }
.price-legacy, .price-unresolved {
  font-weight: 600; font-size: var(--fs-meta);
  color: var(--text-secondary); background: #f3f5f8; border: 1px dashed var(--border-strong);
  border-radius: 4px; padding: 2px 8px;
}
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: #f3f5f8; border-color: var(--border); color: var(--text-primary); }
.acc-parties-compact {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 8px; padding: 6px 10px;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  font-size: var(--fs-label); color: var(--text-secondary); background: #fafbfc;
}
/* UIUX-02T.6: .xfer-section* moved to css/transfer.css */
.stack-10 > * + * { margin-top: 10px; }
.compact-callout { padding: 8px 10px; }
.pricing-state {
  margin-top: 8px; padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: var(--fs-label);
}
.pricing-state-resolved { background: #e8f7ec; border: 1px solid #b7e0c2; }
.pricing-state-unresolved { background: var(--warning-bg); border: 1px solid #f3d9b0; }
.pricing-state-legacy_unavailable { background: #f3f5f8; border: 1px dashed var(--border-strong); }
.form-grid .span-1 { grid-column: span 1; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-8 { grid-column: span 8; }
.form-grid .span-10 { grid-column: span 10; }
.dense-xfer { gap: 8px; }
.stack-8 > * + * { margin-top: 8px; }
.stack-12 > * + * { margin-top: 12px; }
.flex { display: flex; gap: 8px; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.home-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.home-card {
  display: block; padding: 14px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-md); color: inherit; text-decoration: none;
}
.home-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); text-decoration: none; }
.home-card h3 { margin: 0 0 4px; font-size: var(--fs-h2); }
.home-card p { margin: 0; color: var(--text-muted); font-size: var(--fs-label); }

html.rail .app-sidebar { width: var(--sidebar-rail); }
html.rail .brand-text, html.rail .nav-section, html.rail .nav-link > span:not(.ico), html.rail .nav-note { display: none; }
html.rail .nav-link { justify-content: center; }
html.rail .nav-link .ico { display: inline-flex; }
@media (max-width: 900px) {
  .app-sidebar { position: fixed; transform: translateX(-100%); transition: transform .2s; }
  html.nav-open .app-sidebar { transform: none; }
}

/* ——— UIUX-02T.3E Localization layout resilience ——— */
.ui-lang-switch {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 2px 4px 2px 6px; background: #fff;
  font-size: var(--fs-meta);
}
.ui-lang-switch label {
  color: var(--text-muted); font-weight: 600; margin: 0;
  max-width: 2.2rem; overflow: hidden; white-space: nowrap;
}
.ui-lang-switch select {
  height: 26px; border: 0; background: transparent; font-weight: 600;
  color: var(--text-primary); padding: 0 4px; cursor: pointer;
}
.ui-lang-switch .ui-lang-hint {
  display: none;
}
.pax-field label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-height: 2.4em;
  word-break: break-word;
}
.table.data th {
  white-space: normal;
  line-height: 1.2;
  vertical-align: bottom;
}
.confirm-dialog .modal-bd {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ui-l10n-note {
  display: block;
  margin: 6px 0 0;
  font-size: var(--fs-meta);
  color: var(--text-muted);
  line-height: 1.3;
}
/* Do not clamp Guest Name / user-data controls via UI chrome rules */
.control-guest-name {
  -webkit-line-clamp: unset;
  display: block;
  max-height: 3.1em;
}
body {
  overflow-x: hidden; /* no global horizontal scroll from translated chrome */
}

/* UIUX-02M.1 — Ops date display DD-MMM-YYYY (ISO remains on native input) */
.ops-date-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.ops-date-wrap .ops-date-display {
  width: 100%;
  padding-right: 34px;
  font-variant-numeric: tabular-nums;
}
.ops-date-wrap .ops-date-native {
  position: absolute;
  right: 0;
  top: 0;
  width: 34px;
  height: 100%;
  min-height: var(--control-height);
  opacity: 0.02;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1; /* click target within control — must stay below combobox overlay */
}
.ops-date-wrap::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  pointer-events: none;
  z-index: 0;
}
/* Field sequence contract marker — geometry only via guest-dense / responsive */
.guest-ops-seq {
  /* same as guest-dense; keeps Legacy neighborhood order in DOM */
}

/* UIUX-02M — Guest ops composition + Mobile shell primitives */
.guest-ops { display: flex; flex-direction: column; gap: 10px; }
.guest-primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  align-items: start;
}
.guest-id-status {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.guest-name-field { grid-column: 1 / -1; }
.guest-agent-field { grid-column: 1 / -1; }
.guest-primary .pax-block { grid-column: 1 / -1; }
.guest-id-value {
  min-height: var(--control-height);
  display: flex; align-items: center;
  font-weight: 600;
}
.m-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
}
.m-section-sum {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px;
  font-weight: 600; font-size: var(--fs-label);
  cursor: pointer; list-style: none;
  background: #f7f9fc;
}
.m-section-sum::-webkit-details-marker { display: none; }
.m-sum-meta {
  font-weight: 500; color: var(--text-muted); font-size: var(--fs-meta);
  text-align: right; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.m-section-bd { padding: 10px 12px; border-top: 1px solid var(--border); }
.ops-bar-booking { position: relative; }
.ops-bar-trail { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.ops-more-sheet, .action-sheet {
  display: flex; flex-direction: column; gap: 6px;
  width: 100%;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 6px;
}
.actionbar-secondary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.topbar-identity { min-width: 0; }
.topbar-work {
  display: none;
  font-weight: 600; font-size: 0.9rem; line-height: 1.25;
  color: var(--text-primary);
}
.proto-desktop {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.proto-desktop-slot { display: inline-flex; }
.ctx-compact {
  display: none;
  width: 100%;
  align-items: center; justify-content: space-between; gap: 8px;
  border: 0; background: transparent; padding: 2px 0;
  font: inherit; color: var(--text-primary); text-align: left; cursor: pointer;
}
.ctx-compact #ctxCompactText {
  font-weight: 600; font-size: var(--fs-label);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ctx-chevron { color: var(--text-muted); }
.ctx-detail { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.proto-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(15,27,45,.45); z-index: calc(var(--z-nav-drawer) + 5);
}
.proto-backdrop.open { display: block; }
.proto-sheet {
  display: none;
  position: fixed; right: 0; top: 0; bottom: 0;
  width: min(360px, 92vw);
  background: #fff; z-index: calc(var(--z-nav-drawer) + 6);
  box-shadow: var(--shadow-md);
  flex-direction: column;
}
.proto-sheet.open { display: flex; }
.proto-sheet-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.proto-sheet-bd { padding: 12px 14px; overflow: auto; flex: 1; }
.proto-group {
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.proto-group .proto-desktop {
  flex-direction: column; align-items: stretch;
}
.proto-group .viewport-switch { width: 100%; display: flex; }
.proto-group .viewport-switch button { flex: 1; }

/* UIUX-02T.10 — Client-demo: hide dev chrome on Booking workspace route */
body.booking-client-view .nav-note,
body.booking-client-view [data-i18n="ctx.note"],
body.booking-client-view [data-i18n="brand.sub"] {
  display: none;
}

