/* ==========================================================================
   Mobility & More — Dashboard revamp
   Static UI only. Tokens lifted from the new Mobility & More storefront.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand, straight from the storefront stylesheet */
  --orange:      #FF8F18;
  --orange-hi:   #FFA23D;
  --orange-dk:   #E97800;
  --orange-ink:  #A94E00;
  --orange-100:  #FFE6CC;
  --orange-50:   #FFF4E8;

  --navy:        #12233A;
  --navy-2:      #1B3050;
  --navy-3:      #27426A;
  --blue:        #1F4FA0;

  --green:       #1B7447;
  --green-50:    #E8F5EE;
  --red:         #B3261E;
  --red-50:      #FDECEA;
  --amber:       #9A6200;
  --amber-50:    #FFF8E6;

  --ink:         #17140F;
  --ink-2:       #3F3A34;
  --muted:       #645E57;
  --line:        #DDE1E7;
  --line-soft:   #E9ECF1;
  --fog:         #F3F4F7;
  --fog-2:       #E9ECF1;
  --paper:       #FFFFFF;

  /* Chart series — validated: lightness band, chroma, CVD separation,
     normal-vision floor and 3:1 contrast all pass on this surface.
     Assign in this order, never cycled. */
  --s1: #1F4FA0;
  --s2: #D96F00;
  --s3: #1B7447;
  --s4: #8B5CF6;
  --s5: #C2186B;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 26px;

  --shadow-1: 0 1px 2px rgba(18,35,58,.06), 0 1px 3px rgba(18,35,58,.04);
  --shadow-2: 0 4px 12px rgba(18,35,58,.08), 0 2px 4px rgba(18,35,58,.04);
  --shadow-3: 0 18px 40px rgba(18,35,58,.16), 0 4px 12px rgba(18,35,58,.08);

  --display: 'Saira', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body:    'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --rail: 256px;
  --rail-collapsed: 76px;
  --topbar: 64px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--fog);
  -webkit-font-smoothing: antialiased;
}

/* app.js builds the sidebar and the top bar around whatever is inside #shell.
   Until it has run there is no chrome, and painting the bare content first
   makes the rail snap in afterwards — it reads as a jolt. So #shell is kept
   invisible: app.js replaces it outright, and the replacement is visible, so
   the first thing drawn is the finished page. Nothing to undo and no class to
   set, which also means a script error can never leave a blank screen. */
#shell { opacity: 0; }
.app { animation: shell-in .18s var(--ease) both; }
@keyframes shell-in { from { opacity: 0 } to { opacity: 1 } }
@media (prefers-reduced-motion: reduce) {
  .app { animation: none; }
}

h1, h2, h3, h4, h5 {
  font-family: var(--display);
  font-weight: 650;
  letter-spacing: -.012em;
  color: var(--navy);
  margin: 0;
}
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--orange-dk);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Visible to screen readers only */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
      overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top .15s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- 3. Shell ---------- */
.app { display: flex; min-height: 100vh; background: var(--navy); }
.main { background: var(--fog); }

.rail {
  width: var(--rail);
  flex: 0 0 var(--rail);
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  transition: width .22s var(--ease), flex-basis .22s var(--ease);
  z-index: 60;
}
body.rail-collapsed .rail { width: var(--rail-collapsed); flex-basis: var(--rail-collapsed); }

.rail__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 14px;
  min-height: var(--topbar);
}
.rail__mark {
  width: 34px; height: 34px; flex: none;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--orange-hi), var(--orange-dk));
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 750; font-size: 17px; color: #2a1500;
}

/* The real Mobility & More logo. It is dark artwork, so it is knocked out to
   white for the navy sidebar. */
.rail__brand { display: block; text-decoration: none; }
.rail__brand:hover { text-decoration: none; }
.rail__logo { display: block; height: 42px; width: auto; filter: brightness(0) invert(1); }
.rail__sub {
  display: block; margin-top: 4px; font-size: 11.5px; letter-spacing: .08em;
  text-transform: uppercase; color: #9fb0c6;
}
body.rail-collapsed .rail__logo { height: 30px; }
body.rail-collapsed .rail__sub { display: none; }
.rail__name { font-family: var(--display); font-weight: 650; font-size: 16px; line-height: 1.15; white-space: nowrap; }
.rail__name small { display: block; font-weight: 400; font-size: 12px; color: #9fb0c6; letter-spacing: .04em; text-transform: uppercase; }
body.rail-collapsed .rail__name { display: none; }

.rail__scroll { flex: 1; overflow-y: auto; padding: 6px 10px 18px; }
.rail__scroll::-webkit-scrollbar { width: 6px; }
.rail__scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 3px; }

.rail__group { margin-top: 14px; }
.rail__label {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: #7d90a8; padding: 0 10px 6px; font-weight: 600;
}
body.rail-collapsed .rail__label { text-align: center; font-size: 0; padding-bottom: 10px; }
body.rail-collapsed .rail__label::after {
  content: ''; display: block; height: 1px; background: rgba(255,255,255,.12); margin: 0 8px;
}

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 10px;
  color: #cdd8e6; font-size: 14.5px; white-space: nowrap;
  position: relative;
  transition: background .14s var(--ease), color .14s var(--ease);
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav-item.is-active { background: var(--orange); color: #241200; font-weight: 600; }
.nav-item.is-active .nav-item__icon { color: #241200; }
.nav-item__icon { width: 19px; flex: none; text-align: center; font-size: 16px; color: #8fa3bb; }
.nav-item:hover .nav-item__icon { color: #fff; }
.nav-item__text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
body.rail-collapsed .nav-item { justify-content: center; padding: 10px; }
body.rail-collapsed .nav-item__text, body.rail-collapsed .nav-item .pill { display: none; }

.nav-item .pill {
  font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px;
  background: var(--orange); color: #241200;
}
.nav-item.is-active .pill { background: rgba(0,0,0,.18); color: #241200; }
.nav-item .pill--alert { background: var(--red); color: #fff; }

/* Tooltip when the rail is collapsed */
body.rail-collapsed .nav-item::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  background: var(--ink); color: #fff; font-size: 13px; padding: 5px 10px;
  border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .12s var(--ease); z-index: 80;
}
body.rail-collapsed .nav-item:hover::after { opacity: 1; }

.rail__foot { padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.1); }

/* ---------- 4. Topbar ---------- */
.main {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  margin-left: var(--rail);
  transition: margin-left .22s var(--ease);
}
body.rail-collapsed .main { margin-left: var(--rail-collapsed); }

.topbar {
  height: var(--topbar);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
  position: sticky; top: 0; z-index: 50;
}

.icon-btn {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--paper);
  border-radius: 10px; color: var(--ink-2); font-size: 16px;
  transition: background .14s var(--ease), border-color .14s var(--ease);
  position: relative;
}
.icon-btn:hover { background: var(--fog); border-color: #c9d4e4; }
.icon-btn__dot {
  position: absolute; top: 7px; right: 8px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--red); border: 1.5px solid var(--paper);
}

.search {
  flex: 1; max-width: 460px; position: relative;
}
.search input {
  width: 100%; height: 38px; padding: 0 14px 0 38px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
  font: inherit; font-size: 14.5px; color: var(--ink);
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease);
}
.search input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-50); }
.search__icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 15px; }
.search kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--body); font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px;
  background: var(--fog);
}

.topbar__spacer { flex: 1; }

.who { display: flex; align-items: center; gap: 9px; padding-left: 4px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg, var(--navy-3), var(--navy));
  color: #fff; display: grid; place-items: center;
  font-family: var(--display); font-weight: 650; font-size: 13.5px;
}
.who__meta { line-height: 1.2; }
.who__meta b { font-size: 14px; display: block; }
.who__meta span { font-size: 12px; color: var(--muted); }

/* ---------- 5. Page ---------- */
.page { padding: 22px; width: 100%; }

.page-head {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.page-head__text { flex: 1; min-width: 240px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 5px; display: flex; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs i { font-size: 10px; opacity: .6; }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 15px;
  border-radius: 10px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600; white-space: nowrap;
  transition: transform .1s var(--ease), background .14s var(--ease), box-shadow .14s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--orange); color: #241200; box-shadow: var(--shadow-1); }
.btn--primary:hover { background: var(--orange-hi); box-shadow: var(--shadow-2); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-2); }
.btn--ghost { background: var(--paper); border-color: var(--line); color: var(--ink-2); }
.btn--ghost:hover { background: var(--fog); border-color: #c9d4e4; }
.btn--quiet { background: transparent; color: var(--ink-2); }
.btn--quiet:hover { background: var(--fog-2); }
.btn--danger { background: var(--red-50); color: var(--red); border-color: #f3cfcb; }
.btn--danger:hover { background: #fadbd8; }
.btn--sm { height: 32px; padding: 0 11px; font-size: 13.5px; border-radius: 8px; }
.btn--lg { height: 46px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn--block { width: 100%; justify-content: center; }

.btn-group { display: inline-flex; background: var(--fog-2); border-radius: 10px; padding: 3px; gap: 2px; }
.btn-group button {
  border: 0; background: transparent; border-radius: 8px;
  padding: 6px 13px; font-size: 13.5px; font-weight: 600; color: var(--muted);
  transition: background .14s var(--ease), color .14s var(--ease);
}
.btn-group button:hover { color: var(--ink); }
.btn-group button.is-on { background: var(--paper); color: var(--navy); box-shadow: var(--shadow-1); }

/* ---------- 7. Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
}
.card__head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--line-soft);
}
.card__head h3 { flex: 1; }
.card__head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); font-family: var(--body); font-weight: 400; }
.card__body { padding: 18px; }
.card__body--flush { padding: 0; }
.card__foot { padding: 12px 18px; border-top: 1px solid var(--line-soft); background: #fcfcfd; border-radius: 0 0 var(--r) var(--r); }

.grid { display: grid; gap: 16px; }
.grid--kpi  { grid-template-columns: repeat(auto-fit, minmax(min(212px, 100%), 1fr)); }
.grid--2    { grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr)); }
.grid--3    { grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); }
.grid--main { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
@media (max-width: 1100px) { .grid--main { grid-template-columns: 1fr; } }

/* ---------- 8. KPI tiles ---------- */
.kpi {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 16px 13px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.kpi::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--accent, var(--orange));
}
.kpi__top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.kpi__icon {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-soft, var(--orange-50)); color: var(--accent, var(--orange-dk)); font-size: 15px;
}
.kpi__label { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .01em; }
.kpi__value {
  font-family: var(--display); font-size: 27px; font-weight: 700;
  color: var(--navy); line-height: 1.1; letter-spacing: -.02em;
}
.kpi__foot { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 12.5px;
             padding-right: 78px; flex-wrap: wrap; }
.kpi__delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.kpi__delta--up   { color: var(--green); }
.kpi__delta--down { color: var(--red); }
.kpi__delta--flat { color: var(--muted); }
.kpi__note { color: var(--muted); }
.kpi__spark { position: absolute; right: 12px; bottom: 11px; opacity: .8; pointer-events: none; }

/* ---------- 9. Tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left; font-size: 12px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; padding: 10px 14px;
  background: #fbfcfd; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
/* A choice in a row is wide enough to read ("Something else", "Pick one for me"). */
table.tbl td > .select { min-width: 9.5rem; }
/* Settings > Services on a phone: the name and price stay readable and the
   table scrolls inside its card instead of squeezing them to nothing. */
#serviceRows [name="service_name[]"] { min-width: 200px; }
#serviceRows .input-group { min-width: 120px; }
table.tbl tbody tr { transition: background .12s var(--ease); }
table.tbl tbody tr:hover { background: #fbfcfe; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl__num { text-align: right; font-variant-numeric: tabular-nums; }
/* The heading sits over its figures: the th rule above would otherwise win. */
table.tbl th.tbl__num { text-align: right; }
.tbl__id { font-family: var(--display); font-weight: 650; color: var(--navy); white-space: nowrap; }
.tbl__sub { display: block; font-size: 12.5px; color: var(--muted); }
/* A table of inputs too wide to sit in one line (New Order's products): each
   row becomes a small block, the product across the top and its fields
   labelled underneath, so nothing has to be scrolled sideways to reach. */
table.tbl--stack, table.tbl--stack tbody { display: block; }
table.tbl--stack thead { display: none; }
table.tbl--stack tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft); align-items: end; }
table.tbl--stack td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; }
table.tbl--stack td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); margin-bottom: 4px; }
table.tbl--stack tr { position: relative; }
table.tbl--stack td:first-child { grid-column: 1 / -1; padding-right: 46px; }
table.tbl--stack td.row-actions { position: absolute; top: 34px; right: 18px; }
table.tbl--stack td[data-line-total] { font-weight: 700; padding-bottom: 8px; }
table.tbl--stack td[data-label="Unit"] { grid-column: span 2; }
table.tbl--stack .input, table.tbl--stack .select { width: 100% !important; min-width: 0 !important; }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; }
/* On a laptop a long list can still be wider than its card: the buttons at the
   end of each row stay pinned to the right edge, so they never have to be
   scrolled to. */
.tbl-wrap table.tbl td.row-actions { position: sticky; right: 0; background: var(--paper);
  box-shadow: -8px 0 8px -8px rgba(15, 30, 60, .18); }
/* As a real cell (not a flex box) it fills the row's height, so the pinned
   white background covers the whole row behind the buttons. */
table.tbl td.row-actions { display: table-cell; text-align: right; white-space: nowrap; }
table.tbl td.row-actions > :not([hidden]) { display: inline-flex; vertical-align: middle; }
table.tbl td.row-actions > * + * { margin-left: 5px; }
.tbl-wrap table.tbl--stack td.row-actions { position: absolute; background: none; box-shadow: none; }
@media (max-width: 1400px) {
  table.tbl th, table.tbl td { padding-left: 10px; padding-right: 10px; }
}

/* ---------- 10. Badges & status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px;
  white-space: nowrap;
}
.badge i { font-size: 10px; }
.badge--ok      { background: var(--green-50); color: var(--green); }
.badge--warn    { background: var(--amber-50); color: var(--amber); }
.badge--bad     { background: var(--red-50);   color: var(--red); }
.badge--info    { background: #E7EEFA;         color: var(--blue); }
.badge--neutral { background: var(--fog-2);    color: var(--ink-2); }
.badge--accent  { background: var(--orange-50);color: var(--orange-ink); }
.badge--R       { background: #F1ECFD;         color: #5B32B8; }

/* ---------- 11. Forms ---------- */
.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 13.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 5px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); font: inherit; font-size: 14.5px; color: var(--ink);
  padding: 0 12px; height: 40px;
  transition: border-color .14s var(--ease), box-shadow .14s var(--ease);
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 90px; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-50);
}
.input-group { display: flex; }
.input-group .input { border-radius: 10px 0 0 10px; }
.input-group .btn { border-radius: 0 10px 10px 0; border: 1px solid var(--line); border-left: 0; height: 40px; }
/* A box in front of the input ($, %, the search glass): its round corners and
   border go on the left, the input's on the right, and neither box shrinks
   the label out of sight. */
.input-group > .btn { flex: none; }
.input-group > .btn:first-child { border-radius: 10px 0 0 10px; border-left: 1px solid var(--line); border-right: 0; }
.input-group > .btn:first-child ~ .input { border-radius: 0 10px 10px 0; }
.input-group > .input { min-width: 0; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  width: 42px; height: 24px; border-radius: 99px; background: #c9d2dd;
  position: relative; transition: background .18s var(--ease); flex: none;
}
.switch__track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; box-shadow: var(--shadow-1);
  transition: transform .18s var(--ease);
}
.switch input:checked + .switch__track { background: var(--green); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch__text { font-size: 14px; }

/* ---------- 12. Charts ---------- */
.chart { position: relative; width: 100%; }
.chart canvas { display: block; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 0 2px 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }

.chart-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

/* Table fallback for every chart — identity never rests on colour alone */
.chart-table { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.chart-table summary { font-size: 13px; color: var(--muted); cursor: pointer; font-weight: 600; }
.chart-table summary:hover { color: var(--ink); }
.chart-table table { margin-top: 10px; font-size: 13px; }

/* ---------- 13. Misc ---------- */
.stack  { display: flex; flex-direction: column; gap: 12px; }
.row    { display: flex; align-items: center; gap: 10px; }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted  { color: var(--muted); }
.small  { font-size: 13px; }
.tnum   { font-variant-numeric: tabular-nums; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 16px; } .mb-2 { margin-bottom: 16px; }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty i { font-size: 34px; color: #c9d4e4; display: block; margin-bottom: 10px; }

.divider { height: 1px; background: var(--line-soft); margin: 14px 0; }

.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline__item { position: relative; padding-bottom: 16px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; left: -24px; top: 3px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--paper); border: 2.5px solid var(--orange);
}
.timeline__item--done .timeline__dot { border-color: var(--green); background: var(--green); }
.timeline__item--bad  .timeline__dot { border-color: var(--red); background: var(--red); }
.timeline time { font-size: 12.5px; color: var(--muted); }

.progress { height: 7px; background: var(--fog-2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--accent, var(--orange)); }

/* ---------- 14. Tabs ---------- */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a,
.tabs button {
  border: 0; background: transparent; padding: 10px 14px;
  font-size: 14.5px; font-weight: 600; color: var(--muted);
  border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap;
  transition: color .14s var(--ease), border-color .14s var(--ease);
}
.tabs a { text-decoration: none; display: block; }
.tabs a:hover,
.tabs button:hover { color: var(--ink); }
.tabs a.is-on,
.tabs button.is-on { color: var(--navy); border-bottom-color: var(--orange); font-weight: 700; }

/* ---------- 15. Drawer / modal ---------- */
.scrim {
  position: fixed; inset: 0; background: rgba(18,35,58,.45);
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); z-index: 90;
  backdrop-filter: blur(2px);
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw);
  background: var(--paper); z-index: 100; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .26s var(--ease);
  box-shadow: var(--shadow-3);
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.drawer__head h3 { flex: 1; }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px; }
.drawer__foot { padding: 14px 18px; border-top: 1px solid var(--line); }

/* ---------- 16. Knowledge chat ---------- */
.kb-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 85;
  width: 54px; height: 54px; border-radius: 50%; border: 0;
  background: linear-gradient(140deg, var(--orange-hi), var(--orange-dk));
  color: #2a1500; font-size: 21px; box-shadow: var(--shadow-3);
  display: grid; place-items: center;
  transition: transform .18s var(--ease);
}
.kb-fab:hover { transform: scale(1.06) rotate(-4deg); }
.kb-fab span {
  position: absolute; top: -2px; right: -2px; min-width: 19px; height: 19px;
  border-radius: 99px; background: var(--navy); color: #fff;
  font-size: 11.5px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--fog);
}

.kb { width: min(430px, 100vw); }
.kb__log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; background: var(--fog); }
.kb__msg { max-width: 86%; }
.kb__msg--me { align-self: flex-end; }
.kb__bubble {
  padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.kb__msg--me .kb__bubble { background: var(--navy); color: #fff; border-color: var(--navy); border-bottom-right-radius: 4px; }
.kb__msg--bot .kb__bubble { border-bottom-left-radius: 4px; }
.kb__who { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; padding: 0 3px; }
.kb__msg--me .kb__who { text-align: right; }
.kb__chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 18px 0; background: var(--fog); }
.kb__chip {
  border: 1px solid var(--line); background: var(--paper); border-radius: 99px;
  padding: 6px 12px; font-size: 13px; color: var(--ink-2);
  transition: background .14s var(--ease), border-color .14s var(--ease);
}
.kb__chip:hover { background: var(--orange-50); border-color: var(--orange); color: var(--orange-ink); }
.kb__ask { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--paper); }
.kb__ask .input { height: 40px; }
.kb-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 9px; background: var(--paper); }
.kb-card__head { padding: 9px 12px; background: var(--navy); color: #fff; font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.kb-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 1px 12px; padding: 10px 12px; font-size: 13.5px; }
.kb-card dt { color: var(--muted); }
.kb-card dd { margin: 0; font-weight: 600; text-align: right; }
.kb__typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.kb__typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blip 1.1s infinite; }
.kb__typing i:nth-child(2) { animation-delay: .18s; }
.kb__typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blip { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* ---------- 17. Builder (Elementor-style) ---------- */
.builder { display: grid; grid-template-columns: 236px minmax(0,1fr) 274px; gap: 0; height: calc(100vh - var(--topbar)); }
@media (max-width: 1240px) { .builder { grid-template-columns: 210px minmax(0,1fr); } .builder__inspector { display: none; } }

.builder__panel, .builder__inspector {
  background: var(--paper); border-right: 1px solid var(--line);
  overflow-y: auto; padding: 14px;
}
.builder__inspector { border-right: 0; border-left: 1px solid var(--line); }
.builder__panel h4, .builder__inspector h4 {
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 14px 0 8px; font-family: var(--body); font-weight: 700;
}
.builder__panel h4:first-child { margin-top: 0; }

.blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.block-chip {
  border: 1px dashed var(--line); border-radius: 11px; background: #fcfcfd;
  padding: 12px 6px; text-align: center; cursor: grab;
  transition: border-color .14s var(--ease), background .14s var(--ease), transform .1s var(--ease);
}
.block-chip:hover { border-color: var(--orange); background: var(--orange-50); transform: translateY(-1px); }
.block-chip:active { cursor: grabbing; }
.block-chip i { font-size: 17px; color: var(--orange-dk); display: block; margin-bottom: 5px; }
.block-chip span { font-size: 12px; color: var(--ink-2); font-weight: 600; }

.builder__canvas { background: var(--fog); overflow-y: auto; padding: 30px 18px 18px; }
.canvas-frame {
  background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow-2);
  margin: 0 auto; max-width: 100%; overflow: hidden;
  /* Room above the first row for its own handle and buttons. They sit just
     above the row they belong to, and this frame clips what leaves it -- so
     without this the first row on every page had no handle to take hold of
     and no buttons to press. */
  padding-top: 26px;
  transition: max-width .2s var(--ease);
}
.canvas-frame[data-vp="tablet"] { max-width: 820px; }
.canvas-frame[data-vp="phone"]  { max-width: 420px; }

.sec {
  position: relative; border: 2px solid transparent; transition: border-color .14s var(--ease);
}
.sec:hover { border-color: var(--orange-hi); }
.sec.is-picked { border-color: var(--orange); }
.sec__bar {
  position: absolute; top: 0; right: 0; transform: translateY(-100%);
  background: var(--orange); color: #241200; border-radius: 8px 8px 0 0;
  display: flex; gap: 1px; padding: 3px; opacity: 0; transition: opacity .14s var(--ease); z-index: 5;
}
.sec:hover .sec__bar, .sec.is-picked .sec__bar { opacity: 1; }
.sec__bar button { border: 0; background: transparent; color: inherit; width: 24px; height: 22px; border-radius: 5px; font-size: 12px; }
.sec__bar button:hover { background: rgba(0,0,0,.14); }
.sec__tag {
  position: absolute; top: 0; left: 0; transform: translateY(-100%);
  background: var(--orange); color: #241200; font-size: 11.5px; font-weight: 700;
  padding: 2px 9px; border-radius: 8px 8px 0 0; opacity: .4; transition: opacity .14s var(--ease);
  /* Above the row before it. The handle sits over that row's bottom edge, and
     without a stacking order whatever is in that row is painted on top of it
     -- so the handle could be seen but not taken hold of. */
  z-index: 6;
}
/* Visible before the pointer reaches it: a handle nobody can see is a handle
   nobody knows is there. */
.sec:hover .sec__tag, .sec.is-picked .sec__tag { opacity: 1; }
/* The tag is the row's handle, so it has to look like one. */
.sec__tag[data-grip] { cursor: grab; display: inline-flex; align-items: center; gap: 5px; user-select: none; }
.sec__tag[data-grip]:active { cursor: grabbing; }
.sec__tag[data-grip] > i { font-size: 13px; opacity: .75; }

.drop-zone {
  border: 2px dashed var(--line); border-radius: 12px; margin: 10px;
  padding: 26px; text-align: center; color: var(--muted); font-size: 13.5px;
  transition: border-color .14s var(--ease), background .14s var(--ease);
}
.drop-zone.is-over { border-color: var(--orange); background: var(--orange-50); color: var(--orange-ink); }

.insp-row { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.insp-row label { flex: 1; font-size: 13.5px; color: var(--ink-2); }
.insp-row .input, .insp-row .select { width: 108px; height: 32px; font-size: 13.5px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 7px; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.swatch.is-on { border-color: var(--navy); }

/* ---------- 18. Storefront preview ---------- */
.shop-head {
  background: var(--navy); color: #fff; padding: 12px 22px;
  display: flex; align-items: center; gap: 16px;
}
.shop-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #fff; padding: 46px 26px; border-radius: var(--r-lg); position: relative; overflow: hidden;
}
.shop-hero::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,143,24,.34), transparent 68%);
}
.shop-hero h1 { color: #fff; font-size: clamp(26px, 3.4vw, 40px); max-width: 17ch; }
.shop-hero p { color: #c5d2e3; max-width: 46ch; margin: 10px 0 20px; }

.prod {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.prod:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.prod__img {
  aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--fog), var(--fog-2));
  display: grid; place-items: center; color: #aab8c9; font-size: 40px; position: relative;
}
.prod__body { padding: 13px 14px 15px; }
.prod__name { font-family: var(--display); font-weight: 650; font-size: 15.5px; color: var(--navy); }
.prod__price { font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--navy); }
.prod__price small { font-weight: 400; font-size: 12.5px; color: var(--muted); }

/* ---------- 19. Login ---------- */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
}
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth__art { display: none; } }
.auth__art {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #fff; padding: 50px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth__art::after {
  content: ''; position: absolute; left: -80px; bottom: -80px; width: 340px; height: 340px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,143,24,.3), transparent 70%);
}
.auth__form { display: grid; place-items: center; padding: 40px 24px; background: var(--paper); }
.auth__box { width: 100%; max-width: 360px; }

/* ---------- 20. Index / cover ---------- */
.cover { max-width: 1180px; margin: 0 auto; padding: 44px 22px 80px; }
.screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 14px; }
.screen-link {
  display: block; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 15px; box-shadow: var(--shadow-1);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.screen-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--orange); text-decoration: none; }
.screen-link i { font-size: 19px; color: var(--orange-dk); }
.screen-link b { display: block; margin-top: 9px; color: var(--navy); font-family: var(--display); font-size: 15.5px; }
.screen-link span { font-size: 13px; color: var(--muted); }

.swatch-row { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch-card { width: 116px; }
.swatch-card i { display: block; height: 56px; border-radius: 11px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.07); }
.swatch-card b { display: block; font-size: 13px; margin-top: 6px; font-family: var(--display); }
.swatch-card span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.note {
  background: var(--orange-50); border: 1px solid var(--orange-100);
  border-left: 3px solid var(--orange); border-radius: 12px; padding: 13px 16px; font-size: 14px;
}
.note b { color: var(--orange-ink); }

/* ---------- 21. Responsive ---------- */
.rail-toggle { display: grid; }
@media (max-width: 900px) {
  .rail {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%); transition: transform .24s var(--ease);
    width: var(--rail); flex-basis: var(--rail);
  }
  body.rail-open .rail { transform: none; }
  body.rail-collapsed .rail { width: var(--rail); flex-basis: var(--rail); }
  body.rail-collapsed .rail__name, body.rail-collapsed .nav-item__text { display: block; }
  body.rail-collapsed .nav-item { justify-content: flex-start; padding: 9px 11px; }
  .page { padding: 16px; }
  .search kbd { display: none; }
  .who__meta { display: none; }
}

@media print {
  .rail, .topbar, .kb-fab, .btn, .row-actions { display: none !important; }
  .page { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 22. Small screens: let everything shrink ----------
   A grid child defaults to min-width:auto, so a wide table or a long row
   pushes the whole page sideways instead of scrolling inside its own card. */
.grid > *, .split > *, .card, .main, .page { min-width: 0; }
.tbl-wrap { max-width: 100%; }

@media (max-width: 900px) {
  /* Stack every grid, including the ones with inline columns. */
  .grid { grid-template-columns: 1fr !important; }

  /* The bar is a fixed height, so it cannot wrap. A page with several
     actions scrolls them inside the bar rather than making the whole
     document wider than the phone. */
  .topbar { overflow-x: auto; scrollbar-width: none; }
  .topbar::-webkit-scrollbar { height: 0; }

  /* The builder becomes canvas-first; the panels sit above and below it. */
  .builder { grid-template-columns: 1fr !important; height: auto; }
  .builder__panel, .builder__inspector { border: 0; border-bottom: 1px solid var(--line); max-height: none; }
  .builder__inspector { border-top: 1px solid var(--line); border-bottom: 0; }

  .shop-head .row { flex-wrap: wrap; }
  .shop-nav { order: 3; width: 100%; }
  .page-head { gap: 12px; }
  .cal-grid { min-width: 760px; }
}

@media (max-width: 560px) {
  .btn-group { flex-wrap: wrap; }
  .shop-hero { padding: 30px 20px; }
  .kb-fab { right: 14px; bottom: 14px; }
}

/* The chat drawer is parked off-screen to the right. It lives inside a fixed,
   viewport-sized dock that clips it, so the parked copy cannot widen the
   document. Clamping overflow on <html> would do the same job but silently
   breaks every position:sticky on the page - the sidebar and topbar included. */
.drawer-dock {
  position: fixed; inset: 0; overflow: hidden;
  pointer-events: none; z-index: 100;
}
.drawer { position: absolute; pointer-events: auto; }
.drawer:not(.is-open) { visibility: hidden; }
.drawer.is-open { visibility: visible; }

/* Toolbars wrap rather than push the page wider. */
.card__head, .card__foot, .bar, .page-head .row { flex-wrap: wrap; }

/* The rail is fixed, so the content column carries the offset itself.
   On a phone the rail slides in over the content instead. */
@media (max-width: 900px) {
  .main { margin-left: 0 !important; }
}

@media (max-width: 900px) {
  /* Button rows inside cards wrap too, not just the page header. */
  .row { flex-wrap: wrap; }
}

/* A section the client cannot edit inline — the shared header and footer. */
.sec--locked { opacity: .82; pointer-events: none; }
.sec--locked:hover { border-color: transparent; }
.sec__tag--locked { background: var(--navy); color: #fff; opacity: 1; }
.sec--locked .sec__tag { opacity: 1; }

/* The part of a page that does the work, as the builder draws it. Visibly
   not a widget somebody can pull apart, and plainly still theirs to reword. */
.pg-locked {
  border: 2px dashed var(--navy, #12233A); border-radius: 12px;
  background: repeating-linear-gradient(135deg,
    rgba(18,35,58,.045) 0 9px, transparent 9px 18px);
  padding: 15px 17px;
}
.pg-locked__head {
  margin: 0 0 3px; font-weight: 700; font-size: 14.5px;
  color: var(--navy, #12233A); text-transform: capitalize;
  display: flex; align-items: center; gap: 7px;
  /* Room on the right for this widget's own handle, which sits there. */
  padding-right: 128px;
}
.pg-locked__head > i { font-size: 15px; }
.pg-locked__note { margin: 0; font-size: 12.5px; color: var(--muted); }
.pg-locked__said { margin: 9px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pg-locked__word {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 10px; font-size: 12px; color: var(--navy, #12233A);
}

/* A column you can take hold of: a handle with its width on it, and an edge
   between it and the next one that can be pulled. */
.builder__canvas .pg-col { position: relative; }
.pg-col__tag {
  position: absolute; top: 2px; left: 2px; z-index: 8;
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--navy, #12233A); color: #fff; font-size: 10.5px; font-weight: 600;
  padding: 2px 7px; border-radius: 6px; cursor: grab; user-select: none;
  opacity: 0; transition: opacity .14s var(--ease);
}
.pg-col:hover > .pg-col__tag, .pg-col.is-picked > .pg-col__tag { opacity: .92; }
.pg-col__tag:active { cursor: grabbing; }
.pg-col__tag > i { font-size: 11px; opacity: .7; }
.pg-col__tag > b { background: rgba(255,255,255,.18); border-radius: 4px; padding: 0 4px; }
.pg-col.is-picked { outline: 2px solid var(--navy, #12233A); outline-offset: 1px; }
.pg-col.is-dragging { opacity: .45; }

.pg-col__pull {
  position: absolute; top: 0; right: -6px; width: 12px; height: 100%; z-index: 5;
  cursor: col-resize; opacity: 0; transition: opacity .14s var(--ease);
}
.pg-col__pull::before {
  content: ''; position: absolute; top: 10%; bottom: 10%; left: 5px;
  width: 3px; border-radius: 3px; background: var(--orange, #FF8F18);
}
.pg-col:hover > .pg-col__pull, body.is-pulling .pg-col__pull { opacity: 1; }
/* The last column has nothing to its right to take width from. */
.pg-col:last-child > .pg-col__pull { display: none; }
body.is-pulling { cursor: col-resize; user-select: none; }

/* Every widget's own handle: what it is, something to take hold of, and the
   two things people reach for. Without one the only way to move something was
   to drag the thing itself -- which is also how it is selected and typed
   into, so the two kept getting in each other's way. */
.builder__canvas .pg-w { position: relative; }
.pg-w__bar {
  /* On the right. The column's own handle is top-left, and both sitting in
     the same corner meant the widget's handle covered it -- so the column
     could be seen but not taken hold of. */
  position: absolute; top: -11px; right: 6px; z-index: 7;
  display: none; align-items: center; gap: 1px;
  background: var(--navy, #12233A); color: #fff; border-radius: 7px; padding: 2px;
  font-size: 10.5px; line-height: 1; box-shadow: 0 3px 10px rgba(18, 35, 58, .26);
}
.pg-w:hover > .pg-w__bar, .pg-w.is-picked > .pg-w__bar { display: flex; }
/* The one being edited keeps its handle out of the way of the words. */
.pg-w .is-editing ~ .pg-w__bar, .pg-w:has(.is-editing) > .pg-w__bar { display: none; }
.pg-w__grip { cursor: grab; padding: 3px 4px; border-radius: 5px; }
.pg-w__grip:active { cursor: grabbing; }
.pg-w__grip:hover { background: rgba(255, 255, 255, .18); }
.pg-w__what {
  padding: 0 6px 0 2px; font-weight: 600; max-width: 130px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-transform: capitalize;
}
.pg-w__bar button {
  border: 0; background: transparent; color: inherit; cursor: pointer;
  width: 20px; height: 18px; border-radius: 5px; font-size: 11px; padding: 0;
}
.pg-w__bar button:hover { background: rgba(255, 255, 255, .18); }

/* A place inside a working part where things may be put. The part cannot be
   taken apart, but it is not a sealed box either -- these say so. */
.sk-spot {
  pointer-events: auto; border: 1.5px dashed var(--line); border-radius: 8px;
  padding: 7px; margin: 8px 0; min-height: 30px; position: relative;
  background: rgba(127, 127, 127, .03);
  transition: border-color .14s var(--ease), background .14s var(--ease);
}
.sk-spot__label {
  display: block; font-size: 10.5px; color: var(--muted); text-align: center;
  line-height: 15px;
}
.sk-spot.has-things { border-style: solid; background: #fff; }
.sk-spot.has-things > .sk-spot__label { display: none; }
.sk-spot.has-things:hover > .sk-spot__label { display: block; margin-bottom: 5px; }
.sk-spot.is-over {
  border-color: var(--orange, #FF8F18); background: var(--orange-50, #FFF4E6);
}
.sk-spot .pg-w { pointer-events: auto; }

/* A picture, before there is one: somewhere to put one rather than a label
   saying there isn't one. */
.pg-drop {
  width: 100%; display: grid; justify-items: center; gap: 2px;
  border: 2px dashed var(--line); border-radius: 11px; padding: 22px 16px;
  background: rgba(127, 127, 127, .04); color: var(--muted); cursor: pointer;
  font: inherit; transition: border-color .14s var(--ease), background .14s var(--ease);
}
.pg-drop > i { font-size: 24px; color: var(--orange-dk, #E97800); }
.pg-drop > b { color: var(--ink); font-size: 13.5px; }
.pg-drop > span { font-size: 12px; }
.pg-drop:hover, .pg-drop.is-filedrop {
  border-color: var(--orange, #FF8F18); background: var(--orange-50, #FFF4E6);
}

.pg-pic { position: relative; }
.pg-pic__swap {
  position: absolute; top: 7px; right: 7px; border: 0; cursor: pointer;
  background: rgba(18, 35, 58, .82); color: #fff; font: inherit; font-size: 11.5px;
  border-radius: 7px; padding: 4px 9px; opacity: 0; transition: opacity .14s var(--ease);
}
.pg-pic:hover .pg-pic__swap { opacity: 1; }
.pg-pic.is-filedrop { outline: 2px dashed var(--orange, #FF8F18); outline-offset: 3px; }
.pg-w.is-uploading { opacity: .5; pointer-events: none; }

/* Where a drop would land. A line rather than a highlight: it has to say
   "between these two", which a box around something cannot. */
.builder__canvas .pg-w.is-before::before,
.builder__canvas .pg-w.is-after::after,
.builder__canvas .sec.is-before::before,
.builder__canvas .sec.is-after::after {
  content: ''; display: block; height: 3px; border-radius: 3px;
  background: var(--orange, #FF8F18); margin: 4px 0;
  box-shadow: 0 0 0 3px var(--orange-50, #FFF4E6);
}
.builder__canvas .sec.is-before::before,
.builder__canvas .sec.is-after::after { margin: 0; }

.pg-locked__tag {
  margin-left: auto; font-weight: 500; font-size: 11px; color: var(--muted);
  text-transform: none; letter-spacing: 0;
}
.pg-locked {
  position: relative;
}
.pg-locked__draw {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 16px; margin-top: 11px;
}

/* The drawing of a working part. Grey shapes where the real thing puts its
   pictures, prices and fields -- none of that is written by hand, so none of
   it is offered. The words are the exception, and they look like it. */
.sk { font-size: 12.5px; color: var(--ink); pointer-events: none; }
.sk .sk-word { pointer-events: auto; }
.sk-word {
  border-bottom: 1.5px dashed var(--orange, #FF8F18); cursor: text;
  border-radius: 2px; padding: 0 1px;
}
.sk-word:hover { background: var(--orange-50, #FFF4E6); }
.sk-word:empty::after { content: '(nothing)'; color: var(--muted); font-style: italic; }

.sk-head { font-size: 17px; margin: 0 0 8px; font-weight: 700; }
.sk-note { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.sk-box, .sk-line, .sk-input, .sk-thumb, .sk-price, .sk-rule, .sk-toggle {
  background: rgba(127, 127, 127, .16); border-radius: 6px;
}
.sk-box { width: 100%; margin-bottom: 8px; }
.sk-box--photo { border-radius: 10px; }
.sk-line { height: 9px; margin-bottom: 7px; }
.sk-rule { height: 1px; margin: 10px 0; border-radius: 0; }
.sk-input { height: 28px; }
.sk-field { margin-bottom: 9px; }
.sk-label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.sk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sk-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sk-split--aside { grid-template-columns: 190px 1fr; }
.sk-split--cart  { grid-template-columns: 1fr 230px; }
.sk-aside {
  background: rgba(127, 127, 127, .05); border: 1px solid var(--line-soft, #e7e9ee);
  border-radius: 9px; padding: 12px;
}
.sk-grid { display: grid; gap: 12px; }
.sk-tile { border: 1px solid var(--line-soft, #e7e9ee); border-radius: 9px; padding: 9px; }
.sk-row {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 11px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line-soft, #e7e9ee);
}
.sk-rowtext b { display: block; font-size: 13px; font-weight: 600; }
.sk-rowtext span { font-size: 11.5px; color: var(--muted); }
.sk-amount { font-size: 13px; font-weight: 600; white-space: nowrap; }
.sk-amount--big { font-size: 20px; margin: 8px 0 12px; }
.sk-tile b { display: block; font-size: 12.5px; }
.sk-tile span { font-size: 11px; color: var(--muted); }
img.sk-thumb { object-fit: cover; height: 40px; }
.sk-thumb { width: 52px; height: 40px; }
.sk-price { height: 11px; }
.sk-price--big { height: 20px; width: 90px; margin: 10px 0 12px; }
.sk-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sk-btn {
  background: var(--orange, #FF8F18); color: #241200; text-align: center;
  border-radius: 9px; padding: 9px 12px; font-weight: 700; margin-top: 10px;
}
.sk-btn .sk-word { border-bottom-color: #241200; }
.sk-card { max-width: 340px; }
.sk-after { margin-top: 16px; }
.sk-h { margin-bottom: 8px; }
.sk-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.sk-tabs span {
  flex: 1; text-align: center; padding: 7px; border-radius: 8px; font-size: 12px;
  border: 1px solid var(--line-soft, #e7e9ee); color: var(--muted);
}
.sk-tabs .is-on { border-color: var(--orange, #FF8F18); color: var(--ink); }
.sk-nav {
  padding: 7px 9px; border-radius: 7px; margin-bottom: 4px; color: var(--muted); font-size: 12px;
}
.sk-nav.is-on { background: var(--orange-50, #FFF4E6); color: var(--orange-ink, #8A4B00); }
.sk-middle { text-align: center; margin-bottom: 14px; }
.sk-tick {
  width: 42px; height: 42px; border-radius: 50%; margin: 0 auto 9px;
  background: #EFF8F1; color: #2E8046; display: grid; place-items: center; font-size: 22px;
}
.sk-switch { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 4px 0 10px; }
.sk-toggle { width: 30px; height: 17px; border-radius: 999px; flex: none; }
.sk-plain { color: var(--muted); font-size: 12.5px; }

@media (max-width: 760px) {
  .sk-split, .sk-split--aside, .sk-split--cart { grid-template-columns: 1fr; }
}

/* The same thing said in the panel down the side. */
.insp-locked {
  border: 1px solid var(--line); border-left: 3px solid var(--navy, #12233A);
  border-radius: 9px; padding: 10px 12px; margin-bottom: 12px;
  background: rgba(18,35,58,.04);
}
.insp-locked__head {
  margin: 0 0 3px; display: flex; align-items: center; gap: 7px;
  font-size: 13.5px; text-transform: capitalize;
}
.insp-locked__head > i { color: var(--navy, #12233A); }

/* ---------- 23. Builder inspector (Elementor-style accordion) ---------- */
.insp-head {
  display: flex; align-items: center; gap: 8px; padding-bottom: 11px;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.insp-head b { flex: 1; font-family: var(--display); font-size: 15px; color: var(--navy); }

.insp-group { border-bottom: 1px solid var(--line-soft); }
.insp-group__head {
  width: 100%; display: flex; align-items: center; gap: 9px;
  background: transparent; border: 0; padding: 11px 2px;
  font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-2); text-align: left;
}
.insp-group__head:hover { color: var(--navy); }
.insp-group__head > span { flex: 1; }
.insp-group__head > i:first-child { color: var(--orange-dk); font-size: 15px; }
.insp-group__chev { font-size: 12px; transition: transform .16s var(--ease); }
.insp-group.is-open .insp-group__chev { transform: rotate(180deg); }
.insp-group__body { display: none; padding: 2px 0 14px; }
.insp-group.is-open .insp-group__body { display: block; }

.colour-pick { display: flex; gap: 6px; align-items: center; }
.colour-pick input[type="color"] {
  width: 32px; height: 32px; padding: 0; border: 1px solid var(--line);
  border-radius: 8px; background: none; cursor: pointer; flex: none;
}
.colour-hex { width: 86px; height: 32px; font-size: 13px; font-variant-numeric: tabular-nums; }

.builder__inspector input[type="range"] { accent-color: var(--orange); }
.builder__inspector .field { margin-bottom: 12px; }
.builder__inspector .insp-row .btn-group button { padding: 5px 9px; }

/* Entrance animations the builder can set on a section */
.anim-fade { animation: bFade .5s var(--ease) both; }
.anim-up   { animation: bUp .5s var(--ease) both; }
.anim-left { animation: bLeft .5s var(--ease) both; }
.anim-zoom { animation: bZoom .5s var(--ease) both; }
@keyframes bFade { from { opacity: 0; } }
@keyframes bUp   { from { opacity: 0; transform: translateY(18px); } }
@keyframes bLeft { from { opacity: 0; transform: translateX(-22px); } }
@keyframes bZoom { from { opacity: 0; transform: scale(.96); } }

/* Entrance animations a section can be given in the builder. */
.anim-fade { animation: bFade .5s var(--ease) both; }
.anim-up   { animation: bUp   .5s var(--ease) both; }
.anim-left { animation: bLeft .5s var(--ease) both; }
.anim-zoom { animation: bZoom .5s var(--ease) both; }
@keyframes bFade { from { opacity: 0; } }
@keyframes bUp   { from { opacity: 0; transform: translateY(18px); } }
@keyframes bLeft { from { opacity: 0; transform: translateX(-22px); } }
@keyframes bZoom { from { opacity: 0; transform: scale(.96); } }

/* Somebody who would rather the page did not move on them. */
@media (prefers-reduced-motion: reduce) {
  .anim-fade, .anim-up, .anim-left, .anim-zoom { animation: none; }
}

/* The picture a section is using, in the inspector. */
/* The message as it will land. Its own document in a frame of its own: it
   has its own markup and its own colours, and no business sharing a page
   with the dashboard's. */
.mail-preview {
  border: 1px solid var(--line); border-radius: 11px; overflow: hidden;
  background: #f1f3f6;
}
.mail-preview iframe {
  display: block; width: 100%; height: 620px; border: 0; background: #f1f3f6;
}

/* Somewhere to put a picture, in the panel as on the canvas. The browser's
   own file input says "Choose File / No file chosen", cannot be styled, and
   gives no hint that a file can simply be dropped on it. */
.insp-drop {
  display: grid; justify-items: center; gap: 1px; cursor: pointer;
  border: 2px dashed var(--line); border-radius: 10px; padding: 14px 10px;
  background: rgba(127, 127, 127, .04); color: var(--muted); text-align: center;
  transition: border-color .14s var(--ease), background .14s var(--ease);
}
.insp-drop > i { font-size: 20px; color: var(--orange-dk, #E97800); }
.insp-drop > b { color: var(--ink); font-size: 13px; }
.insp-drop > span { font-size: 11.5px; }
.insp-drop:hover, .insp-drop.is-filedrop {
  border-color: var(--orange, #FF8F18); background: var(--orange-50, #FFF4E6);
}
.insp-drop.is-busy { opacity: .55; pointer-events: none; }

.insp-pic { position: relative; margin-bottom: 8px; }
.insp-pic img { width: 100%; border-radius: 9px; display: block; }
.insp-pic__off {
  position: absolute; top: 6px; right: 6px; border: 0; cursor: pointer;
  width: 24px; height: 24px; border-radius: 7px; font-size: 12px;
  background: rgba(18, 35, 58, .82); color: #fff;
}

.insp-thumb {
  display: block; width: 100%; max-height: 110px; object-fit: cover;
  border-radius: 9px; border: 1px solid var(--line); margin-bottom: 7px;
}

/* The photo on a location card. Across the top of the card at full width, so
   the three shops are told apart at a glance rather than by reading them. */
.loc-photo {
  display: block; width: 100%; height: 300px; object-fit: cover;
  border-radius: var(--r) var(--r) 0 0;
  border-bottom: 1px solid var(--line-soft);
}

/* ---------- The Pages builder screen ---------- */
/* The bar above the three panels, and the panels filling the window: a
   builder that scrolls the whole page loses the toolbar the moment you use it. */
body[data-page="page-builder"] .page { padding: 0; max-width: none; }
body[data-page="page-builder"] .bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px; flex-wrap: wrap;
  background: var(--paper); border-bottom: 1px solid var(--line);
}

.blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }

/* The page top to bottom, as a list you can jump about in. */
.outline-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: 0; background: var(--fog); color: var(--ink-2);
  font: inherit; font-size: 12.5px; padding: 7px 10px; border-radius: 8px; cursor: pointer;
}
.outline-item:hover { background: var(--orange-50); }
.outline-item.is-on { background: var(--orange-50); color: var(--orange-ink); font-weight: 600; }
.outline-item i { color: var(--muted); font-size: 14px; }
.outline-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Where a dragged block would land. */
.sec.is-over { box-shadow: 0 3px 0 var(--orange); }
.sec.is-dragging { opacity: .45; }
.drop-zone--empty { padding: 60px 20px; }

/* A section the builder was told to hide on one size of screen says so, so
   nobody spends ten minutes wondering where it went on the live page. */
.sec__note {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  background: var(--navy); color: #fff; font-size: 10.5px; font-weight: 600;
  padding: 2px 7px; border-radius: 99px;
}

/* ---------- The sign-in page preview ---------- */
.lp-prev { display: grid; grid-template-columns: 1fr 1fr; min-height: 330px; }
@media (max-width: 720px) { .lp-prev { grid-template-columns: 1fr; } }
.lp-prev__art {
  background: var(--navy); color: #fff; padding: 26px 22px;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  border-radius: 0 0 0 12px;
}
.lp-prev__art img { height: 30px; width: auto; margin-bottom: 14px; align-self: flex-start; }
.lp-prev__art b { font-family: var(--display); font-size: 20px; }
.lp-prev__art span { font-size: 13px; opacity: .8; }
.lp-prev__form { padding: 26px 22px; display: flex; flex-direction: column; gap: 6px; }
.lp-prev__form h4 { font-family: var(--display); font-size: 17px; margin: 0 0 10px; }
.lp-prev__form label { font-size: 12.5px; color: var(--ink-2); }
.lp-prev__box {
  height: 36px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--fog); margin-bottom: 8px;
}
.lp-prev__btn {
  background: var(--orange); color: #241200; font-weight: 700; font-size: 14px;
  text-align: center; padding: 10px; border-radius: 10px; margin-top: 4px;
}

/* A button that cannot be pressed should look it. There was no rule for this,
   so every disabled control in the dashboard looked live and then did nothing
   when it was clicked. */
.btn:disabled,
.btn[disabled],
.icon-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn:disabled:hover,
.btn[disabled]:hover { filter: none; background-image: none; }

/* And a field that is only there to be read. */
.input:disabled, .select:disabled, .textarea:disabled {
  background: var(--fog); color: var(--muted); cursor: default;
}

/* ---------- Editing the words on the page ---------- */
/* The bar that appears over whatever is being edited. Small, and only the
   things people actually reach for: a text box that can set any font at any
   size is how a client's site stops looking like their site. */
.fmt {
  position: absolute; z-index: 60; display: none;
  gap: 2px; padding: 4px; border-radius: 9px;
  background: var(--navy); box-shadow: var(--shadow-3, 0 8px 24px rgba(18,35,58,.24));
}
.fmt.is-on { display: flex; }
.fmt button {
  min-width: 28px; height: 28px; padding: 0 7px; border: 0; border-radius: 6px;
  background: transparent; color: #fff; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.fmt button:hover { background: rgba(255, 255, 255, .16); }
.fmt__sep { width: 1px; background: rgba(255, 255, 255, .22); margin: 3px 2px; }

/* The colour of the selected words. The swatch is the input itself, sized
   down to a button so the bar stays one row of buttons. */
.fmt__colour {
  position: relative; display: grid; place-items: center;
  width: 28px; height: 26px; border-radius: 6px; cursor: pointer; color: inherit;
}
.fmt__colour:hover { background: rgba(255, 255, 255, .16); }
.fmt__colour > i { pointer-events: none; font-size: 15px; }
.fmt__colour input {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%;
  padding: 0; border: 0; cursor: pointer;
}

/* Where a link goes, typed under the bar rather than in a browser dialog. A
   dialog stops everything on the page until it is answered, and it cannot be
   styled, placed or escaped from gracefully. */
.fmt__link {
  display: none; position: absolute; top: 100%; left: 0; margin-top: 5px;
  background: var(--navy, #12233A); border-radius: 9px; padding: 5px;
  gap: 4px; align-items: center; box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
}
.fmt__link.is-on { display: flex; }
.fmt__url {
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
  color: #fff; border-radius: 6px; padding: 5px 9px; font-size: 12.5px; width: 230px;
}
.fmt__url::placeholder { color: rgba(255, 255, 255, .45); }
.fmt__url.is-bad { border-color: #E4575A; background: rgba(228, 87, 90, .18); }
.fmt__link button {
  border: 0; background: transparent; color: #fff;
  width: 26px; height: 26px; border-radius: 6px; font-size: 13px;
}
.fmt__link button:hover { background: rgba(255, 255, 255, .16); }

/* What is selected inside the words being edited, so it is obvious that a
   word has been picked out before the bar is reached. */
.is-editing::selection, .is-editing *::selection {
  background: var(--orange, #FF8F18); color: #241200;
}

/* What is being edited, so it is obvious where the typing will go. */
.is-editing {
  outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px;
  cursor: text; min-height: 1em;
}
.is-editing:focus { outline-color: var(--orange-dk); }

/* A widget on the canvas, and the one that is selected. */
.pg-w { position: relative; }
.builder__canvas .pg-w { outline: 1px dashed transparent; outline-offset: 2px; }
.builder__canvas .pg-w:hover { outline-color: var(--orange-hi); }
.builder__canvas .pg-w.is-picked { outline: 2px solid var(--orange); outline-offset: 2px; }

/* Columns, and the gap a widget can be dropped into. */
.builder__canvas .pg-col { min-height: 46px; outline: 1px dashed transparent; }
.builder__canvas .pg-col:hover { outline-color: var(--line); }
.builder__canvas .pg-col.is-over { outline: 2px dashed var(--orange); background: var(--orange-50); }
.builder__canvas .pg-col--empty {
  display: grid; place-items: center; color: var(--muted); font-size: 12px;
  border: 1px dashed var(--line); border-radius: 8px; padding: 18px 10px;
}

/* How a row is divided, offered as pictures rather than as "4-8". */
.layouts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.layout-chip {
  border: 1px solid var(--line); border-radius: 9px; background: var(--paper);
  padding: 7px; cursor: pointer; display: block; width: 100%;
}
.layout-chip:hover { border-color: var(--orange); }
.layout-chip__bars { display: grid; gap: 3px; grid-auto-flow: column; height: 16px; }
.layout-chip__bars span { background: var(--orange-100); border-radius: 3px; }
.layout-chip__name { font-size: 10.5px; color: var(--muted); margin-top: 5px; display: block; }

@media (prefers-reduced-motion: reduce) {
  .block-chip:hover { transform: none; }
}

/* ---------- One line on an order ---------- */
/* The boxes under a line: the rental period, the date change, the unit.
   Tinted by what they are, as the old order screen had them, so the eye
   finds the one it wants without reading three headings. */
.fold {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px;
  background: var(--wash, #f8fafc); border: 1px solid var(--line-soft);
  border-left-width: 3px;
}
.fold--ok   { background: #f0fdf4; border-left-color: #10b981; }
.fold--warn { background: #fffbeb; border-left-color: #f59e0b; }
.fold--info { background: #eff6ff; border-left-color: #2563eb; }
.fold .hint { margin-top: 6px; }

/* Four across, for the figures along the top of Reports. */
.grid--4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 18px; }
@media (max-width: 900px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }

/* The footer is drawn in its own orange, so the "this can be changed" dashes go dark there. */
.sk--site-footer .sk-word { border-bottom-color: #2a1500; }
.sk--site-footer .sk-word:hover { background: rgba(255,255,255,.25); }

/* Builder: the spinning button and the message after a save or a publish. */
@keyframes pg-spin { to { transform: rotate(360deg); } }
.pg-spin { display: inline-block; animation: pg-spin .8s linear infinite; }
.pg-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 1000;
  display: flex; align-items: center; gap: 10px;
  max-width: min(92vw, 560px); padding: 13px 18px; border-radius: 12px;
  background: #1F2A44; color: #fff; font-size: 14.5px; line-height: 1.35;
  box-shadow: 0 14px 40px rgba(0,0,0,.28);
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
}
.pg-toast.is-shown { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.pg-toast > i { font-size: 24px; flex: none; }
.pg-toast--ok { background: #166534; }
.pg-toast--bad { background: #991B1B; }
.pg-toast a { color: #fff; font-weight: 700; white-space: nowrap; text-decoration: underline; margin-left: 4px; }
