/* ============================================================================
   Hayat In — Vendor Panel v2 · COMPONENTS
   ----------------------------------------------------------------------------
   Buttons, cards, chips, tabs, tables, forms, badges, alerts, modals,
   sidebar, topbar + the app's signature pieces.

   Where a Bootstrap 5 class name already exists in the shipped screens
   (.card, .form-group > label, .form-control, table.display, .modal…) this
   file styles THAT selector, so porting a screen is an @extends swap rather
   than a markup rewrite.

   Plugin skins at the bottom: DataTables, Select2, Toastr, SweetAlert2.
   ========================================================================== */

/* ==========================================================================
   1. SIDEBAR
   ========================================================================== */

/* collapsed rail
   One way in, and it is the operator's own stored choice. The add/edit drawer
   used to fold the sidebar too, for as long as it was open, so its 920px panel
   still left a readable list beside it — the panel's navigation moved every
   time you opened a record. Records are pages now and nothing folds the rail
   but the toggle. */

/* --------------------------------------------------------------------------
   NAVY SIDEBAR — the design the new Offers prototype ships (shared/css/layout.css).

   A self-contained skin appended AFTER the token-driven rules above, so it wins
   by source order and paints the SAME navy in light and dark without touching
   the light/dark semantic tokens (which the sidebar aliases share with nothing
   else, but the per-element rules above still reach for --vp-text / --vp-primary
   on hover and active — those are what this overrides). Colours are lifted
   verbatim from the prototype so the panel matches the reference byte-for-byte.
   -------------------------------------------------------------------------- */
/* The brand mark keeps its purple gradient tile — it reads well on navy. */

/* --- brand + footer, ported from the reference rail -----------------------
   Values are the reference's own (shared/css/layout.css + v43/v53/v54, later
   files winning). The reference has NO square mark tile: the wordmark is the
   brand, with the "in" in accent purple and the product name beneath. */

/* Collapsed rail hides the wordmark's product name and the footer copy. */

/* --- sidebar: exact reference metrics (layout.css + v43/v53/v54) --------- */

/* ==========================================================================
   2. TOPBAR
   ========================================================================== */

body.vp .vp-topbar__search {
  flex: 0 1 340px;
  position: relative;
  margin-inline-start: var(--vp-space-6);
}
body.vp .vp-topbar__search input {
  inline-size: 100%;
  block-size: 38px;
  padding-inline: var(--vp-space-10) var(--vp-space-5);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-pill);
  background: var(--vp-surface-2);
  font-size: var(--vp-text-base);
}
body.vp .vp-topbar__search input:focus {
  outline: none;
  border-color: var(--vp-primary);
  box-shadow: 0 0 0 3px var(--vp-primary-soft);
}
body.vp .vp-topbar__search svg {
  position: absolute;
  inset-inline-start: var(--vp-space-5);
  inset-block-start: 50%;
  transform: translateY(-50%);
  inline-size: 16px; block-size: 16px;
  color: var(--vp-text-subtle);
  pointer-events: none;
}

body.vp .vp-icon-btn {
  inline-size: 36px;
  block-size: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--vp-radius-sm);
  color: var(--vp-text-muted);
  border: 1px solid transparent;
  transition: background var(--vp-dur-fast) var(--vp-ease),
              color var(--vp-dur-fast) var(--vp-ease);
}
body.vp .vp-icon-btn:hover { background: var(--vp-surface-hover); color: var(--vp-text); }
body.vp .vp-icon-btn svg { inline-size: 18px; block-size: 18px; }
body.vp .vp-icon-btn[aria-pressed="true"] {
  background: var(--vp-primary-soft);
  color: var(--vp-primary);
  border-color: var(--vp-primary-soft-border);
}

body.vp .vp-avatar {
  inline-size: 34px;
  block-size: 34px;
  border-radius: 50%;
  background: var(--vp-gradient-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: var(--vp-text-sm);
  font-weight: var(--vp-weight-700);
  flex: 0 0 auto;
}
body.vp .vp-avatar--lg { inline-size: 48px; block-size: 48px; font-size: var(--vp-text-md); }

/* Keyed on the attribute the script already uses, not on a class. The Create
   menu's wrapper is the design's own `.shell-create-wrap`, and carrying a
   second class on it made the element a different node from the design's. */
body.vp [data-vp-dropdown] { position: relative; }
body.vp .vp-dropdown__menu {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: calc(100% + var(--vp-space-3));
  min-inline-size: 210px;
  padding: var(--vp-space-3);
  background: var(--vp-surface);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-md);
  box-shadow: var(--vp-shadow-lg);
  z-index: var(--vp-z-dropdown);
  display: none;
}
body.vp [data-vp-dropdown].is-open .vp-dropdown__menu { display: block; }
body.vp .vp-dropdown__menu a,
body.vp .vp-dropdown__menu button {
  display: flex;
  align-items: center;
  gap: var(--vp-space-4);
  inline-size: 100%;
  padding: var(--vp-space-4) var(--vp-space-5);
  border-radius: var(--vp-radius-xs);
  font-size: var(--vp-text-base);
  color: var(--vp-text);
  text-align: start;
  text-decoration: none;
}
body.vp .vp-dropdown__menu a:hover,
body.vp .vp-dropdown__menu button:hover { background: var(--vp-surface-hover); text-decoration: none; }
body.vp .vp-dropdown__menu svg { inline-size: 16px; block-size: 16px; color: var(--vp-text-muted); }
body.vp .vp-dropdown__head {
  padding: var(--vp-space-4) var(--vp-space-5);
  border-block-end: 1px solid var(--vp-divider);
  margin-block-end: var(--vp-space-3);
}

/* The account menu carries the Appearance and Language controls, which need more
   room than the 210px a list of links wants. */
body.vp .vp-dropdown--account .vp-dropdown__menu { min-inline-size: 268px; }


/* ==========================================================================
   DEFINITION LIST — the read-only counterpart to a form field
   --------------------------------------------------------------------------
   A detail screen is a form with the inputs taken out, and what is left is
   label/value pairs. This was `.lp-summary` inside modules/loyalty.css, used by
   the one read-only screen the panel had (loyalty member history); it is
   generic, so it lives here now and the loyalty name is kept as an alias rather
   than editing that screen's five call sites.

   Hairlines are grid GAPS over a border-coloured background, not per-row
   borders — so the first and last rows need no special case and the rounded
   corners clip cleanly.
   ========================================================================== */

body.vp .vp-dl,
body.vp .lp-summary {
  display: grid;
  gap: 1px;
  background: var(--vp-border);
  border-radius: var(--vp-radius-md);
  overflow: hidden;
}
body.vp .vp-dl__row,
body.vp .lp-summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--vp-space-6);
  padding: var(--vp-space-5) var(--vp-space-6);
  background: var(--vp-surface);
  font-size: var(--vp-text-sm);
}
body.vp .vp-dl__key,
body.vp .lp-summary__key { color: var(--vp-text-muted); flex: 0 0 auto; }
body.vp .vp-dl__val,
body.vp .lp-summary__val {
  font-weight: var(--vp-weight-700);
  color: var(--vp-text);
  font-variant-numeric: tabular-nums;
  text-align: end;
  min-inline-size: 0;
}

/* A value that is a paragraph, not a number — a description, an address, an
   Arabic body. Right-aligned bold is right for "1,240 points" and wrong for
   three sentences, so these stack and read left-to-right. */
body.vp .vp-dl__row--block { display: block; }
body.vp .vp-dl__row--block .vp-dl__key { display: block; margin-block-end: var(--vp-space-3); }
body.vp .vp-dl__row--block .vp-dl__val {
  display: block;
  text-align: start;
  font-weight: var(--vp-weight-400, 400);
  line-height: var(--vp-leading-relaxed);
  white-space: pre-line;
}
/* Arabic values render RTL whatever the panel language is. */
body.vp .vp-dl__val[lang="ar"] { direction: rtl; text-align: start; }

/* Nothing recorded. Muted and italic so an empty value cannot be mistaken for
   a real one at a glance. */
/* A wrapping row of .vp-chip. Used by the read-only role and staff screens to
   list what a role grants — the editable version of the same information is a
   400-line checkbox matrix, and none of that describes a role. */
body.vp .vp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vp-space-3);
}

body.vp .vp-dl__val--empty { color: var(--vp-text-muted); font-weight: var(--vp-weight-400, 400); font-style: italic; }

body.vp .vp-dropdown__sep {
  block-size: 1px;
  background: var(--vp-divider);
  margin: var(--vp-space-3) var(--vp-space-2);
}
body.vp .vp-dropdown__label {
  margin: var(--vp-space-3) 0 var(--vp-space-2);
  padding-inline: var(--vp-space-5);
  font-size: var(--vp-text-xs);
  font-weight: var(--vp-weight-700);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--vp-text-muted);
}

/* --------------------------------------------------------------------------
   Segmented control (Appearance, Language)

   A segmented control rather than three menu rows with ticks: these are settings
   with a CURRENT VALUE, and the whole point is seeing which one is on without
   reading down a list. It also keeps the menu short — five extra rows would have
   made the account menu taller than the viewport on a laptop.
   -------------------------------------------------------------------------- */
body.vp .vp-seg {
  display: flex;
  gap: 2px;
  margin: 0 var(--vp-space-3) var(--vp-space-2);
  padding: 3px;
  background: var(--vp-bg);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-sm, 10px);
}
/* The menu's own `a, button` rule sets display:flex, full width and list padding.
   These have to win it back — hence the element qualifier, matching that rule's
   specificity and coming later in the file. */
body.vp .vp-seg a.vp-seg__opt,
body.vp .vp-seg button.vp-seg__opt {
  flex: 1 1 0;
  min-inline-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 4px;
  border: 0;
  border-radius: var(--vp-radius-xs);
  background: transparent;
  color: var(--vp-text-muted);
  font-size: var(--vp-text-xs);
  font-weight: var(--vp-weight-600);
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
body.vp .vp-seg .vp-seg__opt svg {
  inline-size: 14px;
  block-size: 14px;
  flex: 0 0 auto;
  color: currentColor;
}
body.vp .vp-seg a.vp-seg__opt:hover,
body.vp .vp-seg button.vp-seg__opt:hover {
  background: var(--vp-surface-hover);
  color: var(--vp-text);
}

/* Active. --vp-surface (not --vp-primary-50, which has no dark override) so the
   selected pill reads as a raised chip on the sunken track in BOTH themes. */
body.vp .vp-seg a.vp-seg__opt.is-active,
body.vp .vp-seg button.vp-seg__opt.is-active {
  background: var(--vp-surface);
  color: var(--vp-primary);
  box-shadow: var(--vp-shadow-xs, 0 1px 2px rgba(16, 24, 40, .06));
}

/* Painted from the stamped preference, not from JS, so it is correct in the very
   first frame. data-vp-theme-pref is on <html>; body.vp is the panel's own root. */
:root[data-vp-theme-pref="light"]  body.vp .vp-seg .vp-seg__opt[data-vp-theme-set="light"],
:root[data-vp-theme-pref="dark"]   body.vp .vp-seg .vp-seg__opt[data-vp-theme-set="dark"],
:root[data-vp-theme-pref="system"] body.vp .vp-seg .vp-seg__opt[data-vp-theme-set="system"] {
  background: var(--vp-surface);
  color: var(--vp-primary);
  box-shadow: var(--vp-shadow-xs, 0 1px 2px rgba(16, 24, 40, .06));
}
/* No stored preference at all (first visit, or storage blocked) — the panel is
   following the OS, so System is what is true. */
:root:not([data-vp-theme-pref]) body.vp .vp-seg .vp-seg__opt[data-vp-theme-set="system"] {
  background: var(--vp-surface);
  color: var(--vp-primary);
  box-shadow: var(--vp-shadow-xs, 0 1px 2px rgba(16, 24, 40, .06));
}

/* --------------------------------------------------------------------------
   Active-outlet switcher (topbar)

   Sits with the page title rather than in .vp-topbar__actions, because it names
   the scope the whole page is rendered in — every list below it is filtered by
   this value, so it must stay visible at every width. That is also why it has a
   visible border and label instead of being an icon button like its neighbours:
   a scope indicator has to be readable at a glance, not discoverable on hover.

   Its menu opens from the START edge; .vp-dropdown__menu is anchored to the END
   edge, which is correct next to the avatar on the far side of the bar but would
   throw this one off-screen on a narrow window.
   -------------------------------------------------------------------------- */

body.vp .vp-outlet { flex: 0 1 auto; min-inline-size: 0; }
body.vp .vp-outlet .vp-dropdown__menu {
  inset-inline-end: auto;
  inset-inline-start: 0;
  min-inline-size: 240px;
  max-block-size: min(60vh, 420px);
  overflow-y: auto;
}
body.vp .vp-outlet__btn {
  display: flex;
  align-items: center;
  gap: var(--vp-space-3);
  max-inline-size: 100%;
  padding: var(--vp-space-2) var(--vp-space-4);
  background: var(--vp-surface);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-pill, 999px);
  font-size: var(--vp-text-sm);
  font-weight: var(--vp-weight-600);
  color: var(--vp-text);
  cursor: pointer;
}
body.vp .vp-outlet__btn:hover { background: var(--vp-surface-hover); }
body.vp .vp-outlet__btn > svg {
  inline-size: 15px; block-size: 15px;
  color: var(--vp-text-muted);
  flex: 0 0 auto;
}
body.vp .vp-outlet__now {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The caret must not shrink away when a long outlet name squeezes the button. */
body.vp .vp-outlet__caret { inline-size: 13px; block-size: 13px; }
body.vp .vp-outlet .vp-dropdown__menu a { justify-content: space-between; }
/* --vp-primary-soft, NOT --vp-primary-50. The -50 is a raw palette value with no
   dark-mode override, so in dark mode this painted #F4F2FE behind #F3F4F6 text —
   1.01:1, i.e. the selected outlet's name was invisible. -soft is the semantic
   token and flips to a translucent purple on dark. */
body.vp .vp-outlet .vp-dropdown__menu a.is-active { background: var(--vp-primary-soft); font-weight: var(--vp-weight-700); }
body.vp .vp-outlet__tick { color: var(--vp-primary); font-weight: var(--vp-weight-700); }

/* Below the search breakpoint the label is dropped and the control collapses to
   its icon, so the title keeps the room it needs. The scope is still shown —
   the dropdown, and the "Adding to" line on every create form, both remain. */
@media (max-width: 640px) {
  body.vp .vp-outlet__now { display: none; }
}

/* ==========================================================================
   3. PAGE HEAD / SECTION HEAD / BREADCRUMB
   ========================================================================== */

body.vp .vp-page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--vp-space-6);
  flex-wrap: wrap;
  margin-block-end: var(--vp-space-8);
}

body.vp .vp-section-head { margin-block-end: var(--vp-space-6); }
body.vp .vp-section-head__title {
  font-size: var(--vp-text-2xl);
  font-weight: var(--vp-weight-800);
  line-height: var(--vp-leading-tight);
  letter-spacing: var(--vp-tracking-tight);
  color: var(--vp-text);
}
body.vp .vp-section-head__sub {
  margin-block-start: var(--vp-space-2);
  font-size: var(--vp-text-base);
  color: var(--vp-text-muted);
  max-inline-size: 62ch;
}
body.vp .vp-section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--vp-space-6);
  flex-wrap: wrap;
}

body.vp .breadcrumb,
body.vp .vp-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--vp-space-3);
  font-size: var(--vp-text-sm);
  color: var(--vp-text-muted);
  margin: 0;
  padding: 0;
  list-style: none;
}
body.vp .breadcrumb a,
body.vp .vp-breadcrumb a { color: var(--vp-text-muted); text-decoration: none; }
body.vp .breadcrumb a:hover,
body.vp .vp-breadcrumb a:hover { color: var(--vp-primary); }
body.vp .breadcrumb-item + .breadcrumb-item::before,
body.vp .vp-breadcrumb li + li::before {
  content: "/";
  margin-inline-end: var(--vp-space-3);
  color: var(--vp-border-strong);
}
body.vp .breadcrumb-item.active,
body.vp .vp-breadcrumb li[aria-current] { color: var(--vp-text); font-weight: var(--vp-weight-600); }

/* ==========================================================================
   4. CARDS  (also styles the Bootstrap .card the shipped screens already use)
   ========================================================================== */

body.vp .vp-card,
body.vp .card {
  background: var(--vp-surface);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-lg);
  box-shadow: var(--vp-shadow-sm);
  overflow: hidden;
}

body.vp .vp-card__head,
body.vp .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vp-space-5);
  flex-wrap: wrap;
  padding: var(--vp-space-6) var(--vp-space-7);
  border-block-end: 1px solid var(--vp-divider);
  background: transparent;
}
body.vp .vp-card__head h3,
body.vp .vp-card__head h4,
body.vp .card-header h3,
body.vp .card-header h4,
body.vp .card-header h5 {
  font-size: var(--vp-text-lg);
  font-weight: var(--vp-weight-700);
  letter-spacing: var(--vp-tracking-tight);
  margin: 0;
}
body.vp .card-header.pb-0 { padding-block-end: var(--vp-space-6); }

body.vp .vp-card__body,
body.vp .card-body { padding: var(--vp-space-7); }

body.vp .vp-card__foot,
body.vp .card-footer {
  padding: var(--vp-space-6) var(--vp-space-7);
  border-block-start: 1px solid var(--vp-divider);
  background: var(--vp-surface-2);
}

body.vp .vp-card--flush { box-shadow: none; }
body.vp .vp-card--pad { padding: var(--vp-space-7); }

/* ---- 4a. gradient stat / progress card (the app's loyalty card) ---------- */

body.vp .vp-gradient-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--vp-space-6);
  padding: var(--vp-space-7);
  border-radius: var(--vp-radius-lg);
  background: var(--vp-gradient-primary);
  color: #fff;
  box-shadow: var(--vp-shadow-primary);
  overflow: hidden;
}
body.vp .vp-gradient-card::after {
  content: "";
  position: absolute;
  inset-block-start: -40%;
  inset-inline-end: -10%;
  inline-size: 220px;
  block-size: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  pointer-events: none;
}
body.vp .vp-gradient-card__badge {
  inline-size: 52px;
  block-size: 52px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  display: grid;
  place-items: center;
  color: #fff;
}
body.vp .vp-gradient-card__badge svg { inline-size: 24px; block-size: 24px; }
body.vp .vp-gradient-card__body { flex: 1 1 auto; min-width: 0; position: relative; }
body.vp .vp-gradient-card__label {
  font-size: var(--vp-text-sm);
  color: rgba(255, 255, 255, .78);
  font-weight: var(--vp-weight-500);
}
body.vp .vp-gradient-card__value {
  font-size: var(--vp-text-3xl);
  font-weight: var(--vp-weight-800);
  line-height: var(--vp-leading-tight);
  letter-spacing: var(--vp-tracking-tight);
}
body.vp .vp-gradient-card__chevron {
  inline-size: 20px;
  block-size: 20px;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, .82);
  position: relative;
}
[dir="rtl"] body.vp .vp-gradient-card__chevron { transform: scaleX(-1); }
/* An icon that points forward, such as the arrow of a navigation button, mirrors in Arabic. */
[dir="rtl"] body.vp .vp-flip-rtl { transform: scaleX(-1); }

body.vp .vp-progress {
  block-size: 8px;
  inline-size: 100%;
  border-radius: var(--vp-radius-pill);
  background: var(--vp-surface-sunken);
  overflow: hidden;
}
body.vp .vp-progress__bar {
  block-size: 100%;
  border-radius: var(--vp-radius-pill);
  background: var(--vp-primary);
  transition: inline-size var(--vp-dur-slow) var(--vp-ease);
}
body.vp .vp-progress--on-gradient { background: rgba(255, 255, 255, .24); }
body.vp .vp-progress--on-gradient .vp-progress__bar { background: #fff; }

/* ---- 4b. media card: image top + overlapping circular logo --------------- */

body.vp .vp-media-card {
  display: flex;
  flex-direction: column;
  background: var(--vp-surface);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-lg);
  box-shadow: var(--vp-shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--vp-dur-base) var(--vp-ease),
              transform var(--vp-dur-base) var(--vp-ease);
}
body.vp .vp-media-card:hover { box-shadow: var(--vp-shadow-md); transform: translateY(-2px); }

body.vp .vp-media-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--vp-surface-sunken);
}
body.vp .vp-media-card__media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

body.vp .vp-media-card__logo {
  position: absolute;
  inset-inline-start: var(--vp-space-6);
  inset-block-end: 0;
  transform: translateY(50%);
  inline-size: 64px;
  block-size: 64px;
  border-radius: 50%;
  border: 3px solid var(--vp-surface);
  background: var(--vp-surface);
  object-fit: cover;
  box-shadow: var(--vp-shadow-sm);
  z-index: 1;
}

body.vp .vp-media-card__body {
  padding: var(--vp-space-6);
  padding-block-start: var(--vp-space-12); /* clears the overlapping logo */
  display: flex;
  flex-direction: column;
  gap: var(--vp-space-2);
  flex: 1 1 auto;
}

body.vp .vp-media-card__title {
  font-size: var(--vp-text-lg);
  font-weight: var(--vp-weight-700);
  letter-spacing: var(--vp-tracking-tight);
  color: var(--vp-text);
}
body.vp .vp-media-card__meta {
  font-size: var(--vp-text-sm);
  color: var(--vp-text-muted);
}
body.vp .vp-media-card__stat {
  font-size: var(--vp-text-sm);
  font-weight: var(--vp-weight-700);
  color: var(--vp-primary);
}
body.vp .vp-media-card__stat--blue { color: var(--vp-link); }
body.vp .vp-media-card__foot {
  margin-block-start: auto;
  padding-block-start: var(--vp-space-5);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ---- 4c. venue / destination card ---------------------------------------
   Badge tint arrives inline as --vp-venue-tint so it can be fed straight from
   destination_types.color_code — the set grows without a stylesheet edit.    */

body.vp .vp-venue-card {
  --vp-venue-tint: var(--vp-primary);
  display: flex;
  flex-direction: column;
  background: var(--vp-surface);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-lg);
  box-shadow: var(--vp-shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--vp-dur-base) var(--vp-ease),
              transform var(--vp-dur-base) var(--vp-ease);
}
body.vp .vp-venue-card:hover { box-shadow: var(--vp-shadow-md); transform: translateY(-2px); }

body.vp .vp-venue-card__media {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--vp-surface-sunken);
}
body.vp .vp-venue-card__media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}
body.vp .vp-venue-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .34), transparent 52%);
  pointer-events: none;
}

body.vp .vp-venue-card__type {
  position: absolute;
  inset-inline-start: var(--vp-space-5);
  inset-block-start: var(--vp-space-5);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: var(--vp-space-2);
  padding: var(--vp-space-2) var(--vp-space-5);
  border-radius: var(--vp-radius-pill);
  background: var(--vp-venue-tint);
  color: #fff;
  font-size: var(--vp-text-xs);
  font-weight: var(--vp-weight-700);
  letter-spacing: .01em;
  box-shadow: var(--vp-shadow-xs);
}

body.vp .vp-venue-card__body {
  padding: var(--vp-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--vp-space-3);
  flex: 1 1 auto;
}
body.vp .vp-venue-card__title {
  font-size: var(--vp-text-lg);
  font-weight: var(--vp-weight-700);
  letter-spacing: var(--vp-tracking-tight);
}
body.vp .vp-venue-card__stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--vp-space-6);
  margin-block-start: auto;
  padding-block-start: var(--vp-space-5);
  border-block-start: 1px solid var(--vp-divider);
}
body.vp .vp-venue-card__stat {
  display: inline-flex;
  align-items: center;
  gap: var(--vp-space-3);
  font-size: var(--vp-text-sm);
  font-weight: var(--vp-weight-600);
  color: var(--vp-text-muted);
}
body.vp .vp-venue-card__stat svg {
  inline-size: 15px;
  block-size: 15px;
  color: var(--vp-venue-tint);
}
body.vp .vp-venue-card__stat b { color: var(--vp-text); font-weight: var(--vp-weight-700); }

/* ---- 4d. plain stat tile / KPI ------------------------------------------- */

body.vp .vp-stat-card {
  padding: var(--vp-space-7);
  background: var(--vp-surface);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-lg);
  box-shadow: var(--vp-shadow-xs);
}
body.vp .vp-stat-card__label {
  font-size: var(--vp-text-sm);
  color: var(--vp-text-muted);
  font-weight: var(--vp-weight-500);
}
body.vp .vp-stat-card__value {
  margin-block-start: var(--vp-space-3);
  font-size: var(--vp-text-3xl);
  font-weight: var(--vp-weight-800);
  letter-spacing: var(--vp-tracking-tight);
  line-height: var(--vp-leading-tight);
}
body.vp .vp-stat-card__delta {
  margin-block-start: var(--vp-space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--vp-space-2);
  font-size: var(--vp-text-xs);
  font-weight: var(--vp-weight-700);
  padding: var(--vp-space-1) var(--vp-space-4);
  border-radius: var(--vp-radius-pill);
}
body.vp .vp-stat-card__delta--up   { color: var(--vp-success); background: var(--vp-success-soft); }
body.vp .vp-stat-card__delta--down { color: var(--vp-danger);  background: var(--vp-danger-soft); }

/* ==========================================================================
   5. CHIPS
   ========================================================================== */

body.vp .vp-chip-row {
  display: flex;
  align-items: center;
  gap: var(--vp-space-4);
  overflow-x: auto;
  padding-block-end: var(--vp-space-2);
  scrollbar-width: none;
}
body.vp .vp-chip-row::-webkit-scrollbar { display: none; }

body.vp .vp-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--vp-space-3);
  flex: 0 0 auto;
  padding: var(--vp-space-3) var(--vp-space-6);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-xl);
  background: var(--vp-surface);
  color: var(--vp-text);
  font-size: var(--vp-text-base);
  font-weight: var(--vp-weight-600);
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--vp-dur-fast) var(--vp-ease),
              border-color var(--vp-dur-fast) var(--vp-ease),
              color var(--vp-dur-fast) var(--vp-ease);
}
body.vp .vp-chip:hover { border-color: var(--vp-border-strong); background: var(--vp-surface-hover); text-decoration: none; }
body.vp .vp-chip svg { inline-size: 15px; block-size: 15px; color: var(--vp-text-muted); }
body.vp .vp-chip.is-active {
  background: var(--vp-primary);
  border-color: var(--vp-primary);
  color: var(--vp-primary-contrast);
}
body.vp .vp-chip.is-active svg { color: currentColor; }
body.vp .vp-chip--sm { padding: var(--vp-space-2) var(--vp-space-5); font-size: var(--vp-text-sm); }

/* ==========================================================================
   6. TABS
   ========================================================================== */

body.vp .vp-tabs {
  display: flex;
  align-items: center;
  gap: var(--vp-space-8);
  border-block-end: 1px solid var(--vp-border);
  overflow-x: auto;
  scrollbar-width: none;
}
body.vp .vp-tabs::-webkit-scrollbar { display: none; }

body.vp .vp-tab {
  position: relative;
  flex: 0 0 auto;
  padding-block: var(--vp-space-5);
  font-size: var(--vp-text-md);
  font-weight: var(--vp-weight-600);
  color: var(--vp-text-muted);
  background: none;
  border: 0;
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--vp-dur-fast) var(--vp-ease);
}
body.vp .vp-tab:hover { color: var(--vp-text); text-decoration: none; }
body.vp .vp-tab.is-active { color: var(--vp-text); font-weight: var(--vp-weight-700); }
body.vp .vp-tab.is-active::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: -1px;
  block-size: 3px;
  border-radius: var(--vp-radius-pill) var(--vp-radius-pill) 0 0;
  background: var(--vp-text);
}

/* secondary, lighter row (All / Images / Videos) */
body.vp .vp-tabs--secondary {
  border-block-end: 0;
  gap: var(--vp-space-4);
  padding-block: var(--vp-space-4);
}
body.vp .vp-tabs--secondary .vp-tab {
  padding: var(--vp-space-2) var(--vp-space-5);
  border-radius: var(--vp-radius-pill);
  font-size: var(--vp-text-sm);
}
body.vp .vp-tabs--secondary .vp-tab.is-active {
  background: var(--vp-primary-soft);
  color: var(--vp-primary);
}
body.vp .vp-tabs--secondary .vp-tab.is-active::after { display: none; }

/* ==========================================================================
   7. ACTION ROW — outlined icon above a small dark label
   ========================================================================== */

body.vp .vp-action-row {
  display: flex;
  align-items: flex-start;
  gap: var(--vp-space-8);
  flex-wrap: wrap;
}
body.vp .vp-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--vp-space-3);
  min-inline-size: 64px;
  background: none;
  border: 0;
  text-decoration: none;
}
body.vp .vp-action__icon {
  inline-size: 46px;
  block-size: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--vp-primary-soft-border);
  background: var(--vp-primary-soft);
  color: var(--vp-primary);
  transition: background var(--vp-dur-fast) var(--vp-ease),
              border-color var(--vp-dur-fast) var(--vp-ease);
}
body.vp .vp-action__icon svg { inline-size: 20px; block-size: 20px; }
body.vp .vp-action:hover .vp-action__icon { background: var(--vp-primary-soft-strong); border-color: var(--vp-primary); }
body.vp .vp-action__label {
  font-size: var(--vp-text-sm);
  font-weight: var(--vp-weight-600);
  color: var(--vp-text);
}

/* ==========================================================================
   8. BUTTONS  (also styles the Bootstrap .btn already in the screens)
   ========================================================================== */

body.vp .vp-btn,
body.vp .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--vp-space-3);
  padding: var(--vp-space-4) var(--vp-space-7);
  border: 1px solid transparent;
  border-radius: var(--vp-radius-sm);
  font-size: var(--vp-text-base);
  font-weight: var(--vp-weight-600);
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--vp-dur-fast) var(--vp-ease),
              border-color var(--vp-dur-fast) var(--vp-ease),
              color var(--vp-dur-fast) var(--vp-ease),
              transform var(--vp-dur-fast) var(--vp-ease);
}
body.vp .vp-btn:hover,
body.vp .btn:hover { text-decoration: none; }
body.vp .vp-btn:active,
body.vp .btn:active { transform: translateY(1px); }
body.vp .vp-btn:disabled,
body.vp .btn:disabled,
body.vp .vp-btn.is-disabled { opacity: .55; cursor: not-allowed; transform: none; }
body.vp .vp-btn svg,
body.vp .btn svg { inline-size: 16px; block-size: 16px; }

body.vp .vp-btn-primary,
body.vp .btn-primary {
  background: var(--vp-primary);
  color: var(--vp-primary-contrast);
  box-shadow: var(--vp-shadow-primary);
}
body.vp .vp-btn-primary:hover,
body.vp .btn-primary:hover { background: var(--vp-primary-hover); color: var(--vp-primary-contrast); }

body.vp .vp-btn-secondary,
body.vp .btn-secondary {
  background: var(--vp-link);
  color: #fff;
}
body.vp .vp-btn-secondary:hover,
body.vp .btn-secondary:hover { background: var(--vp-link-hover); color: #fff; }
/* In the dark theme --vp-link is a light blue, and the white text above on it
   measured 2.4:1 ("Cancel" in the form bars). There the button takes a deeper
   blue instead, which keeps the white text readable (16 October 2026). The
   theme test sits in :where(), so these rules weigh the same as the two above
   and a module that styles its own secondary buttons still wins. */
:where(:root[data-vp-theme="dark"]) body.vp .vp-btn-secondary,
:where(:root[data-vp-theme="dark"]) body.vp .btn-secondary { background: var(--vp-blue-600); }
:where(:root[data-vp-theme="dark"]) body.vp .vp-btn-secondary:hover,
:where(:root[data-vp-theme="dark"]) body.vp .btn-secondary:hover { background: var(--vp-blue-700); }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-vp-theme="light"])) body.vp .vp-btn-secondary,
  :where(:root:not([data-vp-theme="light"])) body.vp .btn-secondary { background: var(--vp-blue-600); }
  :where(:root:not([data-vp-theme="light"])) body.vp .vp-btn-secondary:hover,
  :where(:root:not([data-vp-theme="light"])) body.vp .btn-secondary:hover { background: var(--vp-blue-700); }
}

body.vp .vp-btn-outline {
  background: transparent;
  border-color: var(--vp-primary);
  color: var(--vp-primary);
}
body.vp .vp-btn-outline:hover { background: var(--vp-primary-soft); }

body.vp .vp-btn-ghost,
body.vp .btn-light {
  background: var(--vp-surface);
  border-color: var(--vp-border);
  color: var(--vp-text);
}
body.vp .vp-btn-ghost:hover,
body.vp .btn-light:hover { background: var(--vp-surface-hover); border-color: var(--vp-border-strong); color: var(--vp-text); }

body.vp .vp-btn-subtle {
  background: var(--vp-primary-soft);
  color: var(--vp-primary);
  border-color: transparent;
}
body.vp .vp-btn-subtle:hover { background: var(--vp-primary-soft-strong); }

body.vp .vp-btn-danger,
body.vp .btn-danger {
  background: var(--vp-danger);
  color: var(--vp-danger-contrast);
}
body.vp .vp-btn-danger:hover,
body.vp .btn-danger:hover { background: var(--vp-danger-700); color: #fff; }

body.vp .vp-btn-sm,
body.vp .btn-sm { padding: var(--vp-space-3) var(--vp-space-5); font-size: var(--vp-text-sm); }
body.vp .vp-btn-lg,
body.vp .btn-lg { padding: var(--vp-space-5) var(--vp-space-10); font-size: var(--vp-text-md); }

body.vp .vp-btn-pill { border-radius: var(--vp-radius-pill); }
body.vp .vp-btn-block { inline-size: 100%; }

body.vp .vp-btn-icon {
  padding: 0;
  inline-size: 36px;
  block-size: 36px;
  border-radius: var(--vp-radius-sm);
}

body.vp .vp-btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
body.vp .vp-btn.is-loading::after {
  content: "";
  position: absolute;
  inline-size: 15px; block-size: 15px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-block-start-color: #fff;
  border-radius: 50%;
  animation: vp-spin .7s linear infinite;
}

@keyframes vp-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   9. FORMS  (matches the .form-group > label + .form-control markup in use)
   ========================================================================== */

body.vp .form-group,
body.vp .vp-field { margin-block-end: var(--vp-space-6); }

body.vp .form-group > label,
body.vp .vp-label,
body.vp .col-form-label {
  display: block;
  margin-block-end: var(--vp-space-3);
  font-size: var(--vp-text-sm);
  font-weight: var(--vp-weight-600);
  color: var(--vp-text);
}

body.vp .form-control,
body.vp .form-select,
body.vp .vp-input {
  inline-size: 100%;
  min-block-size: 42px;
  padding: var(--vp-space-4) var(--vp-space-5);
  font-size: var(--vp-text-base);
  color: var(--vp-text);
  background: var(--vp-surface);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-sm);
  box-shadow: none;
  transition: border-color var(--vp-dur-fast) var(--vp-ease),
              box-shadow var(--vp-dur-fast) var(--vp-ease);
}
body.vp textarea.form-control,
body.vp .vp-input--area { min-block-size: 96px; line-height: var(--vp-leading-normal); resize: vertical; }

body.vp .form-control::placeholder,
body.vp .vp-input::placeholder { color: var(--vp-text-subtle); }

body.vp .form-control:focus,
body.vp .form-select:focus,
body.vp .vp-input:focus {
  outline: none;
  border-color: var(--vp-primary);
  box-shadow: 0 0 0 3px var(--vp-primary-soft);
}

body.vp .form-control:disabled,
body.vp .vp-input:disabled { background: var(--vp-surface-sunken); color: var(--vp-text-muted); cursor: not-allowed; }

body.vp input[type="file"].form-control { padding: var(--vp-space-3) var(--vp-space-4); }

/* select caret — the ONLY place a physical direction is used, and it is
   mirrored explicitly for RTL rather than left as a layout leak. */
body.vp select.form-control,
body.vp .form-select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: var(--vp-space-12);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right var(--vp-space-5) center;
  background-size: 15px;
}
[dir="rtl"] body.vp select.form-control,
[dir="rtl"] body.vp .form-select {
  background-position: left var(--vp-space-5) center;
  padding-inline-end: var(--vp-space-5);
  padding-inline-start: var(--vp-space-12);
}

body.vp .vp-field-hint {
  margin-block-start: var(--vp-space-2);
  font-size: var(--vp-text-xs);
  color: var(--vp-text-muted);
}

/* validation — mirrors the .has-error / .text-danger convention already used */
body.vp .has-error > label,
body.vp .has-error label { color: var(--vp-danger); }
body.vp .has-error .form-control,
body.vp .has-error input,
body.vp .has-error textarea,
body.vp .has-error select {
  border-color: var(--vp-danger) !important;
  box-shadow: 0 0 0 3px var(--vp-danger-soft);
}
body.vp .text-danger {
  color: var(--vp-danger) !important;
  font-size: var(--vp-text-xs);
  margin-block-start: var(--vp-space-2);
  display: inline-block;
}

body.vp .input-group { display: flex; align-items: stretch; }
body.vp .input-group .form-control {
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}
body.vp .input-group__addon,
body.vp .input-group-text {
  display: inline-flex;
  align-items: center;
  padding-inline: var(--vp-space-5);
  border: 1px solid var(--vp-border);
  border-inline-start: 0;
  border-start-end-radius: var(--vp-radius-sm);
  border-end-end-radius: var(--vp-radius-sm);
  background: var(--vp-surface-sunken);
  color: var(--vp-text-muted);
  font-size: var(--vp-text-sm);
  white-space: nowrap;
}

/* check / radio */
body.vp .form-check,
body.vp .vp-check {
  display: flex;
  align-items: center;
  gap: var(--vp-space-4);
  margin-block-end: var(--vp-space-3);
}
body.vp .form-check input[type="checkbox"],
body.vp .form-check input[type="radio"],
body.vp .vp-check input {
  inline-size: 17px;
  block-size: 17px;
  accent-color: var(--vp-primary);
  margin: 0;
  flex: 0 0 auto;
}
body.vp .form-check label,
body.vp .vp-check label { margin: 0; font-size: var(--vp-text-base); font-weight: var(--vp-weight-400); }

/* switch */
body.vp .vp-switch { display: inline-flex; align-items: center; gap: var(--vp-space-4); }
body.vp .vp-switch input { position: absolute; opacity: 0; pointer-events: none; }
body.vp .vp-switch__track {
  inline-size: 42px;
  block-size: 24px;
  border-radius: var(--vp-radius-pill);
  background: var(--vp-border-strong);
  position: relative;
  transition: background var(--vp-dur-base) var(--vp-ease);
  cursor: pointer;
  flex: 0 0 auto;
}
body.vp .vp-switch__track::after {
  content: "";
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  inline-size: 18px;
  block-size: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--vp-shadow-xs);
  transition: transform var(--vp-dur-base) var(--vp-ease);
}
body.vp .vp-switch input:checked + .vp-switch__track { background: var(--vp-primary); }
body.vp .vp-switch input:checked + .vp-switch__track::after { transform: translateX(18px); }
[dir="rtl"] body.vp .vp-switch input:checked + .vp-switch__track::after { transform: translateX(-18px); }
body.vp .vp-switch input:focus-visible + .vp-switch__track { outline: 2px solid var(--vp-focus-ring); outline-offset: 2px; }

/* ==========================================================================
   10. TABLES
   ========================================================================== */

/* Tables carrying `of-table` are the approved design's own table and bring their
   own complete styling in modules/offer-library.css. The rules below were
   written for the panel's original table and outranked that sheet, so every
   cell took this colour, this padding and this white-space instead of the
   design's. `:not(.of-table)` keeps them away from it. Every other table in the
   panel is unaffected. */

body.vp .vp-table,
body.vp table.display,
body.vp table.dataTable:not(.of-table) {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: var(--vp-text-base);
}

body.vp .vp-table thead th,
body.vp table.display thead th,
body.vp table.dataTable:not(.of-table) thead th {
  padding: var(--vp-space-5) var(--vp-space-6);
  font-size: var(--vp-text-xs);
  font-weight: var(--vp-weight-700);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--vp-text-muted);
  text-align: start;
  background: var(--vp-surface-2);
  border-block-end: 1px solid var(--vp-border);
  white-space: nowrap;
}

body.vp .vp-table tbody td,
body.vp table.display tbody td,
body.vp table.dataTable:not(.of-table) tbody td {
  padding: var(--vp-space-5) var(--vp-space-6);
  border-block-end: 1px solid var(--vp-divider);
  color: var(--vp-text);
  text-align: start;
  vertical-align: middle;
}

body.vp .vp-table tbody tr:hover,
body.vp table.display tbody tr:hover,
body.vp table.dataTable:not(.of-table) tbody tr:hover { background: var(--vp-surface-hover); }

body.vp .vp-table tbody tr:last-child td,
body.vp table.dataTable:not(.of-table) tbody tr:last-child td { border-block-end: 0; }

body.vp .table-responsive,
body.vp .vp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

body.vp .vp-table-toolbar {
  display: flex;
  align-items: flex-end;
  gap: var(--vp-space-5);
  flex-wrap: wrap;
  margin-block-end: var(--vp-space-6);
}

body.vp .vp-table__thumb {
  inline-size: 44px;
  block-size: 44px;
  border-radius: var(--vp-radius-xs);
  object-fit: cover;
  border: 1px solid var(--vp-border);
}

/* the ul.action > li.edit / li.delete pattern used across the shipped screens */
body.vp ul.action,
body.vp .vp-action-list {
  display: flex;
  align-items: center;
  gap: var(--vp-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
body.vp ul.action li a,
body.vp .vp-action-list li a {
  display: grid;
  place-items: center;
  inline-size: 32px;
  block-size: 32px;
  border-radius: var(--vp-radius-xs);
  color: var(--vp-text-muted);
  background: var(--vp-surface-sunken);
  transition: background var(--vp-dur-fast) var(--vp-ease), color var(--vp-dur-fast) var(--vp-ease);
}
body.vp ul.action li.edit a:hover,
body.vp .vp-action-list li.edit a:hover { background: var(--vp-primary-soft); color: var(--vp-primary); }
body.vp ul.action li.delete a:hover,
body.vp .vp-action-list li.delete a:hover { background: var(--vp-danger-soft); color: var(--vp-danger); }

/* ==========================================================================
   11. BADGES / STATUS
   ========================================================================== */

body.vp .vp-badge,
body.vp .badge {
  display: inline-flex;
  align-items: center;
  gap: var(--vp-space-2);
  padding: var(--vp-space-2) var(--vp-space-4);
  border-radius: var(--vp-radius-pill);
  font-size: var(--vp-text-xs);
  font-weight: var(--vp-weight-700);
  line-height: 1.4;
  white-space: nowrap;
}
body.vp .vp-badge-primary { background: var(--vp-primary-soft); color: var(--vp-primary); }
body.vp .vp-badge-success { background: var(--vp-success-soft); color: var(--vp-success); }
body.vp .vp-badge-warning { background: var(--vp-warning-soft); color: var(--vp-warning); }
body.vp .vp-badge-danger  { background: var(--vp-danger-soft);  color: var(--vp-danger); }
body.vp .vp-badge-info    { background: var(--vp-info-soft);    color: var(--vp-info); }
body.vp .vp-badge-neutral { background: var(--vp-surface-sunken); color: var(--vp-text-muted); }

body.vp .vp-badge-dot {
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

/* ==========================================================================
   12. ALERTS
   ========================================================================== */

body.vp .vp-alert,
body.vp .alert {
  display: flex;
  align-items: flex-start;
  gap: var(--vp-space-5);
  padding: var(--vp-space-5) var(--vp-space-6);
  border: 1px solid var(--vp-border);
  border-inline-start: 3px solid var(--vp-text-muted);
  border-radius: var(--vp-radius-sm);
  background: var(--vp-surface-2);
  font-size: var(--vp-text-base);
  color: var(--vp-text);
}
body.vp .vp-alert svg { inline-size: 18px; block-size: 18px; flex: 0 0 auto; margin-block-start: 1px; }
body.vp .vp-alert__title { font-weight: var(--vp-weight-700); margin-block-end: var(--vp-space-1); }

body.vp .vp-alert-success { background: var(--vp-success-soft); border-inline-start-color: var(--vp-success); border-color: transparent; }
body.vp .vp-alert-success svg { color: var(--vp-success); }
body.vp .vp-alert-warning { background: var(--vp-warning-soft); border-inline-start-color: var(--vp-warning); border-color: transparent; }
body.vp .vp-alert-warning svg { color: var(--vp-warning); }
body.vp .vp-alert-danger  { background: var(--vp-danger-soft);  border-inline-start-color: var(--vp-danger);  border-color: transparent; }
body.vp .vp-alert-danger svg { color: var(--vp-danger); }
body.vp .vp-alert-info    { background: var(--vp-info-soft);    border-inline-start-color: var(--vp-info);    border-color: transparent; }
body.vp .vp-alert-info svg { color: var(--vp-info); }

/* ==========================================================================
   13. DIALOG  (re-skins the Bootstrap markup already in the screens: the
       location picker, the working-hours editor, the attribute lattice)
   ========================================================================== */

body.vp .modal-content {
  background: var(--vp-surface);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-lg);
  box-shadow: var(--vp-shadow-xl);
  overflow: hidden;
}

body.vp .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vp-space-5);
  padding: var(--vp-space-6) var(--vp-space-7);
  border-block-end: 1px solid var(--vp-divider);
}
body.vp .modal-title {
  font-size: var(--vp-text-lg);
  font-weight: var(--vp-weight-700);
  letter-spacing: var(--vp-tracking-tight);
  margin: 0;
}

body.vp .modal-body { padding: var(--vp-space-7); }

body.vp .modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--vp-space-4);
  padding: var(--vp-space-6) var(--vp-space-7);
  border-block-start: 1px solid var(--vp-divider);
  background: var(--vp-surface-2);
}

/* ==========================================================================
   13b. BOOTSTRAP TABLE  (re-skins the .table markup already in the screens)
   ========================================================================== */

/* Bootstrap's .table hardcodes `color: #212529` and `border-color: #dee2e6`
   and knows nothing about the theme. In dark mode that is near-black text on
   the #131822 surface — about 1.2:1, which is not "low contrast", it is
   invisible. The working-hours modal on Profile and Outlets is the worst case
   because the entire grid is one .table: the Day / Closed / Opens / Closes
   headers and all seven day names disappeared. The offer-items table, the
   post/event tables and the outlet list had the same problem on the page.

   The --bs-table-* custom properties are set as well as `color`, because the
   striped, hover and active states resolve through those and Bootstrap gives
   each of them its own hardcoded #212529 — fixing only `color` would leave
   the text vanishing again the moment a row was hovered.

   Not scoped to dark: pointing the light theme at the same tokens keeps one
   definition instead of two that can drift. */
body.vp .table {
  --bs-table-color: var(--vp-text);
  --bs-table-bg: transparent;
  --bs-table-striped-color: var(--vp-text);
  --bs-table-striped-bg: var(--vp-surface-2);
  --bs-table-active-color: var(--vp-text);
  --bs-table-active-bg: var(--vp-surface-hover);
  --bs-table-hover-color: var(--vp-text);
  --bs-table-hover-bg: var(--vp-surface-hover);
  color: var(--vp-text);
  border-color: var(--vp-border);
}
/* Both levels: .table-bordered draws the horizontal rules on the row/section
   and the verticals on the cell, and each takes its colour from here. */
body.vp .table > :not(caption) > *,
body.vp .table > :not(caption) > * > * { border-color: var(--vp-border); }

body.vp .table > thead > tr > th {
  color: var(--vp-text-muted);
  font-weight: var(--vp-weight-600);
}

/* Column separators.
   Every Bootstrap .table left in this panel is an ENTRY grid — the cells hold
   inputs (offer items, the post tables, both working-hours editors) — so a
   vertical rule earns its place: with five controls on a row it is what tells
   you which box belongs to which column. The read-only record lists are
   .vp-rec, not .table, and are deliberately left with horizontal rules only,
   where verticals would just be noise.

   Zebra striping was the alternative and is the wrong tool for these: a tinted
   band sits behind inputs that carry their own surface colour, and the two
   fight. Striping pays off on dense read-only tables, which these are not.

   --vp-divider, not --vp-border: a column rule should be quieter than the
   frame around the table. border-inline-end so RTL mirrors it, and
   :not(:last-child) so no rule is drawn against the outer edge.
   .table-bordered already draws its own grid, so it is excluded. */
body.vp .table:not(.table-bordered) > :not(caption) > * > *:not(:last-child) {
  border-inline-end: 1px solid var(--vp-divider);
}

body.vp .btn-close {
  inline-size: 32px;
  block-size: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--vp-radius-xs);
  color: var(--vp-text-muted);
  opacity: 1;
  background: none;
  border: 0;
  font-size: var(--vp-text-xl);
  line-height: 1;
}
body.vp .btn-close:hover { background: var(--vp-surface-hover); color: var(--vp-text); }

body.vp .modal-backdrop { background: var(--vp-overlay); }

/* static, always-open modal — lets the styleguide show it without Bootstrap JS */
body.vp .vp-modal-static {
  max-inline-size: 560px;
  margin-inline: auto;
}

/* ==========================================================================
   14. EMPTY / SKELETON / SPINNER / TOOLTIP
   ========================================================================== */

body.vp .vp-empty-state {
  text-align: center;
  padding: var(--vp-space-14) var(--vp-space-7);
}
body.vp .vp-empty-state__icon {
  inline-size: 56px;
  block-size: 56px;
  margin-inline: auto;
  margin-block-end: var(--vp-space-5);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--vp-primary-soft);
  color: var(--vp-primary);
}
body.vp .vp-empty-state__title { font-size: var(--vp-text-lg); font-weight: var(--vp-weight-700); }
body.vp .vp-empty-state__sub {
  margin-block-start: var(--vp-space-2);
  color: var(--vp-text-muted);
  font-size: var(--vp-text-base);
}

body.vp .vp-skeleton {
  background: linear-gradient(90deg, var(--vp-surface-sunken) 25%, var(--vp-surface-hover) 37%, var(--vp-surface-sunken) 63%);
  background-size: 400% 100%;
  animation: vp-shimmer 1.4s ease infinite;
  border-radius: var(--vp-radius-xs);
  block-size: 12px;
}
@keyframes vp-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

body.vp .vp-spinner {
  inline-size: 22px;
  block-size: 22px;
  border: 2.5px solid var(--vp-border);
  border-block-start-color: var(--vp-primary);
  border-radius: 50%;
  animation: vp-spin .7s linear infinite;
}

body.vp .vp-avatar-stack { display: flex; align-items: center; }
body.vp .vp-avatar-stack > * + * { margin-inline-start: -10px; }
body.vp .vp-avatar-stack .vp-avatar { border: 2px solid var(--vp-surface); }

/* ==========================================================================
   15. PLUGIN SKINS — DataTables, Select2, Toastr, SweetAlert2
   ========================================================================== */

/* ---- DataTables ---------------------------------------------------------- */
body.vp .dataTables_wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--vp-space-5);
  font-size: var(--vp-text-base);
  color: var(--vp-text);
}

/* On the offers library the table is the approved design's, and this wrapper
   sits around it only because DataTables put it there. Its colour and size were
   reaching every cell inside — this is what made the whole table read in the
   panel's near-black rather than the package's ink, and what an override in
   offer-library.css used to paper over. The layout above still applies; only
   the two inherited properties are handed back. Same weight as the rule above,
   so it wins on order rather than by outranking anything. */
body.vp:where(.offers-library-reference) .dataTables_wrapper {
  font-size: inherit;
  color: inherit;
}
body.vp .dataTables_wrapper .dataTables_length,
body.vp .dataTables_wrapper .dataTables_filter { color: var(--vp-text-muted); font-size: var(--vp-text-sm); }
body.vp .dataTables_wrapper .dataTables_filter { text-align: end; }
body.vp .dataTables_wrapper .dataTables_length select,
body.vp .dataTables_wrapper .dataTables_filter input {
  min-block-size: 34px;
  padding: var(--vp-space-2) var(--vp-space-4);
  margin-inline: var(--vp-space-3);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-sm);
  background: var(--vp-surface);
  color: var(--vp-text);
}
body.vp .dataTables_wrapper .dataTables_filter input:focus,
body.vp .dataTables_wrapper .dataTables_length select:focus {
  outline: none;
  border-color: var(--vp-primary);
  box-shadow: 0 0 0 3px var(--vp-primary-soft);
}
body.vp .dataTables_wrapper .dataTables_info {
  color: var(--vp-text-muted);
  font-size: var(--vp-text-sm);
  padding-block-start: 0;
}
body.vp .dataTables_wrapper .dataTables_paginate {
  display: flex;
  align-items: center;
  gap: var(--vp-space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}
body.vp .dataTables_wrapper .dataTables_paginate .paginate_button {
  min-inline-size: 34px;
  block-size: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--vp-space-4);
  border: 1px solid var(--vp-border) !important;
  border-radius: var(--vp-radius-sm) !important;
  background: var(--vp-surface) !important;
  color: var(--vp-text) !important;
  font-size: var(--vp-text-sm);
  cursor: pointer;
}
body.vp .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--vp-surface-hover) !important;
  border-color: var(--vp-border-strong) !important;
  color: var(--vp-text) !important;
}
body.vp .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--vp-primary) !important;
  border-color: var(--vp-primary) !important;
  color: var(--vp-primary-contrast) !important;
  font-weight: var(--vp-weight-700);
}
body.vp .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: .45;
  cursor: not-allowed;
}
body.vp .dataTables_wrapper .dataTables_processing {
  background: var(--vp-surface) !important;
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-md);
  box-shadow: var(--vp-shadow-md);
  color: var(--vp-text);
  padding: var(--vp-space-5) var(--vp-space-7);
}

/* sort arrows — pinned to the inline-end so they follow direction */
body.vp table.dataTable thead th.sorting,
body.vp table.dataTable thead th.sorting_asc,
body.vp table.dataTable thead th.sorting_desc {
  position: relative;
  cursor: pointer;
  padding-inline-end: var(--vp-space-10);
  background-image: none !important;
}
body.vp table.dataTable thead th.sorting::after,
body.vp table.dataTable thead th.sorting_asc::after,
body.vp table.dataTable thead th.sorting_desc::after {
  position: absolute;
  inset-inline-end: var(--vp-space-5);
  inset-block-start: 50%;
  transform: translateY(-50%);
  font-size: var(--vp-text-xs);
  color: var(--vp-text-subtle);
}
body.vp table.dataTable thead th.sorting::after      { content: "\2195"; }
body.vp table.dataTable thead th.sorting_asc::after  { content: "\2191"; color: var(--vp-primary); }
body.vp table.dataTable thead th.sorting_desc::after { content: "\2193"; color: var(--vp-primary); }

/* ---- Select2 ------------------------------------------------------------- */
body.vp .select2-container { inline-size: 100% !important; }
body.vp .select2-container--default .select2-selection--single,
body.vp .select2-container--default .select2-selection--multiple {
  min-block-size: 42px;
  padding: var(--vp-space-2) var(--vp-space-4);
  border: 1px solid var(--vp-border) !important;
  border-radius: var(--vp-radius-sm) !important;
  background: var(--vp-surface) !important;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--vp-space-2);
}
body.vp .select2-container--default.select2-container--focus .select2-selection--single,
body.vp .select2-container--default.select2-container--focus .select2-selection--multiple,
body.vp .select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--vp-primary) !important;
  box-shadow: 0 0 0 3px var(--vp-primary-soft);
}
body.vp .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--vp-text);
  line-height: 1.5;
  padding-inline: 0;
}
body.vp .select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--vp-text-subtle); }
body.vp .select2-container--default .select2-selection--single .select2-selection__arrow {
  block-size: 40px;
  inset-inline-end: var(--vp-space-4);
}
body.vp .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--vp-primary-soft) !important;
  border: 1px solid var(--vp-primary-soft-border) !important;
  border-radius: var(--vp-radius-pill) !important;
  color: var(--vp-primary) !important;
  font-size: var(--vp-text-sm);
  font-weight: var(--vp-weight-600);
  padding: var(--vp-space-1) var(--vp-space-4);
  margin: 0;
}
body.vp .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: var(--vp-primary) !important;
  margin-inline-end: var(--vp-space-2);
}
body.vp .select2-dropdown {
  border: 1px solid var(--vp-border) !important;
  border-radius: var(--vp-radius-md) !important;
  background: var(--vp-surface) !important;
  box-shadow: var(--vp-shadow-lg);
  overflow: hidden;
}
body.vp .select2-container--default .select2-results__option {
  padding: var(--vp-space-4) var(--vp-space-5);
  color: var(--vp-text);
  font-size: var(--vp-text-base);
}
body.vp .select2-container--default .select2-results__option--highlighted[aria-selected],
body.vp .select2-container--default .select2-results__option--highlighted {
  background: var(--vp-primary) !important;
  color: var(--vp-primary-contrast) !important;
}
body.vp .select2-container--default .select2-results__option[aria-selected="true"] {
  background: var(--vp-primary-soft) !important;
  color: var(--vp-primary) !important;
}
body.vp .select2-search--dropdown .select2-search__field {
  padding: var(--vp-space-3) var(--vp-space-4);
  border: 1px solid var(--vp-border) !important;
  border-radius: var(--vp-radius-sm);
  background: var(--vp-surface);
  color: var(--vp-text);
}

/* ---- Toastr -------------------------------------------------------------- */
body.vp #toast-container > div,
#toast-container > div {
  border-radius: var(--vp-radius-md) !important;
  box-shadow: var(--vp-shadow-lg) !important;
  opacity: 1 !important;
  font-family: var(--vp-font-sans);
  font-size: var(--vp-text-base);
  padding: var(--vp-space-5) var(--vp-space-6) var(--vp-space-5) var(--vp-space-12);
}
#toast-container > .toast-success { background-color: var(--vp-success-600) !important; }
#toast-container > .toast-error   { background-color: var(--vp-danger-600) !important; }
#toast-container > .toast-warning { background-color: var(--vp-warning-600) !important; }
#toast-container > .toast-info    { background-color: var(--vp-info-600) !important; }
#toast-container .toast-title { font-weight: var(--vp-weight-700); }

/* ---- SweetAlert2 ---------------------------------------------------------
   The panel's confirm/alert dialogs. 29 screens call Swal.fire(); every one of
   them lands here, so this is the dialog design for the whole panel.

   VERSION NOTE — the bundled library is v9, which names the body element
   `.swal2-content`. v10 renamed it `.swal2-html-container`. Both are listed on
   every rule that touches it: today the v9 half does the work, and the day the
   library is bumped the skin keeps working instead of silently dropping to
   unstyled body text (which is exactly how the previous version of this block
   was broken — it targeted only the v10 name).

   Shape follows the panel's card language: surface + hairline + big soft
   shadow, a tinted icon chip rather than SweetAlert's stock outlined circle,
   and the primary action last in reading order.
   -------------------------------------------------------------------------- */

/* Backdrop. The blur is what makes it read as a layer over the panel rather
   than a box dropped on top of it. */
body.vp .swal2-container,
.swal2-container {
  /* 1200, not --vp-z-modal (500). The token scale tops out at 600, but the
     legacy Bootstrap/select2 layer this panel sits on top of runs an order of
     magnitude higher: a Bootstrap modal is 1055, a select2 list 1090, the
     attribute dialog 1100. At 500 the delete confirms — on the pricing options,
     the offer items, the loyalty rows — rendered UNDERNEATH whatever was open
     and were unreadable.

     A confirm blocks interaction until it is answered, so it belongs above
     everything that can be open behind it. toastr is unaffected; it ships at
     999999 of its own accord. */
  z-index: 1200;
  padding: var(--vp-space-6);
  background: transparent;
}
body.vp .swal2-container.swal2-backdrop-show,
.swal2-container.swal2-backdrop-show {
  background: var(--vp-overlay);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
}

/* The card. */
body.vp .swal2-popup,
.swal2-popup {
  inline-size: 30rem;
  max-inline-size: calc(100vw - var(--vp-space-8));
  padding: var(--vp-space-8) var(--vp-space-8) var(--vp-space-6);
  border: 1px solid var(--vp-border) !important;
  border-radius: var(--vp-radius-xl) !important;
  background: var(--vp-surface) !important;
  color: var(--vp-text) !important;
  box-shadow: var(--vp-shadow-xl) !important;
  font-family: var(--vp-font-sans) !important;
  text-align: start;
}

body.vp .swal2-header,
.swal2-header {
  align-items: flex-start;
  padding: 0;
}

/* Title + body text. Left-aligned under the icon chip reads as a sentence the
   operator is being asked to finish, not as a system alert. */
body.vp .swal2-title,
.swal2-title {
  margin: 0;
  padding: 0;
  color: var(--vp-text) !important;
  font-size: var(--vp-text-xl) !important;
  font-weight: var(--vp-weight-800) !important;
  letter-spacing: var(--vp-tracking-tight);
  line-height: var(--vp-leading-snug);
  text-align: start;
  /* Titles carry vendor-authored names; keep mixed EN/AR from reordering. */
  unicode-bidi: plaintext;
}

body.vp .swal2-content,
body.vp .swal2-html-container,
.swal2-content,
.swal2-html-container {
  margin: var(--vp-space-2) 0 0;
  padding: 0;
  color: var(--vp-text-muted) !important;
  font-size: var(--vp-text-base) !important;
  line-height: var(--vp-leading-relaxed);
  text-align: start;
  unicode-bidi: plaintext;
}

/* ---- icon chip ----------------------------------------------------------
   SweetAlert draws a 5em outlined circle. Swapped for a rounded-square chip on
   a soft tint, sized and coloured like the status pills elsewhere in the panel.
   The glyph geometry inside (x-mark lines, success rings) is the library's, so
   only colour and the frame are restated here.

   The library draws its glyphs in em for a 5em box, so the font size must be
   the chip size divided by 5 (48 / 5 = 9.6px). At 12px the box was drawn for
   60px inside a 48px chip: the success tick's two strokes crossed instead of
   meeting and the ring stuck out of the chip (QA report, 16 October 2026). */
body.vp .swal2-icon,
.swal2-icon {
  inline-size: 48px;
  block-size: 48px;
  margin: 0 0 var(--vp-space-5);
  border: 0 !important;
  border-radius: var(--vp-radius-md);
  font-size: 9.6px; /* 48px / 5em: the glyph internals are sized in em off this */
}
body.vp .swal2-icon .swal2-icon-content,
.swal2-icon .swal2-icon-content {
  font-size: 2.625em; /* 25.2px, the size the ! and i glyphs had before */
  font-weight: var(--vp-weight-800);
  line-height: 1;
}

/* Semantic tokens, not the -600 ramp step: --vp-warning and friends resolve
   one stop lighter in dark mode (600 -> 500) so they stay legible on a tinted
   chip. These are the same tokens .vp-badge-* and .vp-rec-pill--warn use, so a
   dialog icon and a table status pill are the same colour for the same state. */
body.vp .swal2-icon.swal2-warning,
.swal2-icon.swal2-warning { background: var(--vp-warning-soft); color: var(--vp-warning) !important; }
body.vp .swal2-icon.swal2-error,
.swal2-icon.swal2-error   { background: var(--vp-danger-soft);  color: var(--vp-danger) !important; }
body.vp .swal2-icon.swal2-success,
.swal2-icon.swal2-success { background: var(--vp-success-soft); color: var(--vp-success) !important; }
body.vp .swal2-icon.swal2-info,
.swal2-icon.swal2-info    { background: var(--vp-info-soft);    color: var(--vp-info) !important; }
body.vp .swal2-icon.swal2-question,
.swal2-icon.swal2-question{ background: var(--vp-primary-soft); color: var(--vp-primary) !important; }

/* Glyph strokes inherit nothing in the library — they carry hard-coded colours. */
.swal2-icon.swal2-error [class^="swal2-x-mark-line"] { background-color: var(--vp-danger) !important; }
.swal2-icon.swal2-success [class^="swal2-success-line"] { background-color: var(--vp-success) !important; }
/* The tinted chip is the frame, so the library's round ring is not drawn. */
.swal2-icon.swal2-success .swal2-success-ring { border-color: transparent !important; }
/* The two arcs the library uses to mask the ring animation must match the chip,
   not the white card, or they punch light holes in the tint. */
.swal2-icon.swal2-success [class^="swal2-success-circular-line"],
.swal2-icon.swal2-success .swal2-success-fix { background-color: transparent !important; }

/* ---- actions ------------------------------------------------------------
   DOM order is [confirm, cancel]. row-reverse puts the primary last in reading
   order and packs the pair at the inline end — and because both are logical,
   that stays true when the panel flips to Arabic. */
body.vp .swal2-actions,
.swal2-actions {
  flex-direction: row-reverse;
  justify-content: flex-start;
  gap: var(--vp-space-3);
  inline-size: 100%;
  margin: var(--vp-space-7) 0 0;
  padding: var(--vp-space-5) 0 0;
  border-block-start: 1px solid var(--vp-divider);
}

body.vp .swal2-styled,
.swal2-styled {
  margin: 0 !important;
  padding: 0 var(--vp-space-5) !important;
  block-size: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent !important;
  border-radius: var(--vp-radius-md) !important;
  font-family: var(--vp-font-sans) !important;
  font-size: var(--vp-text-sm) !important;
  font-weight: var(--vp-weight-600) !important;
  line-height: 1;
  transition: transform var(--vp-dur-fast) var(--vp-ease),
              background-color var(--vp-dur-fast) var(--vp-ease),
              box-shadow var(--vp-dur-fast) var(--vp-ease);
}
body.vp .swal2-styled:hover,
.swal2-styled:hover { transform: translateY(var(--vp-lift)); }
body.vp .swal2-styled:active,
.swal2-styled:active { transform: translateY(var(--vp-press)); }

body.vp .swal2-styled.swal2-confirm,
.swal2-styled.swal2-confirm {
  background: var(--vp-primary) !important;
  color: var(--vp-primary-contrast) !important;
  box-shadow: var(--vp-shadow-primary) !important;
}
body.vp .swal2-styled.swal2-confirm:hover,
.swal2-styled.swal2-confirm:hover { background: var(--vp-primary-hover) !important; }

body.vp .swal2-styled.swal2-cancel,
.swal2-styled.swal2-cancel {
  background: var(--vp-surface) !important;
  color: var(--vp-text) !important;
  border-color: var(--vp-border) !important;
}
body.vp .swal2-styled.swal2-cancel:hover,
.swal2-styled.swal2-cancel:hover { background: var(--vp-surface-hover) !important; }

/* A destructive confirm should not be the same colour as "Save". Opt in with
   customClass: { confirmButton: 'vp-swal-danger' }. */
body.vp .swal2-styled.swal2-confirm.vp-swal-danger,
.swal2-styled.swal2-confirm.vp-swal-danger {
  background: var(--vp-danger) !important;
  color: var(--vp-danger-contrast) !important;
  box-shadow: none !important;
}

body.vp .swal2-styled:focus,
.swal2-styled:focus { outline: none; box-shadow: 0 0 0 3px var(--vp-focus-ring) !important; }

body.vp .swal2-close,
.swal2-close {
  color: var(--vp-text-subtle) !important;
  font-size: 28px;
  inline-size: 32px;
  block-size: 32px;
  border-radius: var(--vp-radius-sm);
  transition: background-color var(--vp-dur-fast) var(--vp-ease);
}
body.vp .swal2-close:hover,
.swal2-close:hover { background: var(--vp-surface-hover) !important; color: var(--vp-text) !important; }

/* Inputs + validation, for the Swal.fire({ input }) forms. */
body.vp .swal2-input,
body.vp .swal2-textarea,
body.vp .swal2-select,
.swal2-input, .swal2-textarea, .swal2-select {
  margin: var(--vp-space-4) 0 0;
  padding: 0 var(--vp-space-4);
  border: 1px solid var(--vp-border) !important;
  border-radius: var(--vp-radius-md) !important;
  background: var(--vp-surface) !important;
  color: var(--vp-text) !important;
  font-family: var(--vp-font-sans);
  font-size: var(--vp-text-base) !important;
  box-shadow: none !important;
}
body.vp .swal2-validation-message,
.swal2-validation-message {
  background: var(--vp-danger-soft) !important;
  color: var(--vp-danger-text) !important;
  border-radius: var(--vp-radius-sm);
  font-size: var(--vp-text-sm);
}

/* ---- motion -------------------------------------------------------------
   The library's stock entrance is a bounce. Replaced with the same calm rise
   the drawers and cards use, so dialogs feel like part of the panel. */
@keyframes vp-swal-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes vp-swal-out {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(6px) scale(.985); }
}
body.vp .swal2-popup.swal2-show,
.swal2-popup.swal2-show { animation: vp-swal-in var(--vp-dur-base) var(--vp-ease-out) both; }
body.vp .swal2-popup.swal2-hide,
.swal2-popup.swal2-hide { animation: vp-swal-out var(--vp-dur-fast) var(--vp-ease-in) both; }

@media (prefers-reduced-motion: reduce) {
  .swal2-popup.swal2-show,
  .swal2-popup.swal2-hide { animation: none !important; }
  .swal2-icon,
  .swal2-icon [class^="swal2-success-line"],
  .swal2-icon .swal2-success-ring,
  .swal2-icon [class^="swal2-x-mark-line"] { animation: none !important; }
  .swal2-styled:hover,
  .swal2-styled:active { transform: none; }
}

/* Phones: the dialog becomes a bottom sheet, matching the panel's mobile
   drawers, and the two actions go full width so neither is a thumb-stretch. */
@media (max-width: 575.98px) {
  body.vp .swal2-container,
  .swal2-container { padding: 0; align-items: flex-end; }

  body.vp .swal2-popup,
  .swal2-popup {
    inline-size: 100%;
    max-inline-size: 100%;
    /* The library centres the popup with `margin:auto` off a 17-class selector,
       and in a flex container an auto margin absorbs the free space and beats
       align-items — so the sheet floated mid-screen until this zeroed it. */
    margin: 0 !important;
    padding: var(--vp-space-6) var(--vp-space-5)
             max(var(--vp-space-5), env(safe-area-inset-bottom));
    border-start-start-radius: var(--vp-radius-2xl) !important;
    border-start-end-radius: var(--vp-radius-2xl) !important;
    border-end-start-radius: 0 !important;
    border-end-end-radius: 0 !important;
    border-block-end: 0 !important;
  }
  body.vp .swal2-actions,
  .swal2-actions { flex-direction: column-reverse; }
  body.vp .swal2-styled,
  .swal2-styled { inline-size: 100%; block-size: 44px; }

  @keyframes vp-swal-in {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: none; }
  }
}

/* ==========================================================================
   16. STYLEGUIDE-ONLY HELPERS
   ========================================================================== */

body.vp .vp-swatch {
  border-radius: var(--vp-radius-sm);
  border: 1px solid var(--vp-border);
  overflow: hidden;
  font-size: var(--vp-text-xs);
}
body.vp .vp-swatch__chip { block-size: 56px; }
body.vp .vp-swatch__meta {
  padding: var(--vp-space-3) var(--vp-space-4);
  background: var(--vp-surface);
  border-block-start: 1px solid var(--vp-border);
}
body.vp .vp-swatch__name { font-weight: var(--vp-weight-700); }
body.vp .vp-swatch__hex { color: var(--vp-text-muted); font-family: var(--vp-font-mono); }

body.vp .vp-sg-bar {
  position: sticky;
  top: var(--vp-topbar-h);
  z-index: var(--vp-z-sticky);
  display: flex;
  align-items: center;
  gap: var(--vp-space-5);
  flex-wrap: wrap;
  padding: var(--vp-space-5) var(--vp-space-7);
  margin-block-end: var(--vp-space-10);
  background: var(--vp-surface);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-md);
  box-shadow: var(--vp-shadow-sm);
}

body.vp .vp-sg-section { margin-block-end: var(--vp-space-14); scroll-margin-top: 120px; }

body.vp .vp-sg-demo {
  padding: var(--vp-space-7);
  border: 1px dashed var(--vp-border-strong);
  border-radius: var(--vp-radius-md);
  background: var(--vp-surface);
}

body.vp .vp-sg-scale-row {
  display: flex;
  align-items: center;
  gap: var(--vp-space-5);
  margin-block-end: var(--vp-space-3);
  font-size: var(--vp-text-sm);
}
body.vp .vp-sg-scale-row code { min-inline-size: 150px; }
body.vp .vp-sg-scale-bar { block-size: 16px; background: var(--vp-primary); border-radius: var(--vp-radius-xs); }
body.vp .vp-sg-shadow-box {
  inline-size: 110px;
  block-size: 76px;
  border-radius: var(--vp-radius-md);
  background: var(--vp-surface);
  border: 1px solid var(--vp-border);
  display: grid;
  place-items: center;
  font-size: var(--vp-text-xs);
  color: var(--vp-text-muted);
}

/* ==========================================================================
   INTERACTION & MOTION LAYER
   --------------------------------------------------------------------------
   Appended after the base component definitions so these rules win without
   needing !important. Four concerns, in order:
     1. Buttons      — depth, press feedback, loading state
     2. Icons        — one stroke language + tinted action chips
     3. Tables       — DataTables reskin, sticky head, row entrance
     4. Motion       — view transitions, staggering, reduced-motion cutout
   ========================================================================== */

/* --- 1. BUTTONS ----------------------------------------------------------- */

.vp-btn,
.btn {
  position: relative;
  isolation: isolate;             /* keeps the ::after sheen under the label */
  overflow: hidden;
  transition:
    transform   var(--vp-dur-fast) var(--vp-ease),
    box-shadow  var(--vp-dur-base) var(--vp-ease),
    background  var(--vp-dur-base) var(--vp-ease),
    border-color var(--vp-dur-base) var(--vp-ease);
  will-change: transform;
}

/* A light sheen that sweeps across on hover. Purely ::after, so it costs no
   markup and cannot disturb the button's own layout. */
.vp-btn::after,
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.22) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform var(--vp-dur-slower) var(--vp-ease-out);
}
.vp-btn:hover::after,
.btn:hover::after { transform: translateX(120%); }

.vp-btn:hover,
.btn:hover  { transform: var(--vp-lift); }
.vp-btn:active,
.btn:active { transform: var(--vp-press); transition-duration: 60ms; }

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

/* The primary button carries the brand gradient rather than a flat fill, so it
   reads as the same object as the gradient stat card. */
.vp-btn--primary,
.btn-primary {
  background: var(--vp-gradient-primary, linear-gradient(135deg, #4A2EB4 0%, #6C4CF1 55%, #8B5CF6 100%));
  border: none;
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 4px 12px -2px rgba(108, 76, 241, .35);
}
.vp-btn--primary:hover,
.btn-primary:hover { box-shadow: 0 2px 4px rgba(16,24,40,.10), 0 10px 22px -4px rgba(108,76,241,.48); }

/* Inline busy state: add .is-loading, no markup change, label stays for a11y. */
.vp-btn.is-loading,
.btn.is-loading { color: transparent !important; pointer-events: none; }
.vp-btn.is-loading::before,
.btn.is-loading::before {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 1em; block-size: 1em;
  margin-block-start: -.5em; margin-inline-start: -.5em;
  border: 2px solid currentColor;
  border-block-start-color: transparent;
  border-radius: 50%;
  color: #fff;
  animation: vp-spin .6s linear infinite;
}

/* --- 2. ICONS ------------------------------------------------------------- */

/* 38 screens render <i data-feather="…">, which feather.replace() swaps for an
   <svg>. Normalising stroke and size here re-skins every one of them without
   touching a single screen. */
.vp svg.feather,
.vp .vp-icon {
  inline-size: 18px;
  block-size: 18px;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  transition: transform var(--vp-dur-base) var(--vp-ease-spring),
              color     var(--vp-dur-fast) var(--vp-ease);
}

/* Table/toolbar action icons become tinted circular chips — the single biggest
   visual change to the list screens, and again markup-free. */
.vp .vp-table td a[class*="edit"],
.vp .vp-table td a[class*="delete"],
.vp .vp-table td a[class*="view"],
.vp table.dataTable td a[class*="edit"],
.vp table.dataTable td a[class*="delete"],
.vp table.dataTable td a[class*="view"],
.vp .vp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 34px;
  block-size: 34px;
  border-radius: var(--vp-radius-full, 999px);
  background: var(--vp-surface-sunken);
  color: var(--vp-text-muted);
  margin-inline-end: 6px;
  transition: background var(--vp-dur-fast) var(--vp-ease),
              color      var(--vp-dur-fast) var(--vp-ease),
              transform  var(--vp-dur-base) var(--vp-ease-spring);
}
.vp .vp-icon-btn:hover,
.vp .vp-table td a[class*="edit"]:hover,
.vp table.dataTable td a[class*="edit"]:hover {
  background: var(--vp-primary-soft-strong);
  color: var(--vp-primary);
  transform: translateY(-2px) scale(1.06);
}
.vp .vp-table td a[class*="delete"]:hover,
.vp table.dataTable td a[class*="delete"]:hover {
  background: var(--vp-danger-soft);
  color: var(--vp-danger, #EF4444);
  transform: translateY(-2px) scale(1.06);
}

/* --- 3. TABLES ------------------------------------------------------------ */

.vp .dataTables_wrapper { --vp-table-radius: var(--vp-radius-lg, 16px); }

.vp table.dataTable:not(.of-table) {
  inline-size: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
}

.vp table.dataTable:not(.of-table) thead th {
  position: sticky;               /* header survives a long scroll */
  inset-block-start: 0;
  z-index: 2;
  background: var(--vp-surface-2);
  color: var(--vp-text-muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  border-block-end: 1px solid var(--vp-border);
  padding-block: 14px;
}

.vp table.dataTable:not(.of-table) tbody td {
  border-block-end: 1px solid var(--vp-border);
  padding-block: 14px;
  vertical-align: middle;
}

.vp table.dataTable:not(.of-table) tbody tr {
  transition: background var(--vp-dur-fast) var(--vp-ease),
              box-shadow var(--vp-dur-base) var(--vp-ease);
}
.vp table.dataTable:not(.of-table) tbody tr:hover {
  background: var(--vp-primary-soft);
  box-shadow: inset 3px 0 0 0 var(--vp-primary);
}
.vp table.dataTable:not(.of-table) tbody tr:last-child td { border-block-end: none; }

/* Rows fade up on load, staggered. --vp-row-i is set per row by the shell JS;
   the fallback 0 keeps it valid if the script never runs. */
.vp table.dataTable:not(.of-table) tbody tr {
  animation: vp-row-in var(--vp-dur-slow) var(--vp-ease-out) backwards;
  animation-delay: calc(var(--vp-row-i, 0) * var(--vp-stagger));
}
@keyframes vp-row-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* DataTables chrome: search box, length select, pagination. */
.vp .dataTables_filter input,
.vp .dataTables_length select {
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-md, 10px);
  background: var(--vp-surface);
  color: var(--vp-text);
  padding: 8px 12px;
  transition: border-color var(--vp-dur-fast) var(--vp-ease),
              box-shadow  var(--vp-dur-fast) var(--vp-ease);
}
.vp .dataTables_filter input:focus,
.vp .dataTables_length select:focus {
  outline: none;
  border-color: var(--vp-primary);
  box-shadow: var(--vp-focus-ring);
}

.vp .dataTables_paginate .paginate_button {
  border: 1px solid transparent !important;
  border-radius: var(--vp-radius-md, 10px) !important;
  padding: 6px 12px !important;
  margin-inline: 2px;
  color: var(--vp-text-muted) !important;
  background: transparent !important;
  transition: all var(--vp-dur-fast) var(--vp-ease);
}
.vp .dataTables_paginate .paginate_button:hover {
  background: var(--vp-surface-sunken) !important;
  color: var(--vp-text) !important;
  transform: translateY(-1px);
}
.vp .dataTables_paginate .paginate_button.current {
  background: var(--vp-gradient-primary, var(--vp-primary)) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 10px -2px rgba(108,76,241,.45);
}
.vp .dataTables_paginate .paginate_button.disabled { opacity: .45; pointer-events: none; }

/* --- 4. MOTION ------------------------------------------------------------ */

/* View transition driven by the SPA navigation layer: the outgoing view fades
   down, the incoming view fades up. Both are opacity+transform only, so they
   stay on the compositor and never trigger layout. */
.vp-view { animation: vp-view-in var(--vp-dur-slow) var(--vp-ease-out); }
.vp-view.is-leaving { animation: vp-view-out var(--vp-dur-fast) var(--vp-ease-in) forwards; }

@keyframes vp-view-in  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes vp-view-out { to   { opacity: 0; transform: translateY(-6px); } }

/* Top progress bar shown during an SPA fetch. */
.vp-progress {
  position: fixed;
  inset-block-start: 0; inset-inline: 0;
  block-size: 3px;
  z-index: 9999;
  background: var(--vp-gradient-primary, var(--vp-primary));
  transform-origin: 0 50%;
  transform: scaleX(0);
  opacity: 0;
  transition: transform var(--vp-dur-slow) var(--vp-ease-out), opacity var(--vp-dur-fast) var(--vp-ease);
}
.vp-progress.is-active { opacity: 1; }
.vp-progress.is-done   { transform: scaleX(1); opacity: 0; }

/* Cards lift on hover; staggered entrance on first paint. */
.vp .vp-card,
.vp .card {
  transition: transform var(--vp-dur-base) var(--vp-ease),
              box-shadow var(--vp-dur-base) var(--vp-ease);
}
.vp .vp-card:hover,
.vp .card:hover { transform: var(--vp-lift); box-shadow: var(--vp-shadow-lg, 0 12px 28px -8px rgba(16,24,40,.18)); }

.vp-stagger > * {
  animation: vp-view-in var(--vp-dur-slow) var(--vp-ease-out) backwards;
  animation-delay: calc(var(--vp-row-i, 0) * var(--vp-stagger));
}

/* Sidebar nav items: the active bar grows rather than snapping in. */

/* Toasts / modals enter with the spring, leave without it. */
.vp .modal.show .modal-dialog { animation: vp-pop-in var(--vp-dur-slow) var(--vp-ease-spring); }
@keyframes vp-pop-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }

/* The cutout. Anything above that still animates is silenced here, including
   third-party keyframes from DataTables, Toastr and SweetAlert2. */
@media (prefers-reduced-motion: reduce) {
  .vp *,
  .vp *::before,
  .vp *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   LAYOUT FIXES FOR THE PORTED SCREENS
   --------------------------------------------------------------------------
   Found by walking the 41 screens after the reskin. All markup-free.
   ========================================================================== */

/* --- A. Wide tables must scroll inside their own box, never the page -------
   The list screens carry 8-11 columns. DataTables sizes the <table> from its
   content, so without a scroll container the whole shell was pushed sideways:
   the Action column and the page heading were both clipped off-screen.

   min-inline-size:0 is the load-bearing declaration. .vp-main is a flex/grid
   child, and a flex child's automatic minimum size is its CONTENT size, not 0 —
   so a wide table silently widens the whole column instead of overflowing. */
.vp .vp-main,
.vp .vp-page,
.vp .vp-container { min-inline-size: 0; }

.vp .vp-main { overflow-x: hidden; }

.vp .dataTables_wrapper,
.vp .table-responsive {
  inline-size: 100%;
  max-inline-size: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

/* A hairline that only appears while there is more table to the right. */
.vp .dataTables_wrapper {
  background:
    linear-gradient(to right, var(--vp-surface) 30%, rgba(255,255,255,0)),
    linear-gradient(to right, rgba(255,255,255,0), var(--vp-surface) 70%) 100% 0,
    linear-gradient(to right, rgba(16,24,40,.10), rgba(255,255,255,0)),
    linear-gradient(to left,  rgba(16,24,40,.10), rgba(255,255,255,0)) 100% 0;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}

.vp table.dataTable:not(.of-table) { inline-size: 100% !important; }
.vp table.dataTable:not(.of-table) td,
.vp table.dataTable:not(.of-table) th { white-space: nowrap; }
/* …except the prose columns, which should wrap rather than stretch the table. */
.vp table.dataTable:not(.of-table) td:nth-child(3),
.vp table.dataTable:not(.of-table) td:nth-child(4) {
  white-space: normal;
  min-inline-size: 180px;
}

/* --- B. Screen toolbars ---------------------------------------------------
   The filter rows put Search / Reset / Export side by side with no gap, so at
   this width the labels overlapped and "Export" was cut in half. */
.vp .vp-container .row > [class*="col-"] { min-inline-size: 0; }

.vp .card-body > .row,
.vp .vp-container form > .row { row-gap: var(--vp-space-4, 16px); }

.vp .card-body .btn + .btn,
.vp .card-body .btn + a.btn,
.vp .card-body a.btn + .btn { margin-inline-start: 8px; }

/* Give the button cluster room and stop it colliding with the field above. */
.vp .card-body .row .btn { white-space: nowrap; }

/* --- C. Dashboard stat tiles ----------------------------------------------
   The tiles inherited Tivo markup: the icon sat inline immediately after the
   label (so "Coupons" ran into its own icon), and an empty .progress element
   rendered as a stray grey bar under every number. */
.vp .vp-container .card h5,
.vp .vp-container .card .card-header h5 { display: flex; align-items: center; gap: 8px; }

.vp .vp-container .card svg.feather,
.vp .vp-container .card i[class*="icon-"] { flex: 0 0 auto; }

/* The empty progress rails carry no value — they were never wired to data. */
.vp .vp-container .card .progress:empty,
.vp .vp-container .card .progress .progress-bar:empty[style*="width: 0"] { display: none; }
.vp .vp-container .card .progress { block-size: 6px; border-radius: 999px; background: var(--vp-surface-sunken); }

/* --- D. Select2 ------------------------------------------------------------
   Select2 renders its own container; without these it collapsed to an empty
   rounded box that looked like a broken input. */
.vp .select2-container { inline-size: 100% !important; }
.vp .select2-container--default .select2-selection--single,
.vp .select2-container--default .select2-selection--multiple {
  min-block-size: 44px;
  padding: 6px 10px;
  border: 1px solid var(--vp-border) !important;
  border-radius: var(--vp-radius-md, 10px) !important;
  background: var(--vp-surface) !important;
  display: flex;
  align-items: center;
}
.vp .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--vp-text); line-height: 1.4; padding: 0;
}
.vp .select2-container--default .select2-selection--single .select2-selection__arrow { block-size: 42px; }
.vp .select2-container--default.select2-container--focus .select2-selection--multiple,
.vp .select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--vp-primary) !important;
  box-shadow: var(--vp-focus-ring);
}
.vp .select2-dropdown {
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-md, 10px);
  overflow: hidden;
  box-shadow: var(--vp-shadow-lg, 0 12px 28px -8px rgba(16,24,40,.18));
}
.vp .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--vp-primary); color: #fff;
}

/* --- E. Missing images -----------------------------------------------------
   Seeded rows have no upload, so the browser rendered raw alt text. Give the
   broken image a neutral tile instead of stray words in a data cell. */
.vp table.dataTable:not(.of-table) td img {
  inline-size: 44px;
  block-size: 44px;
  object-fit: cover;
  border-radius: var(--vp-radius-md, 10px);
  background: var(--vp-surface-sunken);
  color: transparent;              /* hides alt text on a broken src */
  font-size: 0;
}

/* --- F. Bootstrap gutter escaping a clipped card ---------------------------
   Several screens put a bare `.row` directly inside a `.card`, with no
   `.card-body` between them. Bootstrap gives `.row` a -12px inline margin to
   cancel its children's gutters — but the card has `overflow:hidden` (it needs
   it for the rounded corners), so those 12px are clipped, not shown. The
   visible symptom was headings losing their first character: "Coupon List"
   rendered as "oupon List".

   Cancel the gutter for rows that are a DIRECT child of a card, and restore
   the horizontal breathing room on the columns instead. Rows nested inside a
   .card-body are untouched — there the padding absorbs the gutter correctly. */
.vp .card > .row {
  margin-inline: 0;
}
.vp .card > .row > [class*="col-"] {
  padding-inline: var(--vp-space-5, 20px);
}
.vp .card > .row:first-child > [class*="col-"] {
  padding-block-start: var(--vp-space-5, 20px);
}
.vp .card > .row:last-child > [class*="col-"] {
  padding-block-end: var(--vp-space-5, 20px);
}

/* Same class of bug one level up: a `.container-fluid` inside the view already
   has padding, so its own `.row` gutter pushes content under the card edge. */
.vp #vp-view > .container-fluid { padding-inline: 0; }

/* --- G. Dashboard stat tiles ----------------------------------------------
   Real markup (from the Tivo original, unchanged):

     <a class="card o-hidden product-widget">
       <div class="card-header pb-0"><div class="d-flex">
         <div class="flex-grow-1">
           <p class="square-after …">Coupons<i class="fa fa-circle"></i></p>
           <h4>3</h4>
         </div>
         <div class="d-flex static-widget"><svg class="feather feather-gift" …></div>
       </div></div>
       <div class="card-body pt-0"><div class="progress-widget">…</div></div>
     </a>

   Two artefacts of dropping Tivo's style.css:
     * `.square-after > i.fa-circle` was a positioned decorative square. Left
       unstyled it rendered as a literal bullet welded to the label — "Coupons●".
     * `.static-widget svg` is authored at 45px, but the icon normalisation
       earlier in this file forces every .feather to 18px, so it shrank.
   And the `.progress-widget` rail was never bound to data — it is always 0%. */

.vp .product-widget {
  display: block;
  text-decoration: none;
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-lg, 16px);
  background: var(--vp-surface);
  transition: transform var(--vp-dur-base) var(--vp-ease),
              box-shadow var(--vp-dur-base) var(--vp-ease),
              border-color var(--vp-dur-base) var(--vp-ease);
}
.vp .product-widget:hover {
  transform: var(--vp-lift);
  border-color: var(--vp-primary-200);
  box-shadow: 0 10px 24px -10px rgba(108, 76, 241, .35);
}

.vp .product-widget .card-header { border: none; padding: var(--vp-space-5, 20px); }
.vp .product-widget .card-body   { padding: 0 var(--vp-space-5, 20px) var(--vp-space-5, 20px); }

/* Label: muted, uppercase, tracked — the metric name, not a heading. */
.vp .product-widget p.square-after {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--vp-text-muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Turn the stray bullet into a deliberate status dot, and give it its colour
   from the sibling `header-text-*` class the screen already sets. */
.vp .product-widget p.square-after > i.fa-circle {
  order: -1;                       /* dot leads the label instead of trailing it */
  font-size: 8px;
  line-height: 1;
  color: var(--vp-primary);
}
.vp .product-widget .header-text-success > i.fa-circle { color: var(--vp-success, #22C55E); }
.vp .product-widget .header-text-warning > i.fa-circle { color: var(--vp-warning, #F59E0B); }
.vp .product-widget .header-text-danger  > i.fa-circle { color: var(--vp-danger,  #EF4444); }
.vp .product-widget .header-text-primary > i.fa-circle { color: var(--vp-primary); }

/* The number is the point of the tile. */
.vp .product-widget h4 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--vp-text);
  font-variant-numeric: tabular-nums;
}

/* The header row must span the tile.
   `.card-header` resolves to display:flex here (no rule in the CSSOM claims it,
   same as the modal-container case documented elsewhere in this file), which
   makes the inner `.d-flex` a FLEX ITEM — so it sized to its content, 114px
   inside a 377px tile. `flex-grow-1` on the text then had nothing to push
   against and the icon landed mid-tile instead of at the edge.

   Declared on the row rather than resetting `.card-header` to block, because
   other cards in the panel may rely on that header being flex. */
.vp .product-widget .card-header > .d-flex {
  flex: 1 1 auto;
  min-inline-size: 0;
  inline-size: 100%;
  align-items: flex-start;
}

/* Icon returns to a real size, in a tinted rounded tile.
   It sits at the row's END — the right edge in English, and correctly mirrored
   to the left edge in Arabic, because `margin-inline-start` is logical. */
.vp .product-widget .static-widget {
  margin-inline-start: auto;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  inline-size: 48px;
  block-size: 48px;
  border-radius: var(--vp-radius-md, 12px);
  background: var(--vp-primary-soft);
  color: var(--vp-primary);
  transition: transform var(--vp-dur-base) var(--vp-ease-spring),
              background var(--vp-dur-base) var(--vp-ease);
}
.vp .product-widget:hover .static-widget { transform: scale(1.08) rotate(-4deg); background: var(--vp-primary-soft-strong); }

.vp .product-widget .static-widget svg.feather {
  inline-size: 22px !important;
  block-size: 22px !important;
  stroke-width: 2;
}
/* The theme paints these with semantic classes; keep them, drop Tivo's fill. */
.vp .product-widget .static-widget svg.success { color: var(--vp-success, #22C55E); }
.vp .product-widget .static-widget svg.warning { color: var(--vp-warning, #F59E0B); }
.vp .product-widget .static-widget svg.danger  { color: var(--vp-danger,  #EF4444); }

/* The always-zero rail is noise, not information. */
.vp .product-widget .progress-widget { display: none; }

/* --- H. Table cell controls ------------------------------------------------
   Three widgets the screens emit that Bootstrap 5 alone does not style, because
   they came from Tivo (`.switch`) or from Bootstrap 4 (`.badge-danger`). */

/* H1. Status toggle.
   Markup: <label class="switch"><input type=checkbox><span class="switch-state bg-success"></span></label>
   Unstyled this rendered as a bare checkbox with an invisible span next to it. */
.vp .switch {
  position: relative;
  display: inline-block;
  inline-size: 44px;
  block-size: 24px;
  cursor: pointer;
  vertical-align: middle;
}
.vp .switch input {
  position: absolute;
  opacity: 0;
  inline-size: 100%;
  block-size: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.vp .switch .switch-state {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--vp-neutral-300, #D1D5DB) !important;
  transition: background var(--vp-dur-base) var(--vp-ease);
}
.vp .switch .switch-state::before {
  content: "";
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  inline-size: 18px;
  block-size: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .3);
  transition: transform var(--vp-dur-base) var(--vp-ease-spring);
}
.vp .switch input:checked + .switch-state { background: var(--vp-success, #22C55E) !important; }
/* Logical translation so the knob slides the correct way under RTL. */
.vp .switch input:checked + .switch-state::before { transform: translateX(20px); }
.vp[dir="rtl"] .switch input:checked + .switch-state::before,
[dir="rtl"] .vp .switch input:checked + .switch-state::before { transform: translateX(-20px); }
.vp .switch input:focus-visible + .switch-state { box-shadow: var(--vp-focus-ring); }

/* H2. Icon-only action buttons.
   `.btn.btn-primary.btn-lg` wrapping a lone <i> was rendering as a large solid
   block in the Action column. An icon-only control should read as a quiet chip
   and only assert itself on hover. */
.vp .vp-container .btn-group .btn-lg:has(> i:only-child),
.vp table .btn-group .btn:has(> i:only-child) {
  inline-size: 36px;
  block-size: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--vp-radius-md, 10px);
  background: var(--vp-primary-soft) !important;
  color: var(--vp-primary) !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  font-size: 14px;
}
.vp table .btn-group .btn:has(> i:only-child):hover {
  background: var(--vp-primary) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -4px rgba(108, 76, 241, .5) !important;
}
/* Fallback for engines without :has() — keeps the size sane, loses the tint. */
.vp table .btn-group .btn-lg { padding: 8px 12px; font-size: 14px; }
.vp table .btn-group { display: inline-flex; gap: 6px; }
.vp table .btn-group > .btn { border-radius: var(--vp-radius-md, 10px) !important; }

/* H3. Bootstrap 4 badge colour classes.
   BS5 renamed these to .text-bg-*, so `.badge-danger` carried no colour and the
   pills rendered as pale grey text on white. The screens still emit the old
   names, so map them here rather than editing 41 files. */
.vp .badge { font-weight: 600; font-size: .72rem; padding: .38em .7em; letter-spacing: .01em; }
.vp .badge-primary,   .vp .bg-primary   { background: var(--vp-primary) !important;            color: #fff !important; }
.vp .badge-secondary, .vp .bg-secondary { background: var(--vp-neutral-500, #6B7280) !important; color: #fff !important; }
.vp .badge-success,   .vp .badge.bg-success { background: var(--vp-success-soft) !important; color: var(--vp-success-text) !important; }
.vp .badge-warning,   .vp .badge.bg-warning { background: var(--vp-warning-soft) !important; color: var(--vp-warning-text) !important; }
.vp .badge-danger,    .vp .badge.bg-danger  { background: var(--vp-danger-soft) !important; color: var(--vp-danger-text) !important; }
.vp .badge-info,      .vp .badge.bg-info    { background: var(--vp-info-soft) !important; color: var(--vp-info-text) !important; }
.vp .badge-light { background: var(--vp-surface-sunken) !important; color: var(--vp-text) !important; }

/* --- I. List-page header ---------------------------------------------------
   Every list screen opens with the same block:

     <div class="card"><div class="row">
       <div class="col-md-6 p-0 d-flex"><h3>Coupon List</h3></div>
       <div class="col-md-6 p-0"><div class="form-group mb-0 me-0"></div>
         <a class="btn btn-primary" href="/vendor/add-coupon"><i data-feather="plus-square"></i>Add New</a>
       </div>
     </div></div>

   The right-hand column carries no alignment, so the button landed in the
   middle of the card rather than at its end, and the icon was welded to the
   label with no gap. Both fixed here rather than in 12 screens. */

.vp .card > .row:first-child {
  align-items: center;
  row-gap: 12px;
}

/* The heading half. */
.vp .card > .row:first-child > [class*="col-"]:first-child {
  display: flex;
  align-items: center;
}
.vp .card > .row:first-child h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--vp-text);
}

/* The action half — end-aligned, and logical so RTL mirrors correctly. */
.vp .card > .row:first-child > [class*="col-"]:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
/* The empty spacer div these headers all carry would otherwise take a flex slot. */
.vp .card > .row:first-child > [class*="col-"]:last-child > .form-group:empty { display: none; }

/* Icon + label spacing inside any button. */
.vp .btn > svg.feather,
.vp .btn > i[data-feather] { margin-inline-end: 7px; }
.vp .btn { display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 700px) {
  .vp .card > .row:first-child > [class*="col-"]:last-child { justify-content: flex-start; }
}

/* --- J. Overlay leftovers ---------------------------------------------------
   Create, edit and details used to open in a right-hand drawer over the list.
   They are ordinary pages now — see forms.css §6 for the column they render in
   — and everything that existed only to make a page work inside a box went
   with it. Two pieces outlived the drawer.

   1. THE SELECT2 STACKING FALLBACK.
   Select2 does not render its list next to the field: it appends a container
   to <body>, positions it absolutely, and its own stylesheet gives that
   z-index 1051. Bootstrap's .modal is 1055, so inside the panel's remaining
   dialogs — the location picker, the working-hours editor, the attribute
   lattice — a list opened, sized and positioned itself correctly and then
   painted UNDERNEATH the dialog. Every click landed on the dialog instead, and
   a `required` select could not be filled in at all.

   1090 clears Bootstrap's modal and stays under toasts (9999). */
body.vp > .select2-container--open,
body.vp > .select2-container--open .select2-dropdown {
  z-index: 1090;
}

/* 2. THE SPINNER, still used by the styleguide. */
.vp-spinner {
  inline-size: 28px; block-size: 28px;
  border: 3px solid var(--vp-primary-100);
  border-block-start-color: var(--vp-primary);
  border-radius: 50%;
  animation: vp-spin .7s linear infinite;
}

/* --- K. Topbar global search ----------------------------------------------
   The input was a decorative placeholder; it now drives
   Vendor\GlobalSearchController and renders a grouped result list. */

.vp-topbar__search { position: relative; }

.vp-search-results {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  /* Anchored to the input's start edge but allowed to grow past it — result
     titles are far longer than the search box, and truncating them to the
     input's width made the dropdown unreadable. */
  inset-inline-start: 0;
  inline-size: max(100%, 420px);
  max-inline-size: min(560px, calc(100vw - 32px));
  z-index: 1090;
  max-block-size: min(520px, 70vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--vp-surface);
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-lg, 14px);
  box-shadow: 0 18px 40px -12px rgba(16, 24, 40, .28);
  padding: 6px;
  animation: vp-view-in var(--vp-dur-base) var(--vp-ease-out);
}
.vp-search-results[hidden] { display: none; }

.vp-search-group + .vp-search-group { margin-block-start: 4px; border-block-start: 1px solid var(--vp-border); padding-block-start: 6px; }

.vp-search-group__label {
  padding: 6px 12px 4px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--vp-text-muted);
}

.vp-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--vp-radius-md, 10px);
  text-decoration: none;
  color: var(--vp-text);
  transition: background var(--vp-dur-fast) var(--vp-ease);
}
.vp-search-item:hover,
.vp-search-item.is-active { background: var(--vp-primary-soft); }

.vp-search-item__title {
  font-weight: 600;
  font-size: .9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-inline-size: 0;
  flex: 1 1 auto;
}
.vp-search-item__title mark {
  background: var(--vp-primary-soft-strong);
  color: var(--vp-primary-text);
  border-radius: 3px;
  padding: 0 1px;
}
.vp-search-item__meta { flex: 0 0 auto; font-size: .76rem; color: var(--vp-text-muted); }
.vp-search-item__status.is-on  { color: var(--vp-success, #22C55E); font-weight: 600; }
.vp-search-item__status.is-off { color: var(--vp-text-muted); }

.vp-search-empty { padding: 20px 14px; text-align: center; color: var(--vp-text-muted); font-size: .88rem; }

/* --- L. Roles & staff -------------------------------------------------------
   The permission matrix is the densest screen in the panel — 54 checkboxes in
   11 groups — so it leans on grouping, a live counter and a filter rather than
   on a wall of inputs. */

.vp-section-title { font-size: .95rem; font-weight: 800; letter-spacing: -.01em; margin-block-end: 16px; color: var(--vp-text); }
.vp-req  { color: var(--vp-danger, #EF4444); }
.vp-help { display: block; color: var(--vp-text-muted); font-size: .8rem; margin-block-start: 6px; }
.vp-hint {
  color: var(--vp-text-muted);
  font-size: .88rem;
  margin-block-end: 18px;
  padding-inline-start: 12px;
  border-inline-start: 3px solid var(--vp-primary-200);
}

/* Cell helpers used by the DataTables renderers. */
.vp-cell-title { display: block; font-weight: 600; color: var(--vp-text); }
.vp-cell-sub   { display: block; font-size: .78rem; color: var(--vp-text-muted); margin-block-start: 2px; }

.vp-person { display: flex; align-items: center; gap: 10px; }
.vp-avatar {
  flex: 0 0 auto;
  inline-size: 34px; block-size: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--vp-primary-soft-strong);
  color: var(--vp-primary-text);
  font-weight: 700; font-size: .85rem;
}

/* Permission-count meter in the roles table. */
.vp-meter { display: flex; align-items: center; gap: 10px; min-inline-size: 130px; }
.vp-meter__bar {
  flex: 1 1 auto;
  block-size: 6px;
  border-radius: 999px;
  background: var(--vp-surface-sunken);
  overflow: hidden;
}
.vp-meter__bar > span {
  display: block;
  block-size: 100%;
  border-radius: 999px;
  background: var(--vp-gradient-primary, var(--vp-primary));
  transition: width var(--vp-dur-slow) var(--vp-ease-out);
}
.vp-meter__label { flex: 0 0 auto; font-size: .78rem; color: var(--vp-text-muted); font-variant-numeric: tabular-nums; }

/* Live counter card beside the matrix. */
.vp-countcard {
  margin-block-start: 20px;
  padding: 16px;
  border-radius: var(--vp-radius-lg, 14px);
  background: var(--vp-primary-soft);
  border: 1px solid var(--vp-primary-soft-border);
}
.vp-countcard__num   { font-size: 1.8rem; font-weight: 800; color: var(--vp-primary-text); line-height: 1; font-variant-numeric: tabular-nums; }
.vp-countcard__of    { font-size: 1rem; font-weight: 600; opacity: .65; }
.vp-countcard__label { font-size: .78rem; color: var(--vp-text-muted); margin-block: 4px 10px; }
.vp-countcard__bar   { background: rgba(255,255,255,.7); }

/* Matrix toolbar. */
.vp-matrix-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-block-end: 18px;
}
.vp-matrix-tools { display: flex; align-items: center; gap: 8px; }
.vp-matrix-tools .form-control { inline-size: 220px; }

/* One module. */
.vp-permgroup {
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-lg, 14px);
  margin-block-end: 12px;
  overflow: hidden;
  transition: border-color var(--vp-dur-base) var(--vp-ease);
}
.vp-permgroup:hover { border-color: var(--vp-primary-200); }
.vp-permgroup[hidden] { display: none; }

.vp-permgroup__head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--vp-surface-2);
  border-block-end: 1px solid var(--vp-border);
}
.vp-permgroup__toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1 1 auto; margin: 0; }
.vp-permgroup__toggle input { inline-size: 17px; block-size: 17px; accent-color: var(--vp-primary); cursor: pointer; }
.vp-permgroup__name  { font-weight: 700; font-size: .9rem; color: var(--vp-text); }
.vp-permgroup__count { font-size: .78rem; color: var(--vp-text-muted); font-variant-numeric: tabular-nums; }
.vp-permgroup__chev {
  border: 0; background: transparent; cursor: pointer; color: var(--vp-text-muted);
  display: grid; place-items: center; inline-size: 28px; block-size: 28px; border-radius: 8px;
  transition: transform var(--vp-dur-base) var(--vp-ease), background var(--vp-dur-fast) var(--vp-ease);
}
.vp-permgroup__chev:hover { background: var(--vp-surface-sunken); }
.vp-permgroup__chev[aria-expanded="false"] { transform: rotate(-90deg); }
[dir="rtl"] .vp-permgroup__chev[aria-expanded="false"] { transform: rotate(90deg); }

.vp-permgroup__body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2px;
  padding: 8px;
  max-block-size: 1200px;
  overflow: hidden;
  transition: max-block-size var(--vp-dur-slow) var(--vp-ease), padding var(--vp-dur-base) var(--vp-ease);
}
.vp-permgroup.is-collapsed .vp-permgroup__body { max-block-size: 0; padding-block: 0; }

.vp-perm {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; margin: 0;
  border-radius: var(--vp-radius-md, 10px);
  cursor: pointer;
  transition: background var(--vp-dur-fast) var(--vp-ease);
}
.vp-perm:hover { background: var(--vp-primary-soft); }
.vp-perm[hidden] { display: none; }
.vp-perm input { margin-block-start: 2px; inline-size: 16px; block-size: 16px; accent-color: var(--vp-primary); cursor: pointer; flex: 0 0 auto; }
.vp-perm__text  { display: flex; flex-direction: column; gap: 2px; min-inline-size: 0; }
.vp-perm__label { font-size: .86rem; font-weight: 600; color: var(--vp-text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vp-perm__desc  { font-size: .76rem; color: var(--vp-text-muted); line-height: 1.4; }

.vp-chip {
  font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 5px;
  background: var(--vp-surface-sunken); color: var(--vp-text-muted);
}
.vp-chip--mobile { background: var(--vp-info-soft); color: var(--vp-info-text); }

.vp-nomatch { text-align: center; color: var(--vp-text-muted); padding: 24px; font-size: .88rem; }

/* Staff form: scope radios and branch list. */
.vp-radio {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; margin-block-end: 8px;
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-md, 10px);
  cursor: pointer;
  transition: border-color var(--vp-dur-fast) var(--vp-ease), background var(--vp-dur-fast) var(--vp-ease);
}
.vp-radio:hover { border-color: var(--vp-primary-200); background: var(--vp-primary-soft); }
.vp-radio input { margin-block-start: 3px; accent-color: var(--vp-primary); cursor: pointer; }
.vp-radio:has(input:checked) { border-color: var(--vp-primary); background: var(--vp-primary-soft); }
.vp-radio span   { display: flex; flex-direction: column; gap: 2px; }
.vp-radio strong { font-size: .88rem; color: var(--vp-text); }
.vp-radio small  { font-size: .76rem; color: var(--vp-text-muted); }

.vp-branchlist {
  margin-block-start: 6px;
  padding: 10px;
  border: 1px dashed var(--vp-border);
  border-radius: var(--vp-radius-md, 10px);
  display: grid; gap: 2px;
  animation: vp-view-in var(--vp-dur-base) var(--vp-ease-out);
}
.vp-branchlist[hidden] { display: none; }
.vp-branch { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0; border-radius: 8px; cursor: pointer; font-size: .86rem; }
.vp-branch:hover { background: var(--vp-primary-soft); }
.vp-branch input { accent-color: var(--vp-primary); cursor: pointer; }

.vp-emptynote { padding: 16px; border-radius: var(--vp-radius-md, 10px); background: var(--vp-warning-soft); border: 1px solid var(--vp-warning-soft-border); }
.vp-emptynote p { margin-block-end: 10px; font-size: .86rem; color: var(--vp-warning-text); }

.vp-icon-btn--danger:hover { background: var(--vp-danger-soft) !important; color: var(--vp-danger, #EF4444) !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   MEDIA STRIP + LIGHTBOX

   Shared by every screen that shows uploaded media: the four read-only detail
   screens and the spotlight/event uploaders. Lives here, not in a module file,
   because a component only two of its five callers linked is a component that
   is unstyled on the other three.
   ═══════════════════════════════════════════════════════════════════════════ */

/* A grid, not a flex row: tiles then share the card's width evenly and reflow
   instead of leaving a ragged last line. */
.vp-medialist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: var(--vp-space-5, 12px);
  margin-block-start: var(--vp-space-4, 8px);
}

.vp-mediatile { position: relative; margin: 0; min-inline-size: 0; }

.vp-mediatile img,
.vp-mediatile video {
  display: block;
  inline-size: 100%;
  aspect-ratio: 4 / 3;
  block-size: auto;
  object-fit: cover;
  border: 1px solid var(--vp-border);
  border-radius: var(--vp-radius-md, 10px);
  background: var(--vp-surface-sunken);
}

/* The clickable wrapper on a read-only tile. An <a> with a real href, so
   middle-click and ⌘-click still open the file in a tab; the lightbox only
   intercepts a plain left click. */
.vp-mediatile__link {
  display: block;
  position: relative;
  border-radius: var(--vp-radius-md, 10px);
  overflow: hidden;
  cursor: zoom-in;
}
.vp-mediatile__link img { transition: transform var(--vp-dur-base) var(--vp-ease); }
.vp-mediatile__link:hover img { transform: scale(1.04); }
.vp-mediatile__link:focus-visible {
  outline: 2px solid var(--vp-focus-ring);
  outline-offset: 2px;
}
/* Magnifier badge, so the tile reads as openable without a hover. */
.vp-mediatile__link::after {
  content: "";
  position: absolute;
  inset-block-end: 6px;
  inset-inline-end: 6px;
  inline-size: 26px;
  block-size: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55) center / 14px 14px no-repeat
    url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5M11 8v6M8 11h6'/%3E%3C/svg%3E");
  opacity: 0;
  transition: opacity var(--vp-dur-fast) var(--vp-ease);
}
.vp-mediatile__link:hover::after,
.vp-mediatile__link:focus-visible::after { opacity: 1; }

.vp-mediatile__remove {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 6px;
  inline-size: 24px;
  block-size: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 15px;
  line-height: 1;
  color: var(--vp-danger-contrast, #fff);
  background: var(--vp-danger);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: .85;
}
.vp-mediatile__remove:hover { opacity: 1; }

/* Caption under a read-only tile. The detail screens show three kinds of image
   in one strip — the record's own cover, a video's poster frame and the gallery
   — and without a label they are indistinguishable from each other. */
.vp-mediatile__cap {
  display: block;
  margin-block-start: 6px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--vp-text-muted);
}

/* ---- the viewer -------------------------------------------------------- */

/* Above everything the panel can have open behind it — a Bootstrap dialog
   (1055), a select2 list (1090), the attribute picker (1100), a confirm (1200)
   — and below toastr (9999), which must stay reachable to report a failure
   behind the overlay. */
.vp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  gap: var(--vp-space-5, 12px);
  padding: clamp(16px, 5vmin, 56px);
  /* .84 left the panel behind it readable — measured on the dark theme, the row
     labels and the sidebar were still legible through it, which reads as a
     rendering fault rather than an overlay. .92 plus a small blur settles it
     without going fully black, so the viewer still feels layered over the page. */
  background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(3px);
  animation: vp-lb-in var(--vp-dur-base, .18s) var(--vp-ease, ease-out);
}
.vp-lightbox[hidden] { display: none; }
@keyframes vp-lb-in { from { opacity: 0; } to { opacity: 1; } }

.vp-lightbox__stage {
  display: grid;
  place-items: center;
  min-block-size: 0;
  inline-size: 100%;
}
.vp-lightbox__img {
  max-inline-size: 100%;
  max-block-size: min(82vh, 100%);
  object-fit: contain;
  border-radius: var(--vp-radius-md, 10px);
  background: #000;
}
.vp-lightbox__cap {
  font-size: .84rem;
  color: rgba(255, 255, 255, .82);
  text-align: center;
}
.vp-lightbox__cap b { color: #fff; font-weight: 600; }

.vp-lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  inline-size: 42px;
  block-size: 42px;
  padding: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--vp-dur-fast) var(--vp-ease);
}
.vp-lightbox__btn:hover { background: rgba(255, 255, 255, .26); }
.vp-lightbox__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vp-lightbox__close { inset-block-start: 16px; inset-inline-end: 16px; }
/* Physical left/right: these follow the image strip, which does not mirror. */
.vp-lightbox__prev  { inset-block-start: 50%; left: 16px;  transform: translateY(-50%); }
.vp-lightbox__next  { inset-block-start: 50%; right: 16px; transform: translateY(-50%); }
.vp-lightbox__btn[hidden] { display: none; }

@media (max-width: 700px) {
  .vp-medialist { grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); }
  .vp-lightbox__prev { left: 8px; }
  .vp-lightbox__next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .vp-lightbox { animation: none; }
  .vp-mediatile__link:hover img { transform: none; }
}


/* ---- weekly opening hours: several periods per day ------------------------
   vendor-layout-v2/parts/working-hours-table.blade.php + vp-hours.js
   (16 October 2026). One line per period: opens – closes, remove; then
   "+ Add period". A closed day dims and hides the add button. */
body.vp .vp-hours-table td { vertical-align: top; }
body.vp .vp-hours__periods { display: grid; gap: 8px; }
body.vp .vp-hours__period { display: flex; align-items: center; gap: 8px; }
body.vp .vp-hours__period .form-control { flex: 1 1 0; min-width: 0; }
body.vp .vp-hours__dash { color: var(--vp-text-muted); }
body.vp .vp-hours__remove {
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--vp-border, #e2e5ef);
  border-radius: 8px;
  background: var(--vp-surface, #fff);
  color: var(--vp-text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
body.vp .vp-hours__remove:disabled { opacity: .35; cursor: not-allowed; }
body.vp .vp-hours__add {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--vp-primary-text, #4a2eb4);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
body.vp .vp-hours__add[hidden] { display: none; }
body.vp .vp-hours-table tr.is-closed .vp-hours__periods { opacity: .45; }
