/* eResidensi member portal — design tokens follow _content/eResidensi Participant Dashboard.html */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: oklch(0.985 0.004 265);
  --ink: oklch(0.24 0.02 340);
  --muted: oklch(0.5 0.015 265);
  --line: oklch(0.91 0.008 265);
  --line-soft: oklch(0.955 0.006 265);
  --surface: #fff;
  --pill-bg: oklch(0.93 0.008 265);

  --accent: oklch(0.5 0.17 340);
  --accent-hover: oklch(0.4 0.17 340);
  --accent-soft: oklch(0.96 0.02 340);
  --accent-soft-line: oklch(0.9 0.03 340);
  --dark: oklch(0.22 0.06 340);

  --green: oklch(0.55 0.14 150);
  --green-bg: oklch(0.97 0.03 150);
  --green-line: oklch(0.88 0.06 150);
  --green-ink: oklch(0.36 0.09 150);
  --green-dot: oklch(0.75 0.13 150);

  --red: oklch(0.5 0.16 25);
  --red-bg: oklch(0.975 0.04 25);
  --red-line: oklch(0.82 0.11 25);
  --red-ink: oklch(0.42 0.16 25);
  --red-dot: oklch(0.68 0.17 25);

  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { cursor: pointer; }
img { max-width: 100%; }

/* Small Bootstrap-utility-compatible classes for pages that don't load
   Bootstrap itself. Kept deliberately weak (no !important, defined early)
   so a more specific component rule declared later — e.g. .cartbar's own
   var(--dark) background — still wins over these where one exists. */
.bg-dark { background-color: #343a40; }
.text-white { color: #fff; }

.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--green);
}

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- login ---------- */
.login-shell {
  min-height: 100vh; display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}
.login-form-side { display: grid; place-items: center; padding: clamp(28px, 5vw, 64px); }
.login-card { width: 100%; max-width: 480px; animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.login-brand { display: flex; align-items: center; gap: 10px; }
.login-brand img.icon { height: 40px; width: auto; display: block; }
.login-brand img.wordmark { height: 21px; width: auto; display: block; }
.login-org { margin-top: 26px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.login-card h1 { margin: 12px 0 0; font-size: 30px; line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; }
.login-card p.sub { margin: 12px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--muted); }
.login-fields { margin-top: 26px; display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field span { font-size: 13.5px; font-weight: 600; color: oklch(0.36 0.02 340); }
.field input {
  padding: 13px 15px; border-radius: 11px; border: 1px solid oklch(0.89 0.01 265); background: #fff;
  font: inherit; font-size: 15px; width: 100%;
}
.btn-primary:not(.btn) {
  padding: 15px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; font: inherit;
  font-size: 15.5px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 26px oklch(0.5 0.17 340 / 0.26);
  transition: transform .18s cubic-bezier(.2,.8,.2,1); width: 100%;
}
.btn-primary:not(.btn):hover { transform: translateY(-2px); }
.btn-outline {
  padding: 14px; border-radius: 12px; border: 1px solid oklch(0.89 0.01 265); background: #fff; font: inherit;
  font-size: 14.5px; font-weight: 600; cursor: pointer; transition: border-color .18s; width: 100%;
}
.btn-outline:hover { border-color: oklch(0.6 0.14 340); }
.login-links { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.lang-pill { display: flex; padding: 3px; border-radius: 999px; background: var(--pill-bg); font-family: var(--mono); font-size: 11.5px; }
.lang-pill a {
  padding: 5px 11px; border-radius: 999px; border: 0; cursor: pointer; font: inherit; color: var(--muted);
  transition: background .18s, color .18s; display: inline-block;
}
.lang-pill a.active { background: #fff; color: oklch(0.28 0.05 340); box-shadow: 0 1px 3px oklch(0.3 0.03 340 / 0.18); }

.login-hero {
  position: relative; background: var(--dark); overflow: hidden; min-height: 320px;
  margin: 0; padding: 0; border: 0;
}
.login-hero img {
  display: block; width: 100%; height: 100%; min-height: 320px; object-fit: cover;
  margin: 0; padding: 0; border: 0;
}
.login-error { margin: 0 0 16px; padding: 12px 15px; border-radius: 10px; background: var(--red-bg); border: 1px solid var(--red-line); color: var(--red-ink); font-size: 14px; }

/* ---------- app shell ---------- */
header.app-header {
  position: sticky; top: 0; z-index: 40; background: oklch(0.985 0.004 265 / 0.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.app-header-top {
  max-width: 1180px; margin: 0 auto; padding: 12px clamp(16px, 4vw, 28px); display: flex; align-items: center;
  gap: 16px; flex-wrap: wrap; row-gap: 10px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand img.icon { height: 30px; width: auto; display: block; }
.brand img.wordmark { height: 16px; width: auto; display: block; }
.divider-v { height: 26px; width: 1px; background: oklch(0.9 0.01 265); }
.org-name { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; max-width: 26em; line-height: 1.3; }
.spacer { flex: 1; }
.header-right { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 32px; height: 32px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-soft-line);
  display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: oklch(0.45 0.12 340);
}
.cart-icon-link {
  position: relative; display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
  width: 32px; height: 32px;
}
.cart-icon-link:hover { color: var(--accent); }
.cart-badge {
  position: absolute; top: -6px; right: -8px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: #fff; font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* toast */
.member-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(10px); z-index: 100;
  background: var(--dark); color: #fff; padding: 13px 20px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: 0 14px 34px oklch(0.2 0.04 340 / 0.3); display: flex; align-items: center; gap: 10px; opacity: 0;
  transition: opacity .22s ease, transform .22s ease; pointer-events: none;
}
.member-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.member-toast .icon { color: var(--green-dot); flex-shrink: 0; }
.header-right a.referral { font-size: 13.5px; font-weight: 600; }
.logout-link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 600; color: oklch(0.4 0.02 340); }

.tabnav-wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 28px); min-width: 0; }
nav.tabnav { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
nav.tabnav::-webkit-scrollbar { display: none; }

/* Grab-to-scroll: any horizontally-overflowing strip (tab nav, wide tables) */
.hscroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
  cursor: grab; user-select: none;
  scrollbar-width: none; -ms-overflow-style: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll.dragging { cursor: grabbing; scroll-behavior: auto; }
.hscroll.dragging * { pointer-events: none; }
nav.tabnav a {
  padding: 13px 15px; border: 0; background: none; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; color: oklch(0.48 0.015 265); font-weight: 500; display: inline-block;
}
nav.tabnav a.active { border-color: var(--accent); color: var(--accent); font-weight: 700; }

/* "Maklumat Penting" dropdown — trigger sits inline inside the scrolling tab
   strip, but the panel itself is a sibling of nav.tabnav (not a descendant)
   so it is positioned/sized by JS against .tabnav-wrap and is never clipped
   by the tab strip's own horizontal scrollbox. */
.tabnav-wrap { position: relative; }
.tabnav-item { display: inline-flex; align-items: center; flex: none; }
.tab-caret {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-left: -4px; border: 0; background: none; padding: 0;
  color: oklch(0.48 0.015 265); cursor: pointer; border-radius: 8px; flex: none;
}
.tab-caret:hover { color: var(--accent); background: var(--accent-soft); }
.tab-caret[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); }
.tab-caret svg { transition: transform .16s ease; }
.tab-caret[aria-expanded="true"] svg { transform: rotate(180deg); }
.tab-dropdown {
  display: none; position: absolute; z-index: 45; min-width: 220px;
  max-width: min(320px, calc(100vw - 32px)); padding: 8px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 14px 34px oklch(0.2 0.04 340 / 0.16);
}
.tab-dropdown.open { display: block; }
.tab-dropdown a {
  display: block; padding: 10px 12px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink);
}
.tab-dropdown a:hover { background: var(--accent-soft); color: var(--accent); }

main.app-main { max-width: 1180px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 28px) 40px; }
h1.page-title { margin: 0; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; }
p.page-sub { margin: 8px 0 0; font-size: 15px; color: var(--muted); max-width: 44em; }

/* lapsed banner */
.banner-warn {
  padding: 20px 24px; border-radius: 16px; background: var(--red-bg); border: 1px solid var(--red-line);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.banner-warn .eyebrow { color: var(--red); }
.banner-warn .msg { margin-top: 7px; font-size: 17px; font-weight: 700; color: var(--red-ink); }
.btn-warn {
  padding: 13px 22px; border-radius: 11px; border: 0; background: var(--red); color: #fff; font: inherit;
  font-size: 14.5px; font-weight: 700; transition: transform .18s cubic-bezier(.2,.8,.2,1);
}
.btn-warn:hover { transform: translateY(-2px); }

/* cards */
.card {
  padding: 26px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
}
.card-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.badge-linked {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; background: var(--green-bg);
  font-size: 12px; font-weight: 600; color: var(--green-ink);
}
.badge-linked .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--green-dot); }
dl.field-list { margin: 18px 0 0; display: grid; gap: 13px; }
dl.field-list .row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
dl.field-list dt { font-size: 13.5px; color: var(--muted); }
dl.field-list dd { margin: 0; font-size: 14px; font-weight: 700; text-align: right; }
.card-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.chip-btn { padding: 11px 17px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; }
.chip-btn:hover { color: #fff; }
.chip-btn.outline { background: var(--accent-soft); border: 1px solid var(--accent-soft-line); color: var(--ink); }

/* home grid */
.home-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.year-pill { display: flex; padding: 4px; border-radius: 999px; background: var(--pill-bg); }
.year-pill a { padding: 8px 15px; border-radius: 999px; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); display: inline-block; }
.year-pill a.active { background: #fff; color: oklch(0.28 0.05 340); box-shadow: 0 1px 3px oklch(0.3 0.03 340 / 0.18); }

.month-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; }
.month-cell {
  text-align: left; cursor: pointer; font: inherit; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: oklch(0.3 0.02 340); transition: transform .16s cubic-bezier(.2,.8,.2,1), border-color .16s, background .16s;
}
.month-cell .m-label { display: block; font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.month-cell .m-tag { display: block; margin-top: 7px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; }
.month-cell .m-paid-date { display: block; margin-top: 3px; font-family: var(--mono); font-size: 10px; opacity: 0.7; }
.month-cell.state-paid { background: var(--green-bg); border-color: var(--green-line); color: var(--green-ink); cursor: default; }
.month-cell.state-due { background: var(--red-bg); border-color: var(--red-line); color: var(--red-ink); }
.month-cell.state-on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px oklch(0.5 0.17 340 / 0.24); }
.month-cell.state-open:hover, .month-cell.state-due:hover { transform: translateY(-2px); }

.grid-legend { margin-top: 18px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.grid-legend span.item { display: flex; align-items: center; gap: 7px; }
.grid-legend .dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.quicklinks { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.quicklink {
  text-align: left; cursor: pointer; font: inherit; padding: 22px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--line); display: grid; gap: 8px; transition: transform .2s cubic-bezier(.2,.8,.2,1), border-color .2s;
}
.quicklink:hover { transform: translateY(-4px); border-color: oklch(0.7 0.12 340); }
.quicklink .t { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.quicklink .d { font-size: 13.5px; color: var(--muted); }

/* fee / donate / shop lists */
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.search-input { padding: 12px 15px; border-radius: 11px; border: 1px solid oklch(0.89 0.01 265); background: #fff; font: inherit; font-size: 14.5px; min-width: 240px; }
.fee-list { margin-top: 20px; display: grid; gap: 10px; }
.fee-row {
  padding: 20px 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex;
  align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; transition: border-color .18s;
}
.fee-row:hover { border-color: oklch(0.82 0.06 340); }
.fee-row .desc { font-size: 16px; font-weight: 700; letter-spacing: -0.015em; }
.fee-row .period { margin-top: 5px; font-family: var(--mono); font-size: 12px; color: oklch(0.52 0.015 265); }
.fee-row .amt { font-size: 19px; font-weight: 800; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.fee-row-right { display: flex; align-items: center; gap: 18px; }
.btn-add {
  padding: 12px 20px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 700;
  transition: transform .18s cubic-bezier(.2,.8,.2,1); background: var(--accent); border: 0; color: #fff;
}
.btn-add:hover { transform: translateY(-2px); }
.btn-add.added { background: var(--green-bg); border: 1px solid var(--green-line); color: var(--green-ink); }
.count-note { margin: 16px 0 0; font-family: var(--mono); font-size: 11.5px; color: oklch(0.6 0.01 265); }

.donate-row { padding: 22px; }
.donate-input { width: 130px; padding: 12px 14px; border-radius: 10px; border: 1px solid oklch(0.89 0.01 265); font: inherit; font-size: 14.5px; text-align: right; }
.btn-add[disabled] { background: oklch(0.94 0.008 265); color: oklch(0.62 0.01 265); cursor: not-allowed; }
.btn-add[disabled]:hover { transform: none; }

.shop-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.shop-card { padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; }
.shop-card .t { font-size: 17.5px; font-weight: 700; letter-spacing: -0.02em; }
.shop-card .note { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.shop-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }


/* eCard */
.ecard-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.ecard {
  position: relative; overflow: hidden; padding: 28px; border-radius: 20px; background: var(--dark); color: #fff;
  min-height: 220px; display: flex; flex-direction: column; justify-content: space-between;
}
.ecard::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 88% 12%, oklch(0.6 0.14 150 / 0.26), transparent 70%),
              radial-gradient(50% 70% at 10% 92%, oklch(0.55 0.18 20 / 0.24), transparent 70%);
}
.ecard-top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ecard-top .eyebrow { color: oklch(0.82 0.06 340); font-size: 10px; }
.ecard-top .org { margin-top: 9px; font-size: 14px; font-weight: 600; max-width: 22em; line-height: 1.35; }
.ecard-top img { height: 40px; width: auto; opacity: .95; }
.ecard-bottom { position: relative; }
.ecard-bottom .name { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.ecard-bottom .meta { margin-top: 8px; display: flex; gap: 22px; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; color: oklch(0.88 0.03 340); }

/* news */
.news-list { margin-top: 20px; display: grid; gap: 14px; max-width: 820px; }
.news-item { padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.news-item .meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.news-item .d { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.news-item h3 { margin: 12px 0 0; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.news-item p { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: oklch(0.45 0.015 265); }

/* cart bar */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 14px clamp(16px, 4vw, 28px) 18px;
  /* background/color now come from the .bg-dark/.text-white classes on the element itself */
  box-shadow: 0 -12px 34px oklch(0.2 0.04 340 / 0.24);
  animation: rise .24s cubic-bezier(.2,.7,.2,1) both;
}
.cartbar-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cartbar .eyebrow { color: oklch(0.82 0.06 340); }
.cartbar .label { margin-top: 6px; font-size: 14.5px; color: oklch(0.9 0.02 340); max-width: 52em; line-height: 1.4; }
.cartbar-right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.link-clear { background: none; border: 0; padding: 0; font: inherit; font-size: 13.5px; color: oklch(0.85 0.04 340); cursor: pointer; display: inline-flex; align-items: center; }
.link-clear:hover { color: #fff; }
.cartbar .total-figure { margin-top: 3px; font-size: 27px; font-weight: 800; letter-spacing: -0.035em; }
.btn-checkout {
  padding: 15px 26px; border-radius: 12px; border: 0; background: #fff; color: var(--dark); font: inherit; font-size: 15px;
  font-weight: 700; transition: transform .18s cubic-bezier(.2,.8,.2,1);
}
.btn-checkout:hover { transform: translateY(-2px); color: var(--dark); }

/* footer */
footer.app-footer { border-top: 1px solid oklch(0.32 0.07 340); background: var(--dark); color: oklch(0.97 0.006 340); margin-top: 40px; }
.footer-grid { max-width: 1180px; margin: 0 auto; padding: 44px clamp(16px, 4vw, 28px); display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 32px; }
.footer-grid .org-block .name { font-size: 15px; font-weight: 700; line-height: 1.4; max-width: 22em; }
.footer-grid .org-block .reg { margin-top: 8px; font-family: var(--mono); font-size: 11.5px; color: oklch(0.8 0.05 340); }
.footer-grid .addr { font-size: 14px; line-height: 1.75; color: oklch(0.94 0.01 340); }
.footer-grid .links { display: grid; gap: 9px; font-size: 14px; align-content: start; }
.footer-grid .links a { color: oklch(0.95 0.008 340); }
.footer-grid .links a:hover { color: oklch(0.8 0.12 340); }
.footer-powered { display: flex; align-items: flex-start; gap: 9px; }
.footer-powered .eyebrow { color: oklch(0.8 0.05 340); padding-top: 6px; }
.footer-powered img { height: 15px; width: auto; margin-top: 7px; }

/* misc */
.text-nowrap { white-space: nowrap; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 620px) {
  .fee-row, .shop-card .foot { align-items: flex-start; }
}

/* ---------- SweetAlert2 theming ----------
   Many legacy call sites (custom/js/custom.js) pass an explicit, hardcoded
   confirmButtonColor, which SweetAlert2 applies as an inline style — plain
   CSS can't win against that without !important, so it's used deliberately
   here rather than as a smell. Icon colours (success/warning/error) are left
   alone since they carry meaning, not brand. */
.swal2-popup { border-radius: 20px !important; font-family: var(--sans) !important; }
.swal2-title { font-family: var(--sans) !important; }
.swal2-styled.swal2-confirm {
  background-color: var(--accent) !important;
  box-shadow: 0 10px 26px oklch(0.5 0.17 340 / 0.26) !important;
}
.swal2-styled.swal2-confirm:focus { box-shadow: 0 0 0 3px var(--accent-soft) !important; }
.swal2-styled.swal2-deny { background-color: var(--red) !important; }
.swal2-styled.swal2-cancel { background-color: oklch(0.9 0.008 265) !important; color: var(--ink) !important; }
.swal2-actions .swal2-styled { border-radius: 10px !important; }

/* ---------- Bootstrap / BootstrapDialog modal headers ----------
   BootstrapDialog reuses Bootstrap's own .modal-header class for its
   header bar, so this one rule covers both. */
.modal-header {
  background: var(--accent) !important;
  color: #fff;
  border-bottom: 0;
}
.modal-header .modal-title,
.modal-header .bootstrap-dialog-title { color: #fff; }
.modal-header .close {
  color: #fff;
  opacity: 0.85;
  text-shadow: none;
}
.modal-header .close:hover { color: #fff; opacity: 1; }
/* BootstrapDialog nests its own header/close-button/title markup inside
   .modal-header, with the close button appearing first in DOM order — force
   it to the far right (and the title to fill the remaining space) with flex
   + order, since its own float:right doesn't win once .modal-header (a flex
   container in Bootstrap 4) is involved. */
.bootstrap-dialog-header { display: flex; align-items: center; width: 100%; }
.bootstrap-dialog-header .bootstrap-dialog-title { order: 1; flex: 1; }
.bootstrap-dialog-header .bootstrap-dialog-close-button { order: 2; float: none; margin-left: 16px; }
/* Footer buttons: the "close/cancel" action is always styled btn-danger in
   this codebase's BootstrapDialog calls — pin it to the left regardless of
   whichever float-left/float-right classes a given call site also set. */
.bootstrap-dialog-footer-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.bootstrap-dialog-footer-buttons .btn-danger { order: -1; margin-right: auto; float: none !important; }
.bootstrap-dialog-footer-buttons .btn:not(.btn-danger) { float: none !important; }
