/* ==================================================================
   "pm" page system (Ridwan format) – shared by every restyled page.
   All colours are tokens, so the dark theme only has to swap tokens.
=================================================================== */
.pm, .pm-modal {
  --pm-ink: #14232E; --pm-sea: #0F5B66; --pm-sea-deep: #0B4651; --pm-sea-soft: #E3F0F1; --pm-primary: #0F5B66; --pm-primary-deep: #0B4651;
  --pm-mist: #F4F7F8; --pm-card: #fff; --pm-raise: #FAFCFC; --pm-line: #E3E9EC; --pm-row-line: #EEF2F4; --pm-input-line: #D5DEE3;
  --pm-input-hover: #B9C7CF; --pm-track: #E8EEF1; --pm-placeholder: #8FA1AD; --pm-muted: #66798A;
  --pm-ok: #1F8A70; --pm-ok-soft: #E1F3EC; --pm-warn: #A96A12; --pm-warn-soft: #FBF0DA;
  --pm-slate: #475467; --pm-slate-soft: #EAECF0; --pm-danger: #B42318; --pm-danger-soft: #FDECEA; --pm-danger-line: #F3C9C5;
  --pm-ring: rgba(15, 91, 102, .14); --pm-ring-strong: rgba(15, 91, 102, .35); --pm-shadow: rgba(15, 91, 102, .25);
  --pm-radius: 14px;
  font-family: "Instrument Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--pm-ink);
}
.pm { margin: -1.75rem -1.75rem 0; background: var(--pm-mist); min-height: calc(100vh - 64px); }
.pm .pm-wrap { padding: 8px 28px 36px; }
.pm a { text-decoration: none; }

/* ---------- Page header ---------- */
.pm-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; padding: 24px 0 20px; }
.pm-head h1 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 2rem; letter-spacing: -.01em; margin: 0 0 4px; color: var(--pm-ink); }
.pm-head p { margin: 0; color: var(--pm-muted); font-size: .95rem; max-width: 70ch; }
.pm-crumbs { font-size: .8rem; margin-bottom: 6px; color: var(--pm-muted); }
.pm-crumbs a { color: var(--pm-sea); }
.pm-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.pm-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--pm-line); background: var(--pm-card); color: var(--pm-ink);
  font-family: inherit; font-weight: 500; font-size: .875rem; padding: 9px 16px; border-radius: 10px; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s; line-height: 1.4; }
.pm-btn:hover { background: var(--pm-mist); color: var(--pm-ink); border-color: var(--pm-input-line); }
.pm-btn:focus-visible { outline: 3px solid var(--pm-ring-strong); outline-offset: 2px; }
.pm-btn.is-primary { background: var(--pm-primary); border-color: var(--pm-primary); color: #fff; box-shadow: 0 6px 16px var(--pm-shadow); }
.pm-btn.is-primary:hover { background: var(--pm-primary-deep); border-color: var(--pm-primary-deep); color: #fff; }
.pm-btn.is-danger { color: var(--pm-danger); border-color: var(--pm-danger-line); }
.pm-btn.is-danger:hover { background: var(--pm-danger-soft); border-color: var(--pm-danger); color: var(--pm-danger); }
.pm-btn[disabled] { opacity: .6; cursor: not-allowed; }
.pm-btn-sm { padding: 6px 12px; font-size: .8rem; box-shadow: none !important; }
.pm-icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--pm-muted); border: 0; background: transparent;
  cursor: pointer; transition: background .15s, color .15s; text-decoration: none; }
.pm-icon-btn:hover { background: var(--pm-mist); color: var(--pm-ink); }
.pm-icon-btn.is-danger:hover { background: var(--pm-danger-soft); color: var(--pm-danger); }
.pm-icon-btn.is-warn:hover { background: var(--pm-warn-soft); color: var(--pm-warn); }
.pm-icon-btn.is-ok:hover { background: var(--pm-ok-soft); color: var(--pm-ok); }
.pm-icon-btn.is-locked, .pm-icon-btn.is-locked:hover { color: var(--pm-input-hover); background: transparent; cursor: not-allowed; }
.pm-icon-btn:focus-visible { outline: 3px solid var(--pm-ring-strong); }
.pm-row-actions { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.pm-row-actions form { display: inline-block; margin: 0; }
.pm-mini-btn { border: 1px solid var(--pm-line); background: var(--pm-card); color: var(--pm-ink); padding: 5px 12px; border-radius: 99px;
  font-family: inherit; font-size: .8rem; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s; }
.pm-mini-btn:hover { background: var(--pm-sea-soft); border-color: var(--pm-sea); color: var(--pm-sea-deep); }
.pm-mini-btn:focus-visible { outline: 3px solid var(--pm-ring-strong); outline-offset: 2px; }

/* ---------- Summary strip ---------- */
.pm-eyebrow { font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--pm-muted); margin: 6px 2px 10px; }
.pm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--pm-card); border: 1px solid var(--pm-line);
  border-radius: var(--pm-radius); margin-bottom: 20px; overflow: hidden; }
.pm-stats.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pm-stat { padding: 20px 24px; border-right: 1px solid var(--pm-line); min-width: 0; }
.pm-stat:last-child { border-right: 0; }
.pm-stat .label { font-size: .82rem; color: var(--pm-muted); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.pm-stat .value { font-family: "Fraunces", Georgia, serif; font-size: 1.8rem; font-weight: 600; line-height: 1.15; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pm-stat .value.is-small { font-size: 1.35rem; }
.pm-stat .value.is-bad { color: var(--pm-danger); }
.pm-stat .value.is-warn { color: var(--pm-warn); }
.pm-stat .hint { font-size: .8rem; color: var(--pm-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-stat.is-featured { background: var(--pm-primary); color: #fff; }
.pm-stat.is-featured .label, .pm-stat.is-featured .hint { color: rgba(255, 255, 255, .78); }
.pm-meter { height: 6px; border-radius: 99px; background: var(--pm-track); margin-top: 12px; overflow: hidden; }
.pm-meter > span { display: block; height: 100%; width: 0; background: var(--pm-sea); border-radius: 99px; transition: width .6s ease; }
.pm-stat.is-featured .pm-meter { background: rgba(255, 255, 255, .25); }
.pm-stat.is-featured .pm-meter > span { background: #fff; }

/* ---------- Cards, panels ---------- */
.pm-card { background: var(--pm-card); border: 1px solid var(--pm-line); border-radius: var(--pm-radius); margin-bottom: 20px; }
.pm-panel { background: var(--pm-card); border: 1px solid var(--pm-line); border-radius: var(--pm-radius); padding: 22px 24px; margin-bottom: 20px; }
.pm-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.pm-panel h3, .pm-card-title { font-family: "Fraunces", Georgia, serif; font-size: 1.15rem; font-weight: 600; margin: 0 0 2px; color: var(--pm-ink); }
.pm-panel .sub, .pm-card .sub { color: var(--pm-muted); font-size: .84rem; margin: 0; }
.pm-panel-link { font-size: .84rem; font-weight: 600; color: var(--pm-sea); white-space: nowrap; }
.pm-panel-link:hover { color: var(--pm-sea-deep); }
.pm-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 4px; }
.pm-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.pm-two > * { min-width: 0; }
.pm-incomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.pm-incomes > * { min-width: 0; }

/* ---------- Filter bar ---------- */
.pm-filterbar { padding: 16px 22px 8px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pm-filter { position: relative; width: 280px; max-width: 100%; }
.pm-filter.is-wide { width: 320px; }
.pm-filter.is-narrow { width: 220px; }
.pm-filter > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--pm-placeholder); font-size: .9rem; z-index: 2; pointer-events: none; }
.pm-filter:focus-within > i { color: var(--pm-sea); }
.pm-filter :is(select, input) { width: 100%; height: 44px; padding: 8px 12px 8px 42px; border: 1px solid var(--pm-input-line); border-radius: 10px;
  background: var(--pm-card); color: var(--pm-ink); font-family: inherit; font-size: .92rem; box-shadow: none; transition: border-color .15s, box-shadow .15s; }
.pm-filter :is(select, input):hover { border-color: var(--pm-input-hover); }
.pm-filter :is(select, input):focus { outline: none; border-color: var(--pm-sea); box-shadow: 0 0 0 4px var(--pm-ring); }
.pm-filter input::placeholder { color: var(--pm-placeholder); }
.pm-seg { display: inline-flex; background: var(--pm-mist); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.pm-seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-family: inherit; font-size: .85rem; font-weight: 500;
  color: var(--pm-muted); cursor: pointer; transition: background .15s, color .15s; }
.pm-seg button:hover { color: var(--pm-ink); }
.pm-seg button.is-on { background: var(--pm-card); color: var(--pm-ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.pm-seg button:focus-visible { outline: 3px solid var(--pm-ring-strong); }
.pm-bulk { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pm-bulk .count { color: var(--pm-muted); font-size: .86rem; }

/* ---------- Report filters ---------- */
.pm-filtercard { background: var(--pm-card); border: 1px solid var(--pm-line); border-radius: var(--pm-radius); padding: 22px 24px; margin-bottom: 20px; }
.pm-rgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: end; }
.pm-rfield[hidden] { display: none; }
.pm-rfield label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 6px; }
.pm-rfield .ico { position: relative; }
.pm-rfield .ico > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--pm-placeholder); font-size: .9rem; pointer-events: none; transition: color .15s; }
.pm-rfield .ico:focus-within > i { color: var(--pm-sea); }
.pm-rfield :is(select, input) { display: block; width: 100%; height: 46px; padding: 10px 14px 10px 42px; border: 1px solid var(--pm-input-line); border-radius: 10px;
  background: var(--pm-card); color: var(--pm-ink); font-family: inherit; font-size: .95rem; box-shadow: none; transition: border-color .15s, box-shadow .15s; }
.pm-rfield :is(select, input):focus { outline: none; border-color: var(--pm-sea); box-shadow: 0 0 0 4px var(--pm-ring); }
.pm-rbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.pm-presets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.pm-presets span { color: var(--pm-muted); font-size: .84rem; }
.pm-preset { border: 1px solid var(--pm-line); background: var(--pm-card); color: var(--pm-ink); padding: 6px 12px; border-radius: 99px; font-family: inherit;
  font-size: .82rem; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s; text-decoration: none; }
.pm-preset:hover, .pm-preset.is-on { background: var(--pm-sea-soft); border-color: var(--pm-sea); color: var(--pm-sea-deep); }

/* ---------- Tables ---------- */
.pm-table-wrap { overflow-x: auto; padding: 0 14px; position: relative; }
.pm-table { width: 100%; border-collapse: collapse; }
.pm-table thead th { font-size: .78rem; font-weight: 600; color: var(--pm-muted); background: transparent; border-bottom: 1px solid var(--pm-line);
  padding: 12px 14px; white-space: nowrap; text-align: left; user-select: none; }
.pm-table thead th[data-sort] { cursor: pointer; }
.pm-table thead th[data-sort]::after { content: "\F127"; font-family: "bootstrap-icons"; font-size: .65rem; margin-left: 6px; opacity: .35; }
.pm-table thead th.is-asc::after { content: "\F148"; opacity: .9; }
.pm-table thead th.is-desc::after { content: "\F128"; opacity: .9; }
.pm-table tbody td { padding: 14px; vertical-align: middle; border-bottom: 1px solid var(--pm-row-line); font-size: .92rem; color: var(--pm-ink); }
.pm-table tbody tr:hover > td { background: var(--pm-raise); }
.pm-table tbody tr:last-child > td { border-bottom: 0; }
.pm-table tbody tr[data-href] { cursor: pointer; }
.pm-table .num, .pm-table th.num { text-align: right; }
.pm-table tr.is-picked > td { background: var(--pm-sea-soft) !important; }
.pm-table tr.is-flag > td:first-child { box-shadow: inset 3px 0 0 #D9962B; }
.pm-table-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 24px 18px; border-top: 1px solid var(--pm-row-line); }
.pm-table-foot .info { color: var(--pm-muted); font-size: .85rem; }
.pm-pager { display: flex; gap: 4px; flex-wrap: wrap; }
.pm-pager button { min-width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--pm-ink); font-family: inherit; font-size: .85rem; cursor: pointer; }
.pm-pager button:hover:not([disabled]) { background: var(--pm-mist); }
.pm-pager button.is-on { background: var(--pm-primary); color: #fff; }
.pm-pager button[disabled] { opacity: .4; cursor: default; }
.pm-nomatch td { text-align: center; color: var(--pm-muted); padding: 40px 12px !important; }

.pm-mini { width: 100%; border-collapse: collapse; }
.pm-mini th { font-size: .76rem; font-weight: 600; color: var(--pm-muted); text-align: left; padding: 0 12px 10px 0; border-bottom: 1px solid var(--pm-line); white-space: nowrap; }
.pm-mini td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--pm-row-line); font-size: .9rem; vertical-align: middle; }
.pm-mini tr:last-child td { border-bottom: 0; }
.pm-mini .num, .pm-mini th.num { text-align: right; padding-right: 0; }

/* ---------- Bits inside cells ---------- */
.pm-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pm-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: var(--pm-sea-soft); color: var(--pm-sea); display: grid; place-items: center;
  font-weight: 600; font-size: .8rem; overflow: hidden; }
.pm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pm-role-ico, .pm-file-ico { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; background: var(--pm-sea-soft); color: var(--pm-sea); display: grid; place-items: center; font-size: .9rem; }
.pm-name { font-weight: 600; color: var(--pm-ink); }
.pm-sub { color: var(--pm-muted); font-size: .8rem; margin-top: 1px; }
.pm-none { color: var(--pm-muted); }
.pm-money { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pm-payno { font-weight: 600; white-space: nowrap; }
.pm-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.pm-link-plain { color: var(--pm-ink); text-decoration: none; }
.pm-link-plain:hover, .pm-link-plain:hover .pm-name { color: var(--pm-sea); }
.pm-you { margin-left: 6px; font-size: .72rem; font-weight: 600; color: var(--pm-sea); background: var(--pm-sea-soft); padding: 2px 8px; border-radius: 99px; }
.pm-check { width: 17px; height: 17px; accent-color: var(--pm-sea); cursor: pointer; vertical-align: middle; }
.pm-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.pm-chip.ok { background: var(--pm-ok-soft); color: var(--pm-ok); }
.pm-chip.warn { background: var(--pm-warn-soft); color: var(--pm-warn); }
.pm-chip.slate { background: var(--pm-slate-soft); color: var(--pm-slate); }
.pm-chip.bad { background: var(--pm-danger-soft); color: var(--pm-danger); }
.pm-chip.info { background: var(--pm-sea-soft); color: var(--pm-sea); }
.pm-chip.role { background: color-mix(in srgb, var(--rc, var(--pm-sea)) 14%, var(--pm-card)); color: color-mix(in srgb, var(--rc, var(--pm-sea)) 80%, var(--pm-ink)); }
a.pm-chip { text-decoration: none; }
a.pm-chip:hover { filter: brightness(.95); }

.pm-list { list-style: none; margin: 0; padding: 0; }
.pm-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--pm-row-line); }
.pm-list li:last-child { border-bottom: 0; }
.pm-empty { text-align: center; padding: 64px 24px; }
.pm-empty .icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; background: var(--pm-sea-soft); color: var(--pm-sea); display: grid; place-items: center; font-size: 1.5rem; }
.pm-empty h3 { font-family: "Fraunces", Georgia, serif; font-size: 1.4rem; margin-bottom: 6px; color: var(--pm-ink); }
.pm-empty p { color: var(--pm-muted); max-width: 420px; margin: 0 auto 22px; }
.pm-empty-line { text-align: center; color: var(--pm-muted); font-size: .92rem; padding: 22px 8px; }
.pm-empty-line i { display: block; font-size: 1.4rem; color: var(--pm-ok); margin-bottom: 8px; }

/* ranked bars (reports) */
.pm-rank { list-style: none; margin: 0; padding: 0; }
.pm-rank li { padding: 11px 0; border-bottom: 1px solid var(--pm-row-line); }
.pm-rank li:last-child { border-bottom: 0; }
.pm-rank .row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .9rem; }
.pm-rank .row1 .name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-rank .row1 .amt { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pm-share { height: 6px; margin-top: 8px; border-radius: 99px; background: var(--pm-track); overflow: hidden; }
.pm-share > span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--pm-sea); transition: width .5s ease; }
.pm-share-pct { color: var(--pm-muted); font-size: .76rem; margin-top: 4px; }

/* ---------- Forms: sections & fields ---------- */
.pm-formcard { background: var(--pm-card); border: 1px solid var(--pm-line); border-radius: var(--pm-radius); }
.pm-section { padding: 32px; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px 48px; align-items: start; }
.pm-section + .pm-section { border-top: 1px solid var(--pm-line); }
.pm-section-head .icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--pm-sea-soft); color: var(--pm-sea);
  font-size: 1.1rem; margin-bottom: 14px; }
.pm-section h2 { font-family: "Fraunces", Georgia, serif; font-size: 1.2rem; font-weight: 600; margin: 0 0 6px; color: var(--pm-ink); }
.pm-section .intro { color: var(--pm-muted); font-size: .9rem; margin: 0; max-width: 34ch; }
.pm-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pm-fields.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pm-field { min-width: 0; }
.pm-field.span-2 { grid-column: span 2; }
.pm-field.full { grid-column: 1 / -1; }
.pm-field label.pm-label, .pm-label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--pm-ink); }
.pm-label .opt { font-weight: 400; color: var(--pm-muted); margin-left: 4px; }
.pm-label .req { color: var(--pm-danger); }
.pm-hint { color: var(--pm-muted); font-size: .8rem; margin-top: 6px; }
.pm-hint.is-warn { color: var(--pm-warn); }
.pm-field :is(input[type="text"], input[type="number"], input[type="email"], input[type="tel"], input[type="date"], input[type="time"],
  input[type="password"], input[type="url"], input[type="search"], select, textarea) {
  display: block; width: 100%; height: 46px; padding: 10px 14px; border: 1px solid var(--pm-input-line); border-radius: 10px; background: var(--pm-card);
  color: var(--pm-ink); font-family: inherit; font-size: .95rem; line-height: 1.4; box-shadow: none; transition: border-color .15s, box-shadow .15s; }
.pm-field textarea { height: auto !important; min-height: 92px; resize: vertical; }
.pm-field input[type="color"] { width: 64px; height: 46px; padding: 4px; border: 1px solid var(--pm-input-line); border-radius: 10px; background: var(--pm-card); cursor: pointer; }
.pm-field :is(input, select, textarea):hover { border-color: var(--pm-input-hover); }
.pm-field :is(input, select, textarea):focus { outline: none; border-color: var(--pm-sea); box-shadow: 0 0 0 4px var(--pm-ring); }
.pm-field.has-error :is(input, select, textarea) { border-color: var(--pm-danger); }
.pm-field.pm-field :is(input, select, textarea):disabled { background: var(--pm-mist); color: var(--pm-ink); opacity: 1; cursor: default; border-color: var(--pm-line); }
.pm-ico { position: relative; }
.pm-ico > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 16px; text-align: center; color: var(--pm-placeholder);
  font-size: .9rem; pointer-events: none; z-index: 3; transition: color .15s; }
.pm-ico:has(textarea) > i { top: 23px; }
.pm-field .pm-ico :is(input[type="text"], input[type="number"], input[type="email"], input[type="tel"], input[type="date"], input[type="time"],
  input[type="password"], input[type="url"], input[type="search"], select, textarea) { padding-left: 42px; }
.pm-ico:focus-within > i { color: var(--pm-sea); }
.pm-field.has-error .pm-ico > i { color: var(--pm-danger); }
.pm-error { color: var(--pm-danger); font-size: .82rem; margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.pm-alert-wrap { padding: 24px 32px 0; }
.pm-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--pm-danger-soft); color: var(--pm-danger); border-radius: 10px; font-size: .9rem; }
.pm-alert.is-warn { background: var(--pm-warn-soft); color: var(--pm-warn); }
.pm-alert i { margin-top: 3px; }
.pm-alert ul { list-style: none; margin: 4px 0 0; padding: 0; }
.pm-bar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; padding: 18px 32px; border-top: 1px solid var(--pm-line);
  background: var(--pm-raise); border-radius: 0 0 var(--pm-radius) var(--pm-radius); position: sticky; bottom: 0; z-index: 5; }
.pm-bar .note { margin-right: auto; color: var(--pm-muted); font-size: .88rem; }
.pm-bar .note strong { color: var(--pm-ink); }

.pm-switch { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; background: var(--pm-mist); border-radius: 12px; width: 100%; }
.pm-switch input[type="checkbox"] { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--pm-sea); flex: 0 0 18px; cursor: pointer; }
.pm-switch label { margin: 0; font-weight: 600; cursor: pointer; }
.pm-switch .hint { color: var(--pm-muted); font-size: .84rem; margin-top: 3px; font-weight: 400; }
.pm-next, .pm-tip { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; background: var(--pm-sea-soft); color: var(--pm-sea-deep);
  border-radius: 12px; font-size: .88rem; }
.pm-next i, .pm-tip i { margin-top: 3px; }
.pm-tip.is-top { margin: 0 0 20px; }
.pm-file { padding: 12px 14px; background: var(--pm-mist); border: 2px dashed var(--pm-input-line); border-radius: 12px; font-size: .86rem; color: var(--pm-muted); word-break: break-word; }
.pm-file:focus-within { border-color: var(--pm-sea); background: var(--pm-sea-soft); }
.pm-file a { color: var(--pm-sea); font-weight: 500; }
.pm-field .pm-file input[type="file"] { display: block; width: 100%; font-size: .86rem; color: var(--pm-ink); border: 0; background: transparent; padding: 0; height: auto; }
.pm-file input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 1px solid var(--pm-line); background: var(--pm-card); border-radius: 8px;
  font-family: inherit; font-weight: 500; color: var(--pm-ink); cursor: pointer; }
.pm-file input[type="checkbox"] { margin: 0 6px 0 8px; vertical-align: middle; }
.pm-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pm-logo img { width: 58px; height: 58px; object-fit: contain; border: 1px solid var(--pm-line); border-radius: 10px; background: var(--pm-card); padding: 5px; }
.pm-logo span { color: var(--pm-muted); font-size: .84rem; }

/* password helpers */
.pm-pw input { padding-right: 96px !important; }
.pm-pw-btns { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: flex; gap: 2px; z-index: 3; }
.pm-pw-btn { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--pm-muted); cursor: pointer; display: grid; place-items: center; }
.pm-pw-btn:hover { background: var(--pm-sea-soft); color: var(--pm-sea); }
.pm-strength { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: .8rem; color: var(--pm-muted); }
.pm-strength[hidden] { display: none; }
.pm-strength .bar { flex: 1; height: 5px; border-radius: 99px; background: var(--pm-track); overflow: hidden; }
.pm-strength .bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--pm-danger); transition: width .25s, background .25s; }
.pm-strength.is-ok .bar span { background: #D9962B; }
.pm-strength.is-strong .bar span { background: var(--pm-ok); }

/* role picker & permissions */
.pm-permtools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.pm-permtools .pm-find { position: relative; flex: 1 1 280px; max-width: 420px; }
.pm-permtools .pm-find > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--pm-placeholder); font-size: .9rem; pointer-events: none; }
.pm-permtools .pm-find input { width: 100%; height: 44px; padding: 8px 14px 8px 42px; border: 1px solid var(--pm-input-line); border-radius: 10px; background: var(--pm-card);
  font-family: inherit; font-size: .92rem; color: var(--pm-ink); }
.pm-permtools .pm-find input:focus { outline: none; border-color: var(--pm-sea); box-shadow: 0 0 0 4px var(--pm-ring); }
.pm-permtools .count { color: var(--pm-muted); font-size: .88rem; }
.pm-app { border: 1px solid var(--pm-line); border-radius: 14px; margin-bottom: 14px; overflow: hidden; background: var(--pm-card); }
.pm-app[hidden] { display: none; }
.pm-app-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; background: var(--pm-raise); border-bottom: 1px solid var(--pm-line); }
.pm-app-head .icon { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; background: var(--pm-sea-soft); color: var(--pm-sea); display: grid; place-items: center; font-size: .85rem; }
.pm-app-head h3 { margin: 0; font-size: 1rem; font-weight: 600; color: var(--pm-ink); }
.pm-app-head .sub { color: var(--pm-muted); font-size: .82rem; }
.pm-app-head .tools { margin-left: auto; display: flex; gap: 6px; }
.pm-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; padding: 14px 18px 18px; }
.pm-perm { position: relative; display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 12px; cursor: pointer; border: 1px solid var(--pm-line);
  border-radius: 10px; background: var(--pm-card); transition: border-color .15s, background .15s; }
.pm-perm:hover { border-color: var(--pm-input-hover); }
.pm-perm input { margin-top: 3px; width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--pm-sea); cursor: pointer; }
.pm-perm .txt { min-width: 0; line-height: 1.3; }
.pm-perm .txt strong { display: block; font-size: .88rem; font-weight: 600; }
.pm-perm .txt small { display: block; color: var(--pm-muted); font-size: .78rem; margin-top: 2px; }
.pm-perm .txt code { color: var(--pm-placeholder); font-size: .7rem; }
.pm-perm.is-on { border-color: var(--pm-sea); background: var(--pm-sea-soft); }
.pm-perm.is-hidden { display: none; }
.pm-perm.is-locked { opacity: .55; cursor: not-allowed; }
.pm-perm:focus-within { outline: 3px solid var(--pm-ring-strong); outline-offset: 1px; }
.pm-perm .swatch { width: 10px; height: 10px; border-radius: 50%; background: var(--rc); display: inline-block; margin-right: 6px; }

/* matrix */
.pm-matrix { width: 100%; border-collapse: collapse; font-size: .86rem; }
.pm-matrix th, .pm-matrix td { padding: 9px 12px; border-bottom: 1px solid var(--pm-row-line); }
.pm-matrix thead th { font-size: .78rem; color: var(--pm-muted); font-weight: 600; white-space: nowrap; text-align: center; }
.pm-matrix thead th:first-child { text-align: left; }
.pm-matrix .grp td { background: var(--pm-raise); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--pm-muted); }
.pm-matrix td.yes, .pm-matrix td.no { text-align: center; }
.pm-matrix td.yes { color: var(--pm-ok); }
.pm-matrix td.no { color: var(--pm-input-hover); }

/* ---------- Profile ---------- */
.pm-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; background: var(--pm-card); border: 1px solid var(--pm-line); border-radius: var(--pm-radius);
  padding: 24px 28px; margin-bottom: 20px; }
.pm-hero .photo { width: 84px; height: 84px; flex: 0 0 84px; border-radius: 50%; object-fit: cover; border: 4px solid var(--pm-card); background: var(--pm-sea-soft);
  box-shadow: 0 4px 16px rgba(15, 45, 55, .15); display: grid; place-items: center; font-family: "Fraunces", Georgia, serif; font-size: 1.8rem; color: var(--pm-sea); }
.pm-hero h2 { font-family: "Fraunces", Georgia, serif; font-size: 1.5rem; font-weight: 600; margin: 0 0 6px; color: var(--pm-ink); }
.pm-hero .meta { display: flex; gap: 8px 18px; flex-wrap: wrap; color: var(--pm-muted); font-size: .9rem; }
.pm-hero .meta i { color: var(--pm-sea); margin-right: 6px; }
.pm-hero .pm-actions { margin-left: auto; }
.pm-pill-on { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; padding: 4px 10px; border-radius: 99px; background: var(--pm-ok-soft); color: var(--pm-ok);
  font-size: .8rem; font-weight: 600; }
.pm-pill-on i { font-size: .45rem; }
.pm-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; margin: 0; }
.pm-dl > div { min-width: 0; }
.pm-dl dt { color: var(--pm-muted); font-size: .8rem; font-weight: 500; margin-bottom: 4px; }
.pm-dl dd { margin: 0; font-size: .98rem; word-break: break-word; }
.pm-dl .full { grid-column: 1 / -1; }
.pm-dl .none { color: var(--pm-muted); }
.pm-copy { border: 0; background: transparent; color: var(--pm-sea); cursor: pointer; padding: 2px 6px; border-radius: 6px; margin-left: 4px; font-size: .82rem; }
.pm-copy:hover { background: var(--pm-sea-soft); }

/* ---------- Dialogs ---------- */
.pm-modal .modal-content { border: 0; border-radius: 18px; overflow: hidden; background: var(--pm-card); color: var(--pm-ink); }
.pm-modal .modal-header { border: 0; padding: 24px 28px 4px; align-items: flex-start; }
.pm-modal .modal-title { font-family: "Fraunces", Georgia, serif; font-size: 1.4rem; font-weight: 600; color: var(--pm-ink); }
.pm-modal .modal-subtitle { color: var(--pm-muted); font-size: .86rem; margin-top: 2px; }
.pm-modal .modal-body { padding: 12px 28px; }
.pm-modal .modal-footer { border: 0; padding: 12px 28px 24px; gap: 8px; }
.pm-x { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--pm-muted); font-size: 1.5rem; line-height: 1; cursor: pointer; margin-left: auto; }
.pm-x:hover { background: var(--pm-mist); color: var(--pm-ink); }
.pm-modal .pm-field-row { margin-bottom: 16px; }
.pm-modal .pm-in { display: block; width: 100%; height: 46px; padding: 10px 14px; border: 1px solid var(--pm-input-line); border-radius: 10px; background: var(--pm-card);
  color: var(--pm-ink); font-family: inherit; font-size: .95rem; box-shadow: none; }
.pm-modal .pm-in:focus { outline: none; border-color: var(--pm-sea); box-shadow: 0 0 0 4px var(--pm-ring); }
.pm-modal .pm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.pm-modal .pm-photo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.pm-modal .pm-photo-row .ph { width: 84px; height: 84px; object-fit: cover; border-radius: 50%; border: 3px solid var(--pm-line); background: var(--pm-sea-soft);
  display: grid; place-items: center; color: var(--pm-sea); font-size: 1.6rem; font-family: "Fraunces", Georgia, serif; }
.pm-modal .pm-pwwrap { position: relative; }
.pm-modal .pm-pwwrap .pm-in { padding-right: 48px; }
.pm-modal .pm-pweye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent;
  color: var(--pm-muted); cursor: pointer; }
.pm-modal .pm-pweye:hover { background: var(--pm-sea-soft); color: var(--pm-sea); }
.pm-modal .pm-help { color: var(--pm-muted); font-size: .8rem; margin-top: 6px; }
.pm-modal .pm-help.is-bad { color: var(--pm-danger); }
.pm-modal .pm-help.is-ok { color: var(--pm-ok); }
.pm-modal .pm-check-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: .9rem; }
.pm-modal .pm-check-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--pm-sea); }

/* ---------- Responsive ---------- */
@media (max-width: 1399px) {
  .pm-section { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pm-section .intro { max-width: none; }
}
@media (max-width: 1199px) {
  .pm-incomes { grid-template-columns: minmax(0, 1fr); }
  .pm-rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  .pm { margin: -1rem -1rem 0; }
  .pm .pm-wrap { padding: 4px 16px 28px; }
  .pm-stats, .pm-stats.is-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-stat { border-bottom: 1px solid var(--pm-line); margin-bottom: -1px; }
  .pm-stat:nth-child(2n) { border-right: 0; }
  .pm-stats.is-three .pm-stat:nth-child(3) { grid-column: 1 / -1; }
  .pm-two { grid-template-columns: minmax(0, 1fr); }
  .pm-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-bulk { margin-left: 0; }
}
@media (max-width: 575px) {
  .pm .pm-wrap { padding: 4px 12px 24px; }
  .pm-head h1 { font-size: 1.6rem; }
  .pm-actions { width: 100%; }
  .pm-actions .pm-btn { flex: 1 1 45%; justify-content: center; white-space: nowrap; }
  .pm-stats, .pm-stats.is-three { grid-template-columns: 1fr; }
  .pm-stat { border-right: 0 !important; }
  .pm-stats.is-three .pm-stat:nth-child(3) { grid-column: auto; }
  .pm-filterbar { padding: 14px 12px 6px; }
  .pm-filter, .pm-filter.is-wide, .pm-filter.is-narrow { width: 100%; }
  .pm-seg { width: 100%; }
  .pm-seg button { flex: 1; }
  .pm-table-wrap { padding: 0 4px; }
  .pm-table-foot { padding: 12px 14px 16px; }
  .pm-panel, .pm-filtercard { padding: 18px 16px; }
  .pm-rgrid { grid-template-columns: 1fr; }
  .pm-presets { margin-left: 0; width: 100%; }
  .pm-section { padding: 22px 18px; }
  .pm-fields, .pm-fields.cols-2 { grid-template-columns: 1fr; }
  .pm-field.span-2 { grid-column: auto; }
  .pm-alert-wrap { padding: 20px 18px 0; }
  .pm-bar { padding: 16px 18px; flex-direction: column-reverse; align-items: stretch; }
  .pm-bar .pm-btn { width: 100%; justify-content: center; }
  .pm-bar .note { margin-right: 0; }
  .pm-perms { grid-template-columns: 1fr; }
  .pm-hero { padding: 20px 18px; }
  .pm-hero .pm-actions { margin-left: 0; }
  .pm-dl { grid-template-columns: 1fr; }
  .pm-modal .pm-grid2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .pm-meter > span, .pm-share > span, .pm-btn, .pm-icon-btn { transition: none; } }
@media print {
  .pm { margin: 0; background: #fff; min-height: 0; }
  .no-print, .pm-filterbar, .pm-filtercard, .pm-actions, .pm-table-foot, .pm-row-actions { display: none !important; }
  .pm-card, .pm-panel, .pm-stats { border-color: #ccc; break-inside: avoid; }
}
.pm-modal .ph[hidden], .pm [hidden] { display: none !important; }
.pm-report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.pm-report { display: flex; flex-direction: column; gap: 8px; margin: 0; color: var(--pm-ink); transition: border-color .15s, transform .15s; }
.pm-report:hover { border-color: var(--pm-sea); color: var(--pm-ink); transform: translateY(-2px); }
.pm-report h3 { margin-top: 8px; }
.pm-report .pm-panel-link { margin-top: auto; padding-top: 8px; }
.pm-table.is-compact td { white-space: nowrap; }
.pm .btn-link.pm-panel-link { text-decoration: none; font-size: .84rem; }

/* Wide tables scroll inside their card instead of stretching the whole page (phones, RTL) */
.app-main, .app-content, .pm, .pm-wrap, .pm-card { min-width: 0; }
.app-content, .pm-card { max-width: 100%; }
.app-main { overflow-x: clip; }

/* ---------- Front-desk list extras ---------- */
.pm-dim { color: var(--pm-muted); }
.pm-money.is-owed { color: var(--pm-danger); font-weight: 600; }
.pm-row-actions { gap: 6px; }
.pm-row-actions .pm-btn-sm { white-space: nowrap; }
.pm-stat .value { font-variant-numeric: tabular-nums; }
.pm-hero-initials { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 50%; background: var(--pm-sea); color: #fff; display: grid; place-items: center;
  font-family: "Fraunces", Georgia, serif; font-size: 1.6rem; font-weight: 600; }
.pm-hero .pm-actions form { display: inline-flex; }
.pm-two-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.pm-h3 { font-family: "Fraunces", Georgia, serif; font-size: 1.15rem; font-weight: 600; margin: 0; color: var(--pm-ink); }
.pm-tip.is-bad { background: var(--pm-danger-soft); color: var(--pm-danger); }
.pm-dl dt i { color: var(--pm-sea); margin-right: 4px; }
@media (max-width: 991px) { .pm-two-wide { grid-template-columns: minmax(0, 1fr); } }
.pm-drop-form { width: 270px; border-radius: 12px; border: 1px solid var(--pm-line); box-shadow: 0 12px 32px rgba(16, 24, 40, .16); }
.pm-drop-form .pm-label { display: block; font-weight: 600; font-size: .84rem; margin-bottom: 6px; }

/* ---------- Rooms & prices: rate cards ---------- */
.pm-section-title { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.2rem; color: var(--pm-ink); margin: 8px 0 12px; }
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-bottom: 28px; }
.rt-card { position: relative; background: var(--pm-card); border: 1px solid var(--pm-line); border-radius: var(--pm-radius); padding: 18px 20px 16px; overflow: hidden; }
.rt-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--rt); }
html[dir="rtl"] .rt-card::before { inset: 0 0 0 auto; }
.rt-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.rt-top form { display: inline; }
.rt-name { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.25rem; color: var(--pm-ink); text-decoration: none; }
.rt-name:hover { color: var(--pm-sea); }
.rt-price { font-family: "Fraunces", Georgia, serif; font-size: 1.6rem; font-weight: 600; color: var(--pm-sea); margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.rt-price span { font-family: "Instrument Sans", sans-serif; font-size: .85rem; font-weight: 400; color: var(--pm-muted); margin-inline-start: 4px; }
.rt-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--pm-muted); font-size: .85rem; }
.rt-meta i { color: var(--pm-sea); }
.rt-amen { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--pm-line); display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; color: var(--pm-ink); }
.rt-amen i { color: var(--pm-sea); margin-inline-end: 5px; }
.rt-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 8px; vertical-align: 1px; }
.pm-table tr.is-muted > td { color: var(--pm-muted); }
.pm-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pm-icon-btn.is-danger:hover { color: var(--pm-danger); }

/* ---------- Availability calendar ---------- */
.av-nav { display: flex; align-items: center; gap: 6px; }
.av-date { height: 38px; border: 1px solid var(--pm-input-line); border-radius: 10px; padding: 0 10px; background: var(--pm-card); color: var(--pm-ink); font: inherit; font-size: .9rem; }
.av-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 0 0 12px; color: var(--pm-muted); font-size: .88rem; }
.av-legend span { display: inline-flex; align-items: center; gap: 8px; }
.av-sw { width: 22px; height: 12px; border-radius: 4px; display: inline-block; }
.av-sw.is-free { background: var(--pm-card); border: 1px dashed var(--pm-input-line); }
.av-sw.is-res { background: #DCEBF7; border: 1px solid #9DC3E6; }
.av-sw.is-in { background: var(--pm-sea); }
.av-sw.is-off { background: repeating-linear-gradient(135deg, var(--pm-slate-soft) 0 4px, var(--pm-line) 4px 6px); }
.av-free-note { margin-inline-start: auto; color: var(--pm-ink); font-weight: 500; }
.av-free-note i { color: var(--pm-sea); }
.av-card { padding: 0; overflow: hidden; }
.av-scroll { overflow-x: auto; position: relative; }
.av-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 980px; table-layout: fixed; }
.av-table col.av-col-room { width: 132px; }
.av-table thead th { position: sticky; top: 0; background: var(--pm-card); z-index: 2; padding: 12px 4px 10px; text-align: center; font-weight: 500;
  border-bottom: 1px solid var(--pm-line); color: var(--pm-muted); font-size: .75rem; line-height: 1.15; }
.av-table thead th span, .av-table thead th em { display: block; font-style: normal; }
.av-table thead th b { display: block; font-family: "Fraunces", Georgia, serif; font-size: 1.15rem; color: var(--pm-ink); font-weight: 600; margin: 2px 0; }
.av-table thead th.is-weekend { background: var(--pm-raise); }
.av-table thead th.is-today b { color: #fff; background: var(--pm-sea); width: 30px; height: 30px; line-height: 30px; border-radius: 50%; margin: 2px auto; }
.av-room-h, .av-room { position: sticky; left: 0; z-index: 3; background: var(--pm-card); text-align: start !important; min-width: 120px; padding: 10px 16px !important; }
html[dir="rtl"] .av-room-h, html[dir="rtl"] .av-room { left: auto; right: 0; }
.av-room { border-bottom: 1px solid var(--pm-row-line); font-weight: 400; }
.av-room .pm-name, .av-room .pm-sub { display: block; }
.av-table td { height: 52px; padding: 5px 2px; border-bottom: 1px solid var(--pm-row-line); text-align: center; vertical-align: middle; }
.av-table td.is-today { background: color-mix(in srgb, var(--pm-sea-soft) 55%, transparent); }
.av-free a { display: grid; place-items: center; height: 38px; margin: 0 2px; border-radius: 8px; border: 1px dashed transparent; color: transparent; text-decoration: none; }
.av-free a:hover, .av-free a:focus-visible { border-color: var(--pm-sea); color: var(--pm-sea); background: var(--pm-sea-soft); outline: none; }
.av-off span { display: block; height: 38px; margin: 0 2px; border-radius: 8px; background: repeating-linear-gradient(135deg, var(--pm-slate-soft) 0 6px, var(--pm-line) 6px 8px); }
.av-bar { display: flex; align-items: center; gap: 7px; height: 38px; margin: 0 3px; padding: 0 12px; border-radius: 19px; text-decoration: none; font-size: .84rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-align: start; }
.av-bar span { overflow: hidden; text-overflow: ellipsis; }
.av-bar.is-in { background: var(--pm-sea); color: #fff; }
.av-bar.is-res { background: #DCEBF7; color: #18456B; border: 1px solid #9DC3E6; }
.av-bar:hover { filter: brightness(1.06); }
.av-bar:focus-visible { outline: 3px solid rgba(15, 91, 102, .35); outline-offset: 1px; }
html[data-theme="dark"] .av-bar.is-res, html[data-theme="dark"] .av-sw.is-res { background: #183B57; color: #CFE6FA; border-color: #2D5F86; }

/* ---------- Check-in / reservation ---------- */
.ns-mode a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 8px; font-size: .88rem; font-weight: 500; color: var(--pm-muted); text-decoration: none; }
.ns-mode a:hover { color: var(--pm-ink); }
.ns-mode a.is-on { background: var(--pm-card); color: var(--pm-ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.ns-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.ns-main { min-width: 0; }
.ns-step { padding: 24px 26px; }
.ns-step-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.ns-step-head h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.25rem; margin: 2px 0 2px; color: var(--pm-ink); }
.ns-step-head p { margin: 0; color: var(--pm-muted); font-size: .9rem; }
.ns-num { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--pm-sea); color: #fff;
  font-family: "Fraunces", Georgia, serif; font-weight: 600; }
.ns-guest { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 12px; background: var(--pm-sea-soft); flex-wrap: wrap; }
.ns-guest .pm-hero-initials { width: 56px; height: 56px; flex-basis: 56px; font-size: 1.25rem; }
.ns-guest-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--pm-muted); font-size: .86rem; margin-top: 4px; }
.ns-guest-meta i { color: var(--pm-sea); }
.ns-search { position: relative; }
.ns-results { position: absolute; z-index: 30; inset: calc(100% + 4px) 0 auto 0; background: var(--pm-card); border: 1px solid var(--pm-line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14); overflow: hidden; }
.ns-results:empty { display: none; }
.ns-hit { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--pm-ink); text-decoration: none; border-bottom: 1px solid var(--pm-row-line); }
.ns-hit:last-child { border-bottom: 0; }
.ns-hit:hover, .ns-hit:focus-visible { background: var(--pm-sea-soft); color: var(--pm-ink); outline: none; }
.ns-hit .pm-sub { display: block; }
.ns-hit.is-none { color: var(--pm-muted); font-size: .9rem; }
.ns-or { display: flex; align-items: center; gap: 12px; color: var(--pm-muted); font-size: .85rem; margin: 22px 0 18px; }
.ns-or::before, .ns-or::after { content: ""; flex: 1; border-top: 1px solid var(--pm-line); }
.ns-dates { grid-template-columns: 1fr 1fr 110px; margin-bottom: 22px; }
.ns-nights output { display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 10px; background: var(--pm-mist);
  font-family: "Fraunces", Georgia, serif; font-size: 1.3rem; font-weight: 600; color: var(--pm-sea); }
.ns-rooms { border: 0; margin: 0; padding: 0; min-width: 0; }
.ns-type { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 14px 0 8px; font-size: .92rem; color: var(--pm-ink); }
.ns-room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.ns-room { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--pm-input-line); border-radius: 12px;
  background: var(--pm-card); cursor: pointer; transition: border-color .15s, box-shadow .15s; margin: 0; }
.ns-room input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ns-room:hover { border-color: var(--pm-input-hover); }
.ns-room:focus-within { box-shadow: 0 0 0 4px var(--pm-ring); }
.ns-room:has(input:checked) { border-color: var(--pm-sea); background: var(--pm-sea-soft); box-shadow: inset 0 0 0 1px var(--pm-sea); }
.ns-room:has(input:checked)::after { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; top: 8px; right: 10px; color: var(--pm-sea); font-size: 1rem; }
html[dir="rtl"] .ns-room:has(input:checked)::after { right: auto; left: 10px; }
.ns-room-no { font-family: "Fraunces", Georgia, serif; font-size: 1.4rem; font-weight: 600; line-height: 1.1; color: var(--pm-ink); }
.ns-room-rate { font-size: .84rem; font-weight: 600; color: var(--pm-ink); font-variant-numeric: tabular-nums; }
.ns-room-state { font-size: .76rem; color: var(--pm-ok); }
.ns-room.is-reserved .ns-room-state { color: #2C6EA3; }
.ns-room.is-busy .ns-room-state { color: var(--pm-danger); }
.ns-room.is-cleaning .ns-room-state { color: var(--pm-warn); }
.ns-rooms.has-error .ns-room { border-color: var(--pm-danger-line); }
.ns-side { position: sticky; top: 80px; }
.ns-folio { background: var(--pm-card); border: 1px solid var(--pm-line); border-radius: var(--pm-radius); padding: 22px 22px 18px; }
.ns-sum { margin: 0 0 12px; padding: 14px 16px; background: var(--pm-mist); border-radius: 12px; }
.ns-sum > div { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; padding: 3px 0; }
.ns-sum dt { font-weight: 400; color: var(--pm-muted); }
.ns-sum dt i { color: var(--pm-sea); margin-inline-end: 4px; }
.ns-sum dd { margin: 0; font-weight: 600; text-align: end; font-variant-numeric: tabular-nums; }
.ns-total { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 2px 18px; margin-bottom: 16px; border-bottom: 1px dashed var(--pm-line); }
.ns-total span { font-weight: 600; }
.ns-total strong { font-family: "Fraunces", Georgia, serif; font-size: 1.8rem; font-weight: 600; color: var(--pm-sea); font-variant-numeric: tabular-nums; }
.ns-amount { display: flex; gap: 8px; }
.ns-amount .pm-btn { height: 46px; }
.ns-methods { border: 0; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ns-methods legend { grid-column: 1 / -1; }
.ns-method { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--pm-input-line); border-radius: 10px;
  cursor: pointer; font-size: .88rem; margin: 0; background: var(--pm-card); }
.ns-method input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ns-method i { color: var(--pm-sea); }
.ns-method:has(input:checked) { border-color: var(--pm-sea); background: var(--pm-sea-soft); font-weight: 600; }
.ns-method:focus-within { box-shadow: 0 0 0 4px var(--pm-ring); }
.ns-folio .pm-field + .pm-field, .ns-folio #refBox, .ns-folio #phoneBox { margin-top: 14px; }
.ns-submit { width: 100%; justify-content: center; height: 52px; font-size: 1rem; margin: 20px 0 10px; }
@media (max-width: 1199px) { .ns-grid { grid-template-columns: minmax(0, 1fr); } .ns-side { position: static; } }
@media (max-width: 575px) { .ns-step { padding: 20px 16px; } .ns-dates { grid-template-columns: 1fr 1fr; } .ns-nights { grid-column: 1 / -1; }
  .ns-room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Availability v2: grouped by room type, whole-column today/weekend, free-room strip ---------- */
.av-card { padding: 0; overflow: hidden; }
.av-bar-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 16px 20px 6px; }
.av-nav { display: flex; align-items: center; gap: 6px; }
.av-range { margin-inline-start: 8px; font-weight: 600; color: var(--pm-ink); white-space: nowrap; }
.av-bar-top .pm-seg { margin-inline-start: auto; }
.av-only { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--pm-ink); cursor: pointer; white-space: nowrap; }
.av-only input { width: 16px; height: 16px; accent-color: var(--pm-sea); }
.av-card .av-legend { padding: 4px 20px 12px; margin: 0; border-bottom: 1px solid var(--pm-line); }
.av-table col.is-today { background: color-mix(in srgb, var(--pm-sea-soft) 70%, transparent); }
.av-table col.is-weekend { background: var(--pm-raise); }
.av-table td.is-today { background: none; }
.av-table thead th { background: var(--pm-card); border-bottom: 1px solid var(--pm-line); }
.av-table thead th.is-today { background: var(--pm-sea-soft); }
.av-table thead th.is-weekend:not(.is-today) { background: var(--pm-raise); }
.av-group th { position: sticky; left: 0; padding: 14px 18px 8px !important; text-align: start; background: var(--pm-card); font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: 1.02rem; color: var(--pm-ink); border-bottom: 1px solid var(--pm-row-line); }
html[dir="rtl"] .av-group th { left: auto; right: 0; }
.av-group-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-inline-end: 8px; vertical-align: 1px; }
.av-group-meta { font-family: "Instrument Sans", sans-serif; font-weight: 400; font-size: .82rem; color: var(--pm-muted); margin-inline-start: 10px; }
.av-room { padding: 8px 16px !important; }
.av-room-no { display: block; font-weight: 700; font-size: 1rem; color: var(--pm-ink); }
.av-room-st { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; color: var(--pm-muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.av-room-st i { width: 7px; height: 7px; border-radius: 50%; background: var(--pm-ok); flex: 0 0 7px; }
.av-room-st.st-occupied i { background: var(--pm-sea); } .av-room-st.st-reserved i { background: #4B8BC6; }
.av-room-st.st-cleaning i { background: #D99A1E; } .av-room-st.st-maintenance i { background: var(--pm-danger); }
.av-table td { height: 50px; background: transparent; }
.av-free a { color: color-mix(in srgb, var(--pm-sea) 22%, transparent); border: 1px dashed transparent; font-size: .8rem; }
.av-free a:hover, .av-free a:focus-visible { font-size: 1rem; }
.av-bar { position: relative; gap: 6px; padding: 0 12px; border-radius: 10px; font-size: .82rem; box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
.av-bar.cont-l { border-start-start-radius: 2px; border-end-start-radius: 2px; margin-inline-start: 0; }
.av-bar.cont-r { border-start-end-radius: 2px; border-end-end-radius: 2px; margin-inline-end: 0; }
.av-bar span { flex: 1; min-width: 0; text-align: start; white-space: nowrap; }
.av-bar em { font-style: normal; font-weight: 500; font-size: .74rem; opacity: .8; white-space: nowrap; }
.av-bar.is-in { background: linear-gradient(180deg, #146A76, var(--pm-sea)); }
.av-bar.is-off { color: var(--pm-slate); font-weight: 500; box-shadow: none; border: 1px solid var(--pm-line);
  background: repeating-linear-gradient(135deg, var(--pm-slate-soft) 0 7px, var(--pm-card) 7px 13px); }
.av-table tfoot th, .av-table tfoot td { position: sticky; bottom: 0; background: var(--pm-raise); border-top: 1px solid var(--pm-line); border-bottom: 0; }
.av-foot-t { font-size: .8rem !important; font-weight: 600 !important; color: var(--pm-muted) !important; }
.av-free-n { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 7px; font-weight: 700; font-size: .84rem;
  background: var(--pm-ok-soft); color: var(--pm-ok); font-variant-numeric: tabular-nums; }
.av-free-n.is-busy { background: var(--pm-warn-soft); color: var(--pm-warn); }
.av-free-n.is-full { background: var(--pm-danger-soft); color: var(--pm-danger); }
.av-table tbody[hidden], .av-table tr[hidden] { display: none; }
.pm-stat .value small { font-size: .55em; color: var(--pm-muted); font-weight: 500; }
@media (max-width: 767.98px) {
  .av-bar-top .pm-seg { margin-inline-start: 0; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .av-range { display: none; }
}
.av-bar.is-short { padding: 0 6px; justify-content: center; } .av-bar.is-short i { display: none; } .av-bar.is-short span { text-align: center; text-overflow: clip; }

/* ---------- Check-in v2: step bar, quick nights, +/- counters, tucked-away extras ---------- */
.ns-progress { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 18px; padding: 0;
  background: var(--pm-card); border: 1px solid var(--pm-line); border-radius: 14px; overflow: hidden; position: sticky; top: 72px; z-index: 20;
  box-shadow: 0 8px 20px -18px rgba(16, 24, 40, .5); }
.ns-progress li + li { border-inline-start: 1px solid var(--pm-line); }
.ns-progress a { display: flex; align-items: center; gap: 12px; padding: 12px 18px; color: var(--pm-ink); text-decoration: none; min-width: 0; }
.ns-progress a:hover { background: var(--pm-raise); }
.ns-pg-n { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem;
  border: 2px solid var(--pm-input-line); color: var(--pm-muted); }
.ns-pg-t { display: flex; flex-direction: column; min-width: 0; font-weight: 600; font-size: .92rem; line-height: 1.25; }
.ns-pg-t small { font-weight: 400; font-size: .78rem; color: var(--pm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-progress li.is-done .ns-pg-n { background: var(--pm-sea); border-color: var(--pm-sea); color: transparent; position: relative; }
.ns-progress li.is-done .ns-pg-n::after { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.05rem; }
.ns-progress li.is-done small { color: var(--pm-sea); }
.ns-step { scroll-margin-top: 150px; }
.ns-folio { scroll-margin-top: 150px; }
.ns-side { top: 150px !important; }
.ns-guest-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ns-more { margin-top: 16px; border-top: 1px dashed var(--pm-line); padding-top: 12px; }
.ns-more summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--pm-sea); list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.ns-more summary::-webkit-details-marker { display: none; }
.ns-more[open] summary { margin-bottom: 14px; }
.ns-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -10px 0 20px; }
.ns-chips button { height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--pm-input-line); background: var(--pm-card); color: var(--pm-ink); font-size: .84rem; font-weight: 500; }
.ns-chips button:hover { border-color: var(--pm-sea); color: var(--pm-sea); background: var(--pm-sea-soft); }
.ns-extra { margin-top: 22px; }
.ns-step-num { display: flex; align-items: stretch; height: 46px; border: 1px solid var(--pm-input-line); border-radius: 10px; overflow: hidden; background: var(--pm-card); }
.ns-step-num button { flex: 0 0 46px; border: 0; background: var(--pm-raise); color: var(--pm-ink); font-size: 1.1rem; }
.ns-step-num button:hover { background: var(--pm-sea-soft); color: var(--pm-sea); }
.ns-step-num input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; text-align: center; font-weight: 600; font-size: 1rem; background: transparent; color: var(--pm-ink); -moz-appearance: textfield; padding: 0 !important; }
.ns-step-num input::-webkit-outer-spin-button, .ns-step-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ns-step-num:focus-within { border-color: var(--pm-sea); box-shadow: 0 0 0 4px var(--pm-ring); }
@media (max-width: 991px) {
  .ns-progress { top: 60px; }
  .ns-progress a { padding: 10px 12px; gap: 8px; }
  .ns-pg-t small { display: none; }
}
@media (max-width: 767px) {
  .ns-guest-fields { grid-template-columns: 1fr; }
  .ns-progress .ns-pg-t { font-size: .8rem; }
}

/* ---------- generic form page ---------- */
.pm-formpage { max-width: 880px; padding: 26px 28px; }
.pm-formpage-head { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.pm-formpage-head h2 { font-family: "Fraunces", Georgia, serif; font-size: 1.2rem; font-weight: 600; margin: 0; color: var(--pm-ink); }
.pm-formpage-head p { margin: 2px 0 0; color: var(--pm-muted); font-size: .88rem; }
.pm-formpage-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--pm-line); }
.pm-field select, .pm-field input:not([type=checkbox]):not([type=radio]):not([type=file]), .pm-field textarea { width: 100%; }

/* ---------- stock & expenses ---------- */
.inv-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 18px; }
.inv-nav a { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--pm-line); background: var(--pm-card);
  color: var(--pm-ink); text-decoration: none; font-size: .88rem; font-weight: 500; }
.inv-nav a i { color: var(--pm-sea); }
.inv-nav a:hover { border-color: var(--pm-sea); }
.inv-nav a.is-on { background: var(--pm-sea); border-color: var(--pm-sea); color: #fff; } .inv-nav a.is-on i { color: #fff; }
.inv-form { padding: 22px 24px; }
.inv-lines { width: 100%; border-collapse: collapse; margin-top: 18px; }
.inv-lines th { text-align: start; font-size: .82rem; font-weight: 600; color: var(--pm-muted); padding: 8px 6px; border-bottom: 1px solid var(--pm-line); }
.inv-lines td { padding: 6px; border-bottom: 1px solid var(--pm-row-line); }
.inv-lines .num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-lines tfoot td { border: 0; padding-top: 12px; }
.inv-in { width: 100%; height: 42px; padding: 0 10px; border: 1px solid var(--pm-input-line); border-radius: 9px; background: var(--pm-card); color: var(--pm-ink); font: inherit; }
.inv-in:focus { outline: none; border-color: var(--pm-sea); box-shadow: 0 0 0 3px var(--pm-ring); }
.inv-unit { display: flex; align-items: center; gap: 6px; } .inv-unit span { color: var(--pm-muted); font-size: .82rem; min-width: 46px; }
.inv-list { list-style: none; margin: 0; padding: 0; }
.inv-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--pm-row-line); font-size: .92rem; }
.inv-list li:last-child { border-bottom: 0; }
.inv-list li.is-short span:last-child { color: var(--pm-danger); font-weight: 600; }
.inv-pad { padding: 4px 24px 18px; }
.inv-needs { padding: 6px 24px 0; }
.inv-ing { display: inline-block; margin: 2px 6px 2px 0; padding: 2px 9px; border-radius: 99px; background: var(--pm-mist); font-size: .8rem; white-space: nowrap; }
.inv-ing b { font-weight: 600; color: var(--pm-sea); }
.inv-low a { color: inherit; text-decoration: underline; }
.is-bad-text { color: var(--pm-danger); } .is-ok-text { color: var(--pm-ok); } .is-warn-text { color: var(--pm-warn); }
tr.is-muted td { opacity: .55; }
.pm-seg a { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 8px; color: var(--pm-muted); text-decoration: none; font-size: .88rem; font-weight: 500; }
.pm-seg a.is-on { background: var(--pm-card); color: var(--pm-ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.pm-check-row { display: inline-flex; gap: 8px; align-items: center; font-size: .9rem; cursor: pointer; }
@media (max-width: 767.98px) { .inv-lines thead { display: none; } .inv-lines tr { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--pm-line); }
  .inv-lines td { border: 0; padding: 0; } .inv-lines td:first-child { grid-column: 1 / -1; } }
.z-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.z-grid .pm-panel .inv-list { padding: 0 2px; }
.inv-list li.z-total { font-weight: 700; border-top: 1px solid var(--pm-line); border-bottom: 0; }
@media (max-width: 1199px) { .z-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .z-grid { grid-template-columns: 1fr; } }
@media print { .z-grid { grid-template-columns: repeat(2, 1fr); } }
.ns-errors ul { margin: 6px 0 0; padding-inline-start: 18px; } .ns-errors { margin-bottom: 16px; }

/* two-column page with a side form (shared) */
.tm-ico { color: var(--pm-sea); margin-inline-end: 8px; font-size: 1rem; }
.tm-area .pm-card-head .sub, .tm-form .pm-card-head .sub { margin: 0; color: var(--pm-muted); font-size: .86rem; }
.tm-form { margin-bottom: 18px; }
.tm-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 16px 24px 4px; }
.tm-fields .span-2 { grid-column: 1 / -1; }
.tm-foot { display: flex; justify-content: flex-end; padding: 14px 24px 22px; }
.tm-layout { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 991px) { .tm-layout { grid-template-columns: minmax(0, 1fr); } }

/* ---------- M-Pesa waiting page ---------- */
.mw-card { max-width: 540px; margin: 24px auto 0; padding: 0; overflow: hidden; text-align: center; }
.mw-amount { padding: 18px 24px; background: var(--pm-mist); border-bottom: 1px solid var(--pm-line); display: flex; flex-direction: column; gap: 2px; }
.mw-amount span { font-size: .8rem; color: var(--pm-muted); font-weight: 600; letter-spacing: .02em; }
.mw-amount b { font-family: "Fraunces", Georgia, serif; font-size: 2rem; color: var(--pm-ink); }
.mw-amount small { color: var(--pm-muted); }
.mw-state { padding: 26px 28px 10px; }
.mw-state h1 { font-family: "Fraunces", Georgia, serif; font-size: 1.45rem; font-weight: 600; margin: 12px 0 6px; color: var(--pm-ink); }
.mw-state p { color: var(--pm-muted); margin: 0 0 8px; }
.mw-ico { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; }
.mw-state.is-wait .mw-ico { background: var(--pm-ok-soft); color: var(--pm-ok); animation: mwPulse 1.6s ease-in-out infinite; }
.mw-state.is-ok .mw-ico { background: var(--pm-ok); color: #fff; }
.mw-state.is-bad .mw-ico { background: var(--pm-danger-soft); color: var(--pm-danger); }
@keyframes mwPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 138, 112, .35); } 50% { box-shadow: 0 0 0 14px rgba(31, 138, 112, 0); } }
.mw-live { font-size: .88rem; }
.mw-retry, .mw-manual { text-align: start; margin: 12px 24px 0; }
.mw-row { display: flex; gap: 8px; align-items: stretch; }
.mw-row .pm-ico input { width: 100%; }
.mw-manual { border: 1px dashed var(--pm-line); border-radius: 12px; padding: 12px 14px; }
.mw-manual summary { cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--pm-sea); }
.mw-manual[open] summary { margin-bottom: 10px; }
.mw-foot { display: flex; justify-content: center; padding: 16px 24px 22px; }
.mw-foot .pm-btn.is-danger-text { color: var(--pm-danger); }
@media (prefers-reduced-motion: reduce) { .mw-state.is-wait .mw-ico { animation: none; } }
.mw-row.pm-field { flex-direction: row; margin: 0; } .mw-row .pm-btn { height: 46px; white-space: nowrap; }
.gx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.gx-grid .gx-span { grid-column: 1 / -1; }
.gx-grid .pm-help:empty { display: none; }
@media (max-width: 575.98px) { .gx-grid { grid-template-columns: 1fr; } }
