/* ============================================================
   Admin kit — the shared look for the reworked hotel-admin pages.
   Rate Plan was the first to adopt it; the other legacy menus move onto
   it as they are reworked, so they read as one product.

   Wrap a page in  <div class="adm" id="...">  and build it from the
   adm- classes below. Everything is scoped under .adm, and every class is
   prefixed adm- because Bootstrap 3 already owns .btn, .table, .alert and
   .form-group. Legacy markup a model still prints (.form-control,
   plain tables) is restyled inside .adm too.

   Colours, radii and type come from tokens.css; nothing here declares a token.
   ============================================================ */

.adm {
  /* layout responds to the page's own width, which the left menu changes */
  container-type: inline-size;
  padding: 20px 22px 28px;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--slate-50);
}

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

/* Bootstrap's [hidden] rule ties with any later display: flex/grid and loses */
.adm [hidden] { display: none !important; }

.adm button, .adm input, .adm select, .adm textarea { font-family: inherit; }

.adm :focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ---------- page header ---------- */

.adm-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--slate-200);
}

.adm .adm-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--fs-22);
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
}

.adm-sub {
  max-width: 68ch;
  margin: 4px 0 0;
  font-size: var(--fs-13);
  line-height: 1.5;
  color: var(--slate-600);
}

.adm-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-head-actions form { margin: 0; }

/* "← Rate plans" above a detail page's title */
.adm .adm-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--blue-600);
  text-decoration: none;
}
.adm .adm-back:hover { color: var(--navy); text-decoration: underline; }

/* ---------- buttons ---------- */

.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 14px;
  font-size: var(--fs-13);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--slate-300);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.adm-btn:hover { color: var(--ink); text-decoration: none; border-color: var(--slate-400); background: var(--slate-50); }
.adm-btn:disabled, .adm-btn.is-busy { opacity: .6; cursor: not-allowed; }
.adm-btn .fa { font-size: 13px; }

.adm-btn-primary { color: var(--paper); background: var(--blue); border-color: var(--blue); }
.adm-btn-primary:hover { color: var(--paper); background: var(--blue-600); border-color: var(--blue-600); }

.adm-btn-danger { color: var(--danger); }
.adm-btn-danger:hover { color: var(--danger); background: var(--danger-50); border-color: rgba(192, 57, 43, .35); }

/* icon-only: always give it an aria-label */
.adm-btn-icon { width: 36px; padding: 0; }

/* on/off for one row; role="switch" + aria-checked carry the state */
.adm-switch {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 24px;
  padding: 0;
  background: var(--slate-300);
  border: 0;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
.adm-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--paper);
  border-radius: 50%;
  box-shadow: var(--e-1);
  transition: transform var(--dur) var(--ease);
}
.adm-switch[aria-checked="true"] { background: var(--ok); }
.adm-switch[aria-checked="true"]::after { transform: translateX(16px); }
.adm-switch:disabled { opacity: .6; cursor: progress; }

/* ---------- cards ---------- */

.adm-card {
  margin-bottom: 20px;
  background: var(--paper);
  border: 1px solid var(--slate-200);
  border-radius: var(--r-lg);
  box-shadow: var(--e-1);
  overflow: hidden;
}

.adm-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 20px;
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}

/* beg_responsive.css shrinks every .bengine-content h3; these outrank it */
.adm .adm-card-head h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--fs-15);
  font-weight: 700;
  color: var(--navy);
}

.adm-card-note { font-size: var(--fs-12); color: var(--slate-600); }

.adm-card-body { padding: 20px; }

.adm-card-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
}

/* ---------- forms ---------- */

.adm-form { display: grid; gap: 20px; }
/* a lone chip in a form ("Show the passwords") keeps its own width */
.adm-form > .adm-check { justify-self: start; }

.adm-field {
  display: grid;
  /* rows keep their height when a neighbour in an adm-pair is taller (a hint under it) */
  align-content: start;
  gap: 6px;
  min-width: 0;
  max-width: 560px;
  margin: 0;
  padding: 0;
  border: 0;
}
.adm-field-wide { max-width: none; }
/* a few-way choice or a colour inside a field keeps its own width (Search box) */
.adm-field > .adm-seg { justify-self: start; }
.adm input[type="color"] {
  justify-self: start;
  width: 52px;
  height: 38px;
  padding: 3px;
  background: var(--paper);
  border: 1px solid var(--slate-300);
  border-radius: var(--r);
  cursor: pointer;
}

.adm .adm-label {
  display: block;
  margin: 0;
  padding: 0;
  font-size: var(--fs-12);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--slate-600);
  border: 0;
}
/* a field that folds open (<details class="adm-field"><summary class="adm-label">): a chevron says so */
.adm details.adm-field > summary.adm-label { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.adm details.adm-field > summary.adm-label::-webkit-details-marker { display: none; }
.adm details.adm-field > summary.adm-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
.adm details.adm-field[open] > summary.adm-label::before { transform: rotate(45deg); }
.adm details.adm-field > summary.adm-label:hover { color: var(--ink); }

.adm-hint {
  margin: 0;
  font-size: var(--fs-12);
  line-height: 1.5;
  color: var(--slate-600);
}

.adm .form-control {
  width: 100%;
  height: auto;
  min-height: 38px;
  padding: 8px 11px;
  font-size: var(--fs-14);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--slate-300);
  border-radius: var(--r);
  box-shadow: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
/* Bootstrap 3 gives date inputs line-height:34px, which on top of the padding above made them taller than their neighbours */
.adm input[type="date"].form-control, .adm input[type="datetime-local"].form-control { line-height: normal; }
.adm .form-control:focus { outline: 0; border-color: var(--blue); box-shadow: var(--focus-ring); }
.adm .form-control::placeholder { color: var(--slate-400); }

/* a field that only appears for one choice, e.g. "specify the breakfast" */
.adm-sub-field { display: grid; gap: 6px; margin-top: 4px; }

/* two inputs side by side (amount + type, from + until); one column when narrow */
.adm-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* an input with its button, e.g. a code and "Make one up" */
.adm-inline { display: flex; gap: 8px; }
/* a unit after an input in an adm-inline, e.g. "%" or "THB" (Membership) */
.adm-unit { align-self: center; flex: 0 0 auto; font-size: var(--fs-13); font-weight: 600; color: var(--slate-600); }
.adm-inline > .form-control { flex: 1 1 auto; min-width: 0; }

/* what stopped a save, under the form */
.adm-form-error {
  margin: 16px 0 0;
  padding: 10px 12px;
  font-size: var(--fs-13);
  line-height: 1.45;
  color: var(--danger);
  background: var(--danger-50);
  border-radius: var(--r);
}

/* what a save did, under the form: the calm counterpart of adm-form-error */
.adm-form-done {
  margin: 16px 0 0;
  padding: 10px 12px;
  font-size: var(--fs-13);
  line-height: 1.45;
  color: var(--ok);
  background: var(--ok-50);
  border-radius: var(--r);
}

/* checkboxes as tappable chips */
.adm-checks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.adm .adm-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 12px;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--slate-300);
  border-radius: var(--r);
  cursor: pointer;
  user-select: none;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.adm .adm-check:hover { border-color: var(--slate-400); }
.adm .adm-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.adm .adm-check:has(input:checked) { color: var(--blue-600); background: var(--blue-50); border-color: var(--blue); }

/* long labels read better as an aligned checklist than as wrapping chips */
.adm-checks.is-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.adm-checks.is-list .adm-check { align-items: flex-start; width: 100%; line-height: 1.45; }
.adm-checks.is-list .adm-check input { margin-top: 2px; flex: 0 0 auto; }

.adm-checks-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }

/* ---------- pills and chips ---------- */

.adm-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 9px;
  font-size: var(--fs-11);
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.6;
  white-space: nowrap;
  border-radius: var(--r-pill);
}
.adm-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.adm-pill.is-on  { color: var(--ok); background: var(--ok-50); }
.adm-pill.is-off { color: var(--slate-600); background: var(--slate-100); }
/* an outcome that went wrong, e.g. a payment that failed */
.adm-pill.is-bad { color: var(--danger); background: var(--danger-50); }
/* dated things: is-on running, is-soon scheduled, is-past over */
.adm-pill.is-soon { color: var(--blue-600); background: var(--blue-50); }
.adm-pill.is-past { color: var(--slate-600); background: transparent; box-shadow: inset 0 0 0 1px var(--slate-300); }

.adm-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* names can run to a sentence: one line, cut with an ellipsis, full text in title */
.adm-chip {
  display: inline-block;
  max-width: 240px;
  padding: 2px 9px;
  overflow: hidden;
  font-size: var(--fs-12);
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
  color: var(--ink);
  background: var(--slate-100);
  border-radius: var(--r-pill);
}

/* "+N more" folds the rest of a long list; native <details>, no script */
.adm-more { display: inline-block; }
.adm-more[open] { flex-basis: 100%; }
.adm-more > summary {
  display: inline-flex;
  padding: 2px 9px;
  font-size: var(--fs-12);
  font-weight: 700;
  line-height: 1.6;
  color: var(--blue-600);
  background: var(--blue-50);
  border-radius: var(--r-pill);
  cursor: pointer;
  list-style: none;
}
.adm-more > summary::-webkit-details-marker { display: none; }
.adm-more[open] > summary { margin-bottom: 6px; }
.adm-more:not([open]) .adm-more-hide,
.adm-more[open] .adm-more-show { display: none; }

/* long policy text: three lines, full text in title */
.adm-clamp {
  display: -webkit-box;
  max-width: 34ch;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* text-styled button for small helpers such as "Select all" */
.adm .adm-link {
  padding: 0;
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--blue-600);
  background: none;
  border: 0;
  cursor: pointer;
}
.adm .adm-link:hover { color: var(--navy); text-decoration: underline; }

/* ---------- tables ---------- */

.adm-summary { margin: 0 0 10px; font-size: var(--fs-13); color: var(--slate-600); }
.adm-summary b { color: var(--ink); }

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

.adm-table {
  width: 100%;
  min-width: 640px;
  margin: 0;
  border-collapse: collapse;
  font-size: var(--fs-13);
}

/* bengine_N.css borders every td on all four sides with 10px padding;
   all four sides are reset here, not just the one we want */
.adm .adm-table th,
.adm .adm-table td {
  padding: 12px 16px;
  font-size: var(--fs-13);
  text-align: left;
  vertical-align: middle;
  border: 0;
  border-bottom: 1px solid var(--slate-100);
}

.adm .adm-table th {
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: var(--fs-11);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--slate-600);
  white-space: nowrap;
  background: var(--slate-50);
  border-bottom-color: var(--slate-200);
}

.adm .adm-table tbody tr:last-child td { border-bottom: 0; }
.adm .adm-table tbody tr:hover td { background: var(--slate-50); }

.adm-cell-title { font-weight: 700; color: var(--ink); }
.adm-cell-meta { margin-top: 4px; }

/* something guests type: fixed-width, so O and 0 read apart */
/* .adm-scoped so it also wins on an input over `.adm input { font-family: inherit }` */
.adm .adm-code { font-family: var(--mono); letter-spacing: .02em; }
.adm .adm-table td.adm-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.adm .adm-table td.adm-actions { width: 1%; white-space: nowrap; text-align: right; }
.adm-actions-in { display: inline-flex; align-items: center; gap: 6px; }
.adm-actions-in form { margin: 0; }

/* .is-stack: on a narrow page each row becomes a small card instead of a table
   that scrolls sideways (the actions would sit off screen). Cells label
   themselves from data-label; cells without one (the title, the actions) don't. */
@container (max-width: 600px) {
  .adm-table.is-stack { min-width: 0; }
  .adm-table.is-stack thead { display: none; }
  .adm-table.is-stack,
  .adm-table.is-stack tbody,
  .adm-table.is-stack tr { display: block; }
  .adm .adm-table.is-stack tr { padding: 12px 16px; border-bottom: 1px solid var(--slate-100); }
  .adm .adm-table.is-stack tbody tr:last-child { border-bottom: 0; }
  .adm .adm-table.is-stack td { display: block; width: auto; padding: 2px 0; white-space: normal; border: 0; }
  .adm .adm-table.is-stack td[data-label]::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 84px;
    margin-right: 8px;
    font-size: var(--fs-12);
    color: var(--slate-600);
  }
  .adm .adm-table.is-stack td.adm-actions { padding-top: 10px; text-align: left; }
  .adm .adm-table.is-stack tbody tr:hover td { background: transparent; }
}

/* ---------- nothing yet ---------- */

.adm-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 46px 20px 50px;
  text-align: center;
}
.adm-empty-ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  font-size: 19px;
  color: var(--blue-600);
  background: var(--blue-50);
  border-radius: 50%;
}
.adm .adm-empty h4 { margin: 0; font-family: var(--sans); font-size: var(--fs-15); font-weight: 700; color: var(--ink); }
.adm-empty p { max-width: 50ch; margin: 0 0 8px; font-size: var(--fs-13); color: var(--slate-600); }
.adm-empty form { margin: 0; }

/* ---------- toolbar and filter ---------- */

.adm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 14px;
}

/* one choice out of a few, e.g. All / Running / Ended; aria-pressed marks it */
.adm-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  background: var(--slate-100);
  border-radius: var(--r-md);
}

.adm .adm-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 12px;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--slate-600);
  background: transparent;
  border: 0;
  border-radius: var(--r);
  cursor: pointer;
}
.adm .adm-seg-btn:hover { color: var(--ink); }
/* full width, equal buttons: steps over a column (Booking site theme) */
.adm .adm-seg.is-full { display: flex; }
.adm .adm-seg.is-full .adm-seg-btn { flex: 1 1 0; justify-content: center; }
/* aria-pressed marks the choice; tab bars whose legacy script toggles .active use that */
.adm .adm-seg-btn[aria-pressed="true"],
.adm .adm-seg-btn.active { color: var(--ink); background: var(--paper); box-shadow: var(--e-1); }

.adm-seg-n { font-size: var(--fs-12); font-weight: 700; color: var(--slate-400); font-variant-numeric: tabular-nums; }
.adm-seg-btn[aria-pressed="true"] .adm-seg-n,
.adm-seg-btn.active .adm-seg-n { color: var(--blue-600); }

.adm .adm-search { width: 240px; max-width: 100%; min-height: 36px; }

.adm-filter-empty {
  margin: 0;
  padding: 28px 20px;
  font-size: var(--fs-13);
  text-align: center;
  color: var(--slate-600);
  background: var(--paper);
  border: 1px dashed var(--slate-300);
  border-radius: var(--r-lg);
}

/* ---------- collapsible list (the legacy .rmt-item accordion) ----------
   Promotion (and Additional Services, Packages) print this from their models:
     .box-item > .rmt-item > .title-bar (a Bootstrap .row: .col-number + .col-tool)
                           > .toggle-content-panel > .rpanel .form ... .bt-control
   vue.open_room_type_detail() climbs three parents from the toggle button and
   adds .active to the item, and jQuery UI sorts .box-item's children, so the
   nesting stays and is only restyled here. Legacy rules reach (0,4,1); these
   win on specificity or, at a tie, because this file loads later. */

.adm :is(.box-item, .srv-box-item) { display: grid; gap: 10px; margin: 0; }
.adm :is(.box-item, .srv-box-item).forsort { cursor: auto; }
/* the first item added from an empty list replaces the empty state */
.adm :is(.box-item, .srv-box-item):has(> :is(.rmt-item, .srv-item)) ~ .adm-empty { display: none; }
/* a list shown a tab at a time (Additional Services shows only .active rows):
   "nothing of this type" until the open tab has a row */
.adm .srv-box-item:has(> .srv-item.active) ~ .adm-tab-empty { display: none; }

.adm :is(.rmt-item, .srv-item) {
  background: var(--paper);
  border: 1px solid var(--slate-200);
  border-radius: var(--r-lg);
  box-shadow: var(--e-1);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.adm :is(.rmt-item, .srv-item):hover { border-color: var(--slate-300); }
/* open: Promotion marks the item .active; on the services list .active only means
   "in the open tab", and the open one is the item whose panel is .active */
.adm .rmt-item.active,
.adm .srv-item:has(> .toggle-content-panel.active) { border-color: var(--blue); box-shadow: var(--e-2); }
.adm :is(.rmt-item, .srv-item).ui-sortable-helper { box-shadow: var(--e-3); }

/* jQuery UI hides its drop placeholder inline */
.adm :is(.box-item, .srv-box-item) > .ui-sortable-placeholder {
  visibility: visible !important;
  background: var(--blue-50);
  border: 1px dashed var(--blue);
  border-radius: var(--r-lg);
}

.adm :is(.rmt-item, .srv-item) .title-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 14px 12px 16px;
  color: var(--ink);
  background: transparent;
  border-radius: var(--r-lg);
}
.adm :is(.rmt-item, .srv-item) .title-bar::before,
.adm :is(.rmt-item, .srv-item) .title-bar::after { display: none; }

/* a sortable list: the bar is the handle, and shows a grip */
.adm .forsort :is(.rmt-item, .srv-item) .title-bar { cursor: grab; }
.adm .forsort :is(.rmt-item, .srv-item) .title-bar::before {
  content: "";
  display: block;
  flex: 0 0 auto;
  width: 8px;
  height: 16px;
  background-image: radial-gradient(circle, var(--slate-400) 1.2px, transparent 1.7px);
  background-size: 4px 4px;
}

.adm :is(.rmt-item, .srv-item) .title-bar > [class*="col-"] { float: none; width: auto; min-height: 0; padding: 0; }
.adm :is(.rmt-item, .srv-item) .col-number { display: grid; flex: 1 1 auto; gap: 4px; min-width: 0; }
.adm :is(.rmt-item, .srv-item) .col-tool { display: flex; flex: 0 0 auto; gap: 6px; cursor: auto; }

.adm-item-name {
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.adm-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 4px;
  font-size: var(--fs-12);
  color: var(--slate-600);
}
.adm-item-meta .adm-pill { margin-right: 10px; }
.adm-item-fact { white-space: nowrap; }
.adm-item-fact + .adm-item-fact::before { content: "\00b7"; margin: 0 7px; color: var(--slate-400); }

.adm :is(.rmt-item, .srv-item) .col-tool button.btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 13px;
  color: var(--slate-600);
  background: var(--paper);
  background-image: none;
  border: 1px solid var(--slate-300);
  border-radius: var(--r);
  box-shadow: none;
  text-shadow: none;
}
.adm :is(.rmt-item, .srv-item) .col-tool button.btn:hover { color: var(--ink); background: var(--slate-50); border-color: var(--slate-400); }
.adm .rmt-item.active .col-tool button.btn:first-child,
.adm .srv-item:has(> .toggle-content-panel.active) .col-tool button.btn:first-child { color: var(--blue-600); background: var(--blue-50); border-color: var(--blue); }
.adm :is(.rmt-item, .srv-item) .col-tool button.btn:has(.fa-trash):hover { color: var(--danger); background: var(--danger-50); border-color: rgba(192, 57, 43, .35); }

.adm :is(.rmt-item, .srv-item) .toggle-content-panel {
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--slate-200);
  cursor: auto;
}
.adm :is(.rmt-item, .srv-item) .rpanel { display: block; float: none; width: 100%; border-right: 0; }
.adm :is(.rmt-item, .srv-item) .rpanel .form { padding: 20px 20px 4px; }

/* form rows keep their Bootstrap grid: label left, field right */
.adm .rpanel .form-group { margin-bottom: 16px; }
.adm .rpanel label { font-weight: 400; color: var(--ink); }
.adm .rpanel .form-group.row > label { padding-top: 9px; font-size: var(--fs-13); font-weight: 700; }
.adm .rpanel label .adm-hint { display: block; margin-top: 2px; font-weight: 400; }
.adm .rpanel label + .adm-hint { margin-left: 6px; }
.adm .rpanel .cred { color: var(--danger); }
/* .adm .form-control already sets the 38px minimum; legacy .rpanel rules out-rank its padding */
.adm .rpanel .form-control { padding: 8px 11px; }
.adm .rpanel select.form-control { padding-right: 6px; }
.adm .rpanel textarea.form-control { min-height: 76px; resize: vertical; }

/* checkbox groups printed as Bootstrap button toggles (rate plans, rooms) */
.adm :is(.rmt-item, .srv-item) .btn-group.blocks { display: flex; flex-wrap: wrap; gap: 8px; float: none; }
.adm :is(.rmt-item, .srv-item) .btn-group.blocks > .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  float: none;
  margin: 0;
  padding: 6px 12px;
  font-size: var(--fs-13);
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  text-align: left;
  color: var(--ink);
  background: var(--paper);
  background-image: none;
  border: 1px solid var(--slate-300);
  border-radius: var(--r);
  box-shadow: none;
  text-shadow: none;
}
.adm :is(.rmt-item, .srv-item) .btn-group.blocks > .btn:hover { background: var(--slate-50); border-color: var(--slate-400); }
.adm :is(.rmt-item, .srv-item) .btn-group.blocks > .btn.active { color: var(--blue-600); background: var(--blue-50); border-color: var(--blue); }
.adm :is(.rmt-item, .srv-item) .btn-group.blocks > .btn.active::before { content: "\f00c"; font-family: FontAwesome; font-size: 11px; }
.adm :is(.rmt-item, .srv-item) .btn-group.blocks > .btn.disabled {
  color: var(--slate-400);
  background: var(--slate-50);
  border-style: dashed;
  opacity: 1;
  cursor: not-allowed;
}

/* "off" after the name of a plan that is not sold */
.adm-off-note { font-size: var(--fs-11); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--warn); }

/* weekday checkboxes as chips; T.ck_click_all needs label > input inside .ck-box */
.adm :is(.rmt-item, .srv-item) .ck-box { display: flex; flex-wrap: wrap; gap: 6px; }
.adm :is(.rmt-item, .srv-item) .ck-box .checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 10px;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--slate-300);
  border-radius: var(--r);
  cursor: pointer;
}
.adm :is(.rmt-item, .srv-item) .ck-box .checkbox-inline input { position: static; margin: 0; accent-color: var(--blue); }
.adm :is(.rmt-item, .srv-item) .ck-box .checkbox-inline:has(input:checked) { color: var(--blue-600); background: var(--blue-50); border-color: var(--blue); }

/* repeating date blocks (Promotion's stay periods) */
.adm :is(.rmt-item, .srv-item) form.form-horizontal .option-date {
  margin: 0 0 12px;
  padding: 16px 16px 2px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--r-lg);
}
.adm :is(.rmt-item, .srv-item) form.form-horizontal .option-date::before { display: none; }
.adm :is(.rmt-item, .srv-item) .option-date .plus,
.adm :is(.rmt-item, .srv-item) .option-date .minus { font-size: var(--fs-13); font-weight: 600; color: var(--blue-600); text-decoration: none; }
.adm :is(.rmt-item, .srv-item) .option-date .minus { margin-right: 14px; color: var(--danger); }
/* "Add stay period" sits inside the period, so the only one cannot be removed */
.adm :is(.rmt-item, .srv-item) form.form-horizontal .option-date:only-child .minus { display: none; }
@media (min-width: 768px) {
  .adm :is(.rmt-item, .srv-item) .option-date .form-group > .text-right { float: right; width: auto; margin-left: 0; }
}
@media (min-width: 992px) {
  /* "Days before arrival (more than)" on one line */
  .adm :is(.rmt-item, .srv-item) .option-date [name=div_max_day] { width: auto; min-width: 16.6667%; }
}

/* the blackout dates of a period: a scrolling grid of date checkboxes */
.adm :is(.rmt-item, .srv-item) .box-chkbxinscrll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 4px 12px;
  width: auto;
  max-width: 560px;
  height: auto;
  max-height: 168px;
  margin-top: 8px;
  padding: 8px 12px;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--slate-300);
  border-radius: var(--r);
}
.adm :is(.rmt-item, .srv-item) .box-chkbxinscrll:not(:has(input)) { display: none; }
.adm :is(.rmt-item, .srv-item) .box-chkbxinscrll > span { display: contents; }
.adm :is(.rmt-item, .srv-item) .box-chkbxinscrll label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: var(--fs-13);
  font-variant-numeric: tabular-nums;
}

/* Save / Cancel: stays in view at the bottom while a long form scrolls */
.adm :is(.rmt-item, .srv-item) .bt-control {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 12px 20px;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.adm :is(.rmt-item, .srv-item) .bt-control::before,
.adm :is(.rmt-item, .srv-item) .bt-control::after { display: none; }
.adm :is(.rmt-item, .srv-item) .bt-control > div { float: none; width: auto; margin: 0; padding: 0; }
.adm :is(.rmt-item, .srv-item) .bt-control > div:has(.btn-cancel) { order: -1; }
.adm :is(.rmt-item, .srv-item) .bt-control .btn {
  min-width: 110px;
  height: 38px;
  padding: 0 18px;
  font-size: var(--fs-14);
  font-weight: 600;
  background-image: none;
  border-radius: var(--r);
  box-shadow: none;
  text-shadow: none;
}
.adm :is(.rmt-item, .srv-item) .bt-control .btn-save { color: var(--paper); background-color: var(--blue); border: 1px solid var(--blue); }
.adm :is(.rmt-item, .srv-item) .bt-control .btn-save:hover { background-color: var(--blue-600); border-color: var(--blue-600); }
.adm :is(.rmt-item, .srv-item) .bt-control .btn-cancel { color: var(--ink); background-color: var(--paper); border: 1px solid var(--slate-300); }
.adm :is(.rmt-item, .srv-item) .bt-control .btn-cancel:hover { background-color: var(--slate-50); border-color: var(--slate-400); }

/* ---------- dialogs ----------
   A Bootstrap modal lives outside the page's .adm root, so its .modal-content
   carries .adm itself (the kit's fields work inside) and is reset to a dialog:
     <div class="modal fade adm-modal"><div class="modal-dialog"><div class="modal-content adm"> */

.adm-modal .modal-content.adm {
  padding: 0;
  background: var(--paper);
  border: 0;
  border-radius: var(--r-lg);
  box-shadow: var(--e-4);
  overflow: hidden;
}
/* the markup puts the close button first; the title reads first on screen */
.adm-modal .modal-header {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}
.adm-modal .modal-header::before,
.adm-modal .modal-header::after { display: none; }
.adm-modal .modal-header .close { float: none; margin: 0; }
.adm-modal .modal-title { margin: 0; font-family: var(--serif); font-size: var(--fs-17); font-weight: 700; line-height: 1.3; text-align: left; color: var(--navy); }
.adm-modal .modal-body { padding: 20px; }
.adm-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
}
.adm-modal .modal-footer::before,
.adm-modal .modal-footer::after { display: none; }

/* ---------- rich text (Summernote) ----------
   Settings website's editors: a white page to write on inside the kit's border
   (popup_wording.css greys it); Preview shows the guests' view. */

.adm .note-editor.note-frame { border: 1px solid var(--slate-300); border-radius: var(--r); box-shadow: none; overflow: hidden; }
.adm .note-editor.note-frame .note-toolbar { background: var(--slate-50); border-bottom: 1px solid var(--slate-200); }
.adm .note-editor.note-frame .note-editing-area .note-editable { background-color: var(--paper); color: var(--ink); }
.adm .note-editor.note-frame .note-statusbar { background: var(--slate-50); }

/* ---------- facts ----------
   What is set now, as label / value pairs, e.g. Payment's gateway and bank account. */

.adm-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 20px; margin: 0; font-size: var(--fs-13); }
.adm-facts dt { margin: 0; font-weight: 600; color: var(--slate-600); }
.adm-facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

/* ---------- a row of filters ----------
   Labelled fields side by side above a list, wrapping as the page narrows, with
   the form's buttons at the end of the row. Payment links is the reference. */

.adm-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 16px; margin: 0; }
.adm-filters .adm-field { flex: 1 1 150px; max-width: 220px; }
.adm-filters-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* T fills .view-booking-updata with a list; bengine_T.css spaces it for the legacy pages */
.adm .view-booking-updata { margin-top: 0; }
/* T looks forms up inside .result-content; bengine_T.css pads it for the legacy pages */
.adm .result-content { padding: 0; }

/* ---------- a rendered document ----------
   An e-mail or a confirmation shown as its reader got it, on a sheet of paper.
   The sheet keeps the document's own width (wider ones scroll sideways), and
   `contain` keeps anything inside from positioning itself over the page: these
   documents carry what guests typed. Confirmation PDF is the reference. */

.adm-doc {
  overflow-x: auto;
  padding: 24px;
  background: var(--slate-100);
  contain: content;
}
.adm-doc-sheet {
  max-width: 760px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--slate-200);
  border-radius: var(--r-sm);
  box-shadow: var(--e-2);
}
/* a live page in a frame, e.g. the Search box preview; .is-phone narrows it to a phone's width */
.adm-doc-frame {
  display: block;
  width: 100%;
  height: 180px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--slate-200);
  border-radius: var(--r-sm);
}
.adm-doc-frame.is-phone { max-width: 390px; }
/* a whole page in a fixed box (Booking site theme): the page's script sets the frame's width and
   scale (a computer's width drawn smaller), so the box clips what the scale leaves over */
.adm-doc.is-page { height: clamp(380px, calc(100vh - 300px), 860px); padding: 0; overflow: hidden; }
.adm-doc.is-page .adm-doc-frame { height: 100%; border: 0; border-radius: 0; transform-origin: 0 0; }

/* ---------- narrow ---------- */

@container (max-width: 520px) {
  .adm-card-body { padding: 16px; }
  .adm-card-foot { padding: 12px 16px; }
  .adm-card-foot .adm-btn { flex: 1 1 0; }
  .adm-pair { grid-template-columns: 1fr; }
  .adm-doc { padding: 10px; }
  .adm-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .adm-facts dd { margin-bottom: 8px; }
  .adm-filters .adm-field { flex-basis: 100%; max-width: none; }
  .adm :is(.rmt-item, .srv-item) .title-bar { align-items: flex-start; padding: 12px; }
  .adm-item-fact { white-space: normal; }
  /* one fact per line under the pill and plan, so no line starts with a dot */
  .adm-item-fact + .adm-item-fact { flex-basis: 100%; }
  .adm-item-fact + .adm-item-fact::before { content: none; }
  .adm :is(.rmt-item, .srv-item) .rpanel .form { padding: 16px 12px 2px; }
  .adm :is(.rmt-item, .srv-item) .bt-control { padding: 12px; }
  .adm :is(.rmt-item, .srv-item) .bt-control > div { flex: 1 1 0; }
  .adm :is(.rmt-item, .srv-item) .bt-control .btn { width: 100%; min-width: 0; }
}

@media (max-width: 600px) {
  .adm { padding: 16px 14px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .adm-btn, .adm .adm-check, .adm .form-control, .adm :is(.rmt-item, .srv-item), .adm-switch, .adm-switch::after { transition: none; }
}

/* ---------- gallery of choices drawn as small pictures (Booking site theme's templates) ----------
   <div class="adm-tiles"><button class="adm-tile" aria-pressed="false"><span class="adm-tile-art" style="--m-...">
   ...</span><span class="adm-tile-name">..</span><span class="adm-tile-note">..</span></button></div>
   The picture takes its colours from --m-* custom properties set on .adm-tile-art. */
.adm .adm-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-12);
}
.adm .adm-tile {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  min-width: 0;
  padding: var(--sp-6) var(--sp-6) var(--sp-8);
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--slate-200);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.adm .adm-tile:hover { border-color: var(--slate-300); }
.adm .adm-tile[aria-pressed="true"] { border-color: var(--blue); box-shadow: var(--focus-ring); }
.adm .adm-tile-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  color: var(--ink);
  font-size: var(--fs-14);
  font-weight: 600;
}
.adm .adm-tile-name .adm-pill { flex: none; }
.adm .adm-tile-note { color: var(--slate-600); font-size: var(--fs-12); line-height: 1.4; }
.adm .adm-tile-art {
  display: flex;
  flex-direction: column;
  height: 84px;
  overflow: hidden;
  background: var(--m-bg);
  border: 1px solid var(--slate-100);
  border-radius: var(--r-sm);
}
.adm .adm-tile-head { display: flex; align-items: center; gap: 4px; height: 17px; padding: 0 6px; background: var(--m-head); }
.adm .adm-tile-head i { display: block; width: 9px; height: 3px; border-radius: 2px; background: var(--m-head-fg); opacity: .85; }
.adm .adm-tile-head i:first-child { width: 20px; margin-right: auto; opacity: 1; }
.adm .adm-tile-body { display: flex; flex: 1; flex-direction: column; gap: 5px; padding: 6px; }
.adm .adm-tile-search { height: 11px; background: var(--m-search); border-radius: var(--m-r); }
.adm .adm-tile-card {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  background: var(--m-card);
  border: 1px solid var(--m-line);
  border-radius: var(--m-r);
}
.adm .adm-tile-lines i { display: block; width: 34px; height: 3px; margin: 3px 0; background: var(--m-text); border-radius: 2px; opacity: .6; }
.adm .adm-tile-lines i + i { width: 22px; opacity: .3; }
.adm .adm-tile-btn { width: 26px; height: 10px; background: var(--m-accent); border-radius: var(--m-rb); }
.adm .adm-tile-art.is-outline .adm-tile-btn { background: transparent; border: 1.5px solid var(--m-accent); }

/* ---------- website styles drawn as small page plans (Booking site theme's step 1):
   <span class="adm-site-art is-<style>"><i class="w-p"></i><i class="w-h"></i><i class="w-s"></i>
   <i class="w-a"></i><i class="w-b"></i><i class="w-c"></i></span>: photo, header, search and three
   content blocks; each style shows and places the ones its page has (left, top, width, height). ---------- */
.adm .adm-tiles.is-sites { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.adm .adm-site-art { position: relative; display: block; height: 104px; overflow: hidden; background: #f3f5f7; border: 1px solid var(--slate-100); border-radius: var(--r-sm); }
.adm .adm-site-art i { position: absolute; display: none; border-radius: 2px; }
.adm .adm-site-art .w-h { background: #22384d; border-radius: 0; }
.adm .adm-site-art .w-p { background: linear-gradient(#a9cbe0, #eadfca 60%, #d6bf96); }
.adm .adm-site-art .w-s { background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 32, .22); }
.adm .adm-site-art .w-a,
.adm .adm-site-art .w-b,
.adm .adm-site-art .w-c { background: #fff; border: 1px solid #d9e0e6; }
.adm .adm-site-art.is-standard i { display: block; }
.adm .adm-site-art.is-standard .w-h { left: 0; top: 0; width: 100%; height: 11%; }
.adm .adm-site-art.is-standard .w-p { left: 7%; top: 15%; width: 86%; height: 36%; }
.adm .adm-site-art.is-standard .w-s { left: 7%; top: 54%; width: 86%; height: 9%; background: #22384d; box-shadow: none; }
.adm .adm-site-art.is-standard .w-a { left: 7%; top: 67%; width: 86%; height: 13%; }
.adm .adm-site-art.is-standard .w-b { left: 7%; top: 84%; width: 86%; height: 13%; }
.adm .adm-site-art.is-standard .w-c { display: none; }
.adm .adm-site-art.is-resort .w-p { display: block; left: 0; top: 0; width: 100%; height: 64%; border-radius: 0; }
.adm .adm-site-art.is-resort .w-h { display: block; left: 0; top: 0; width: 100%; height: 11%; background: rgba(0, 0, 0, .28); }
.adm .adm-site-art.is-resort .w-s { display: block; left: 12%; top: 55%; width: 76%; height: 14%; border-radius: 3px; }
.adm .adm-site-art.is-resort .w-a { display: block; left: 12%; top: 76%; width: 76%; height: 32%; border-radius: 4px; background: linear-gradient(90deg, #b9d3e2 0 42%, #fff 42%); }
.adm .adm-site-art.is-boutique { background: #fbf9f5; }
.adm .adm-site-art.is-boutique .w-h { display: block; left: 0; top: 0; width: 100%; height: 15%; background: #fbf9f5; box-shadow: inset 0 -1px #ddd6cb; }
.adm .adm-site-art.is-boutique .w-c { display: block; left: 38%; top: 4%; width: 24%; height: 4%; background: #3b2b2b; border: 0; }
.adm .adm-site-art.is-boutique .w-s { display: block; left: 6%; top: 25%; width: 30%; height: 44%; box-shadow: none; background: repeating-linear-gradient(#fbf9f5 0 8px, #cfc6b8 8px 9px); }
.adm .adm-site-art.is-boutique .w-p { display: block; left: 42%; top: 22%; width: 52%; height: 50%; }
.adm .adm-site-art.is-boutique .w-a { display: block; left: 6%; top: 80%; width: 40%; height: 26%; border: 0; background: linear-gradient(#a9cbe0, #eadfca 60%, #d6bf96); }
.adm .adm-site-art.is-boutique .w-b { display: block; left: 52%; top: 83%; width: 34%; height: 5%; border: 0; background: #3b2b2b; }
.adm .adm-site-art.is-gallery { background: #f5f7fb; }
.adm .adm-site-art.is-gallery .w-h { display: block; left: 0; top: 0; width: 100%; height: 10%; background: #fff; box-shadow: inset 0 -1px #dde3ea; }
.adm .adm-site-art.is-gallery .w-p { display: block; left: 5%; top: 15%; width: 56%; height: 38%; border-radius: 4px 0 0 4px; }
.adm .adm-site-art.is-gallery .w-a {
  display: block;
  left: 63%;
  top: 15%;
  width: 32%;
  height: 38%;
  border: 0;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(#f5f7fb, #f5f7fb) center / 2px 100% no-repeat, linear-gradient(#f5f7fb, #f5f7fb) center / 100% 2px no-repeat, linear-gradient(#a9cbe0, #eadfca 60%, #d6bf96);
}
.adm .adm-site-art.is-gallery .w-b,
.adm .adm-site-art.is-gallery .w-c { display: block; top: 59%; width: 27%; height: 40%; border-radius: 4px; background: linear-gradient(#b9d3e2 0 52%, #fff 52%); }
.adm .adm-site-art.is-gallery .w-b { left: 5%; }
.adm .adm-site-art.is-gallery .w-c { left: 35%; }
.adm .adm-site-art.is-gallery .w-s { display: block; left: 67%; top: 59%; width: 28%; height: 36%; border-radius: 4px; }
.adm .adm-site-art.is-express .w-h { display: block; left: 0; top: 0; width: 100%; height: 10%; }
.adm .adm-site-art.is-express .w-s { display: block; left: 0; top: 10%; width: 100%; height: 14%; background: #2c5170; box-shadow: none; border-radius: 0; }
.adm .adm-site-art.is-express .w-p { display: block; left: 5%; top: 28%; width: 90%; height: 23%; }
.adm .adm-site-art.is-express .w-a,
.adm .adm-site-art.is-express .w-b { display: block; left: 5%; width: 90%; height: 19%; background: linear-gradient(90deg, #b9d3e2 0 22%, #fff 22%); }
.adm .adm-site-art.is-express .w-a { top: 56%; }
.adm .adm-site-art.is-express .w-b { top: 79%; }
.adm .adm-site-art.is-grand { background: #10151a; }
.adm .adm-site-art.is-grand .w-p { display: block; left: 0; top: 0; width: 100%; height: 68%; border-radius: 0; background: linear-gradient(#56708a, #8e8676 70%, #5d5446); }
.adm .adm-site-art.is-grand .w-c { display: block; left: 26%; top: 27%; width: 48%; height: 8%; background: #fff; border: 0; }
.adm .adm-site-art.is-grand .w-s { display: block; left: 12%; top: 53%; width: 76%; height: 10%; background: rgba(255, 255, 255, .32); border: 1px solid rgba(255, 255, 255, .5); box-shadow: none; }
.adm .adm-site-art.is-grand .w-a { display: block; left: 18%; top: 76%; width: 64%; height: 30%; border: 0; background: linear-gradient(#a9cbe0, #eadfca 60%, #d6bf96); }
/* the looks (UI styles), each drawn in its own manner as well as its plan */
.adm .adm-site-art.is-minimal { background: #fff; }
.adm .adm-site-art.is-minimal .w-h { display: block; left: 0; top: 0; width: 100%; height: 10%; background: #fff; box-shadow: inset 0 -1px #e3e3e3; }
.adm .adm-site-art.is-minimal .w-p { display: block; left: 22%; top: 17%; width: 56%; height: 34%; border-radius: 0; }
.adm .adm-site-art.is-minimal .w-s { display: block; left: 22%; top: 57%; width: 56%; height: 2px; background: #222; box-shadow: none; border-radius: 0; }
.adm .adm-site-art.is-minimal .w-a,
.adm .adm-site-art.is-minimal .w-b { display: block; left: 22%; width: 56%; height: 14%; border: 0; border-top: 1px solid #e3e3e3; border-radius: 0; background: linear-gradient(90deg, #b9d3e2 0 24%, #fff 24% 32%, #c9c9c9 32% 60%, #fff 60%) no-repeat 0 5px / 100% 45%; }
.adm .adm-site-art.is-minimal .w-a { top: 66%; }
.adm .adm-site-art.is-minimal .w-b { top: 84%; }
.adm .adm-site-art.is-soft { background: #e3e1db; }
.adm .adm-site-art.is-soft i { border: 0; background-color: #e3e1db; box-shadow: 3px 3px 6px #c3c0b8, -3px -3px 6px #fffef9; }
.adm .adm-site-art.is-soft .w-h { display: block; left: 4%; top: 5%; width: 92%; height: 10%; border-radius: 6px; }
.adm .adm-site-art.is-soft .w-p { display: block; left: 6%; top: 24%; width: 56%; height: 40%; border-radius: 6px; border: 3px solid #e3e1db; background-image: linear-gradient(#a9cbe0, #eadfca 60%, #d6bf96); }
.adm .adm-site-art.is-soft .w-a,
.adm .adm-site-art.is-soft .w-b,
.adm .adm-site-art.is-soft .w-c { display: block; left: 68%; width: 26%; height: 10%; border-radius: 4px; }
.adm .adm-site-art.is-soft .w-a { top: 24%; }
.adm .adm-site-art.is-soft .w-b { top: 39%; }
.adm .adm-site-art.is-soft .w-c { top: 54%; }
.adm .adm-site-art.is-soft .w-s { display: block; left: 6%; top: 75%; width: 88%; height: 13%; border-radius: 6px; }
.adm .adm-site-art.is-glass { background: radial-gradient(60% 60% at 10% 10%, #7fb6e6, transparent), radial-gradient(60% 60% at 90% 90%, #86d0d8, transparent), #eef4f9; }
.adm .adm-site-art.is-glass .w-h { display: block; left: 0; top: 0; width: 100%; height: 10%; background: rgba(255, 255, 255, .55); }
.adm .adm-site-art.is-glass .w-p { display: block; left: 6%; top: 16%; width: 88%; height: 56%; border-radius: 6px; }
.adm .adm-site-art.is-glass .w-s { display: block; left: 62%; top: 23%; width: 26%; height: 40%; background: rgba(255, 255, 255, .72); border: 1px solid rgba(255, 255, 255, .9); border-radius: 4px; box-shadow: 0 2px 6px rgba(16, 24, 32, .14); }
.adm .adm-site-art.is-glass .w-a,
.adm .adm-site-art.is-glass .w-b { display: block; top: 62%; width: 17%; height: 6%; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .8); }
.adm .adm-site-art.is-glass .w-a { left: 10%; }
.adm .adm-site-art.is-glass .w-b { left: 30%; }
.adm .adm-site-art.is-glass .w-c { display: block; left: 6%; top: 79%; width: 88%; height: 30%; border: 0; border-radius: 6px; background: linear-gradient(90deg, #a9cbe0 0 50%, rgba(255, 255, 255, .78) 50%); }
.adm .adm-site-art.is-bold { background: radial-gradient(#e7b9b2 1px, transparent 1.4px) 0 0 / 7px 7px, #fff8f3; }
.adm .adm-site-art.is-bold .w-h { display: block; left: 0; top: 0; width: 100%; height: 12%; background: #b4382f; }
.adm .adm-site-art.is-bold .w-p { display: block; left: 12%; top: 20%; width: 76%; height: 37%; border: 2px solid #3b1f17; border-radius: 5px; transform: rotate(-3deg); box-shadow: 4px 4px 0 #c2185b; }
.adm .adm-site-art.is-bold .w-s { display: block; left: 8%; top: 66%; width: 84%; height: 13%; background: repeating-linear-gradient(-45deg, #b4382f 0 4px, #c24a40 4px 8px); border: 2px solid #3b1f17; border-radius: 5px; box-shadow: none; }
.adm .adm-site-art.is-bold .w-a { display: block; left: 8%; top: 85%; width: 84%; height: 30%; border: 2px solid #3b1f17; border-top: 5px solid #b4382f; border-radius: 5px; background: radial-gradient(circle at 18% 60%, #a9cbe0 0 9%, transparent 10%), #fff; }
.adm .adm-site-art.is-brutalist { background: linear-gradient(#e6e6e6 1px, transparent 1px) 0 0 / 8px 8px, linear-gradient(90deg, #e6e6e6 1px, transparent 1px) 0 0 / 8px 8px, #fff; }
.adm .adm-site-art.is-brutalist i { border-radius: 0; }
.adm .adm-site-art.is-brutalist .w-h { display: block; left: 0; top: 0; width: 100%; height: 11%; background: #ffd60a; box-shadow: inset 0 -2px #111; }
.adm .adm-site-art.is-brutalist .w-p { display: block; left: 7%; top: 18%; width: 83%; height: 36%; border: 2px solid #111; box-shadow: 3px 3px 0 #111; }
.adm .adm-site-art.is-brutalist .w-s { display: block; left: 7%; top: 61%; width: 83%; height: 12%; background: #fff; border: 2px solid #111; box-shadow: 3px 3px 0 #111; }
.adm .adm-site-art.is-brutalist .w-a { display: block; left: 7%; top: 80%; width: 83%; height: 30%; border: 2px solid #111; box-shadow: 3px 3px 0 #111; background: linear-gradient(90deg, #a9cbe0 0 30%, #111 30% 32%, #fff 32%); }
.adm .adm-site-art.is-deco { background: repeating-conic-gradient(from -90deg at 50% 60%, rgba(132, 101, 58, .16) 0deg 4deg, transparent 4deg 12deg), #fbfaf7; }
.adm .adm-site-art.is-deco .w-h { display: block; left: 0; top: 0; width: 100%; height: 11%; background: #1d2b2a; box-shadow: 0 2px 0 -1px #1d2b2a, 0 3px 0 0 #a5824a; }
.adm .adm-site-art.is-deco .w-p { display: block; left: 29%; top: 18%; width: 42%; height: 42%; border-radius: 999px 999px 0 0; box-shadow: 0 0 0 1px #a5824a, 0 0 0 3px #fbfaf7, 0 0 0 4px #a5824a; }
.adm .adm-site-art.is-deco .w-s { display: block; left: 14%; top: 67%; width: 72%; height: 9%; background: #fff; border: 1px solid #a5824a; border-radius: 0; box-shadow: none; }
.adm .adm-site-art.is-deco .w-a,
.adm .adm-site-art.is-deco .w-b,
.adm .adm-site-art.is-deco .w-c { display: block; top: 83%; width: 17%; height: 30%; border: 1px solid #a5824a; border-radius: 999px 999px 0 0; background: linear-gradient(#a9cbe0, #eadfca 50%, #fff 50%); }
.adm .adm-site-art.is-deco .w-a { left: 19%; }
.adm .adm-site-art.is-deco .w-b { left: 41.5%; }
.adm .adm-site-art.is-deco .w-c { left: 64%; }
/* the gallery's two groups: page layouts, then whole looks in one UI style */
.adm .adm-site-group { grid-column: 1 / -1; margin: var(--sp-8) 0 0; color: var(--slate-600); font-size: var(--fs-12); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.adm .adm-site-group:first-child { margin-top: 0; }

/* ---------- controls beside a live preview: <div class="adm-split"><div class="adm-split-side">cards
   </div><section class="adm-card adm-split-main">preview</section></div>. The preview stays in view
   while the controls scroll; one column when narrow. ---------- */
.adm .adm-split {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: var(--sp-16);
  align-items: start;
}
.adm .adm-split-side { display: grid; gap: var(--sp-16); min-width: 0; }
.adm .adm-split-side > .adm-card { margin: 0; }
.adm .adm-split-main { position: sticky; top: calc(var(--bar-h) + var(--sp-12)); min-width: 0; margin: 0; }
@container (max-width: 900px) {
  .adm .adm-split { grid-template-columns: minmax(0, 1fr); }
  .adm .adm-split-main { position: static; }
  /* .is-preview-first: one column puts the preview above the controls, shorter */
  .adm .adm-split.is-preview-first .adm-split-main { order: -1; }
  .adm .adm-split.is-preview-first .adm-doc.is-page { height: clamp(320px, 58vh, 560px); }
}

/* ---------- a colour with its name, its hex code and how readable it is ----------
   <div class="adm-colour"><input type="color"><label>Name<small>where it shows</small></label>
   <input class="adm-hex"><p class="adm-colour-note">..</p></div> */
.adm .adm-colour {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 92px;
  align-items: center;
  gap: var(--sp-4) var(--sp-12);
}
.adm .adm-colour + .adm-colour { margin-top: var(--sp-12); }
.adm .adm-colour input[type="color"] { width: 38px; height: 34px; }
.adm .adm-colour label { margin: 0; color: var(--ink); font-size: var(--fs-13); font-weight: 600; line-height: 1.3; }
.adm .adm-colour label small { display: block; color: var(--slate-600); font-size: var(--fs-12); font-weight: 400; }
.adm .adm-hex { width: 92px; height: 34px; padding: 0 var(--sp-8); font-family: var(--mono); font-size: var(--fs-13); text-transform: uppercase; }
.adm .adm-hex[aria-invalid="true"] { border-color: var(--danger); }
.adm .adm-colour-note {
  grid-column: 2 / -1;
  display: flex;
  align-items: baseline;
  gap: var(--sp-6);
  margin: 0;
  color: var(--slate-600);
  font-size: var(--fs-12);
}
.adm .adm-colour-note::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.adm .adm-colour-note.is-low { color: var(--ink); }   /* amber text on white is under 4.5:1: the dot carries the colour */
.adm .adm-colour-note.is-low::before { background: var(--warn); }

/* a typeface shown in Latin and Thai */
.adm .adm-font-sample {
  display: grid;
  gap: 2px;
  margin: var(--sp-8) 0 0;
  padding: var(--sp-8) var(--sp-12);
  border: 1px dashed var(--slate-300);
  border-radius: var(--r);
}
.adm .adm-font-sample b { font-size: 19px; font-weight: 600; line-height: 1.25; }
.adm .adm-font-sample span { color: var(--slate-600); font-size: var(--fs-14); }

/* "Guests see: ..." beside a page title */
.adm .adm-live {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
  margin: 0;
  padding: var(--sp-6) var(--sp-12);
  background: var(--paper);
  border: 1px solid var(--slate-200);
  border-radius: var(--r-pill);
  color: var(--slate-600);
  font-size: var(--fs-13);
}
.adm .adm-live b { color: var(--ink); }
.adm .adm-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-50); }

/* ---------- a bar that stays at the bottom while there is something to publish ---------- */
.adm .adm-bar {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8) var(--sp-16);
  margin: var(--sp-16) -22px 0;
  padding: var(--sp-12) 22px;
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--slate-200);
  box-shadow: 0 -6px 18px rgba(12, 36, 57, .06);
}
.adm .adm-bar > p { margin: 0; min-width: 0; color: var(--slate-600); }
.adm .adm-bar b { color: var(--ink); }
.adm .adm-bar-actions { display: flex; gap: var(--sp-8); }
/* the bar reaches the page's edges through .adm's side padding, which is 14px there */
@media (max-width: 600px) {
  .adm .adm-bar { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
}

/* a short "done" message over the page */
.adm .adm-toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 1050;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: var(--sp-12) var(--sp-16);
  background: var(--ink);
  border-radius: var(--r);
  box-shadow: var(--e-3);
  color: #fff;
  font-size: var(--fs-13);
  transform: translateX(-50%);
}
