/* PICKLE GANG — sports theme. Colours come from the two brand variables (editable under Admin > Settings). */
:root {
  --pg-dark: #0f2a1d; --pg-lime: #c6f135; --pg-green: #1f9d57; --pg-ink: #14231a; --pg-bg: #f3f6f2;
  --st-available: #1e9e55; --st-occupied: #d63a3a; --st-closed: #3b4048; --st-maint: #f2c200;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* Navigation tokens: ALL navbars (public, sidebar, topbar) read these. Solid colours only - no rgba / opacity / blur. */
:root {
  --nav-bg: var(--pg-dark);
  --nav-fg: #ffffff;                 /* >= 14:1 on the default dark green */
  --nav-fg-soft: #e6f1ea;            /* secondary text (role, tagline) - still >= 11:1 */
  --nav-hover-bg: #1f4a33;           /* fallback for browsers without color-mix */
  --nav-border: #3b7a57;
  --nav-active-bg: var(--pg-lime);
  --nav-active-fg: #10200f;
  --nav-z: 1030;                     /* above page content, below Bootstrap offcanvas (1045) / modal (1055) / dropdown (1000+ inside) */
}
@supports (background: color-mix(in srgb, red, blue)) { :root { --nav-hover-bg: color-mix(in srgb, var(--pg-dark) 78%, #ffffff 22%); } }
html { scroll-padding-top: 84px; } body { overflow-x: hidden; }
body { background: var(--pg-bg); color: var(--pg-ink); }
a { color: #137a43; }
.display-title, .section-title, .brand-name, .hero h1, .booking-id, .confirm-brand { font-family: "Arial Black", Impact, system-ui, sans-serif; letter-spacing: .02em; }
.section-title { font-size: 1.6rem; text-transform: uppercase; }

/* ---------- buttons ---------- */
.btn-lime { background: var(--pg-lime); color: #10200f; border: 2px solid var(--pg-lime); font-weight: 800; letter-spacing: .03em; }
.btn-lime:hover, .btn-lime:focus { background: #d8ff55; border-color: #d8ff55; color: #0b1a0a; }
.btn-outline-lime { color: var(--pg-lime); border: 2px solid var(--pg-lime); font-weight: 700; }
.btn-outline-lime:hover { background: var(--pg-lime); color: #10200f; }

/* ---------- public site ---------- */
.site-nav {
  /* Root-cause fix: Bootstrap's navbar-dark makes links 55% white and the toggler border 10% white. Override the variables. */
  --bs-navbar-color: var(--nav-fg); --bs-navbar-hover-color: var(--nav-fg); --bs-navbar-active-color: var(--nav-active-fg);
  --bs-navbar-brand-color: var(--nav-fg); --bs-navbar-brand-hover-color: var(--nav-fg);
  --bs-navbar-toggler-border-color: var(--nav-fg); --bs-navbar-padding-y: .55rem;
  background: var(--nav-bg); opacity: 1; visibility: visible; filter: none; backdrop-filter: none;
  position: sticky; top: 0; z-index: var(--nav-z);
  border-bottom: 3px solid var(--pg-lime); box-shadow: 0 3px 10px rgba(0,0,0,.25);
}
.logo-mark { width: 42px; height: 42px; border-radius: 10px; object-fit: contain; background: var(--nav-bg); flex: none; }
.brand-name { display: block; color: var(--pg-lime); font-size: 1.15rem; line-height: 1.1; }
.brand-tag { display: block; font-size: .66rem; letter-spacing: .2em; color: var(--nav-fg-soft); font-weight: 600; }
.site-nav .navbar-brand { display: flex; align-items: center; gap: .6rem; white-space: normal; min-width: 0; flex: 1 1 auto; max-width: calc(100% - 64px); margin-right: .5rem; }
.site-nav .navbar-brand > span { min-width: 0; } .site-nav .brand-name, .site-nav .brand-tag { overflow-wrap: anywhere; }
@media (min-width: 1200px) { .site-nav .navbar-brand { flex: 0 0 auto; max-width: none; white-space: nowrap; } }
.site-nav .navbar-toggler { border-width: 2px; padding: .35rem .55rem; }
.site-nav .navbar-toggler:focus { box-shadow: 0 0 0 3px var(--pg-lime); }
.site-nav .navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }
.site-nav .nav-link { color: var(--nav-fg); font-weight: 700; padding: .5rem .75rem; border-radius: 8px; white-space: nowrap; }
.site-nav .nav-link:hover, .site-nav .nav-link:focus-visible { background: var(--nav-hover-bg); color: var(--nav-fg); }
.site-nav .nav-link.active { background: var(--nav-active-bg); color: var(--nav-active-fg); }
.site-nav .nav-cta { font-weight: 800; padding: .45rem .8rem; white-space: nowrap; }
.site-nav .btn-outline-light { border-width: 2px; color: var(--nav-fg); border-color: var(--nav-fg); }
.site-nav .btn-outline-light:hover { background: var(--nav-fg); color: var(--pg-dark); }
.site-nav .btn-lime.active { box-shadow: 0 0 0 3px #ffffff; }
@media (max-width: 1199.98px) {
  /* mobile menu: same solid panel, separated from the bar, never transparent */
  .site-nav .navbar-collapse { background: var(--nav-bg); border-top: 1px solid var(--nav-border); margin-top: .6rem; padding: .6rem 0 .4rem; max-height: calc(100vh - 90px); overflow-y: auto; }
  .site-nav .nav-link { padding: .75rem .9rem; font-size: 1.02rem; }
  .site-nav .nav-item { margin-bottom: .25rem; } .site-nav .nav-cta { width: 100%; padding: .65rem .9rem; }
}
.hero { background: radial-gradient(circle at 80% 20%, #1c5a3a 0, var(--pg-dark) 60%); color: #fff; padding: 4rem 0 3.5rem; text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 9.5vw, 4.5rem); color: var(--pg-lime); margin: 0; overflow-wrap: anywhere; letter-spacing: .01em; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .3em; font-size: .8rem; color: #cfe3d4; }
.hero-tag { letter-spacing: .35em; font-weight: 700; margin: .4rem 0 1.5rem; }
.open-hours { display: inline-block; background: #ffffff14; border: 1px solid #ffffff33; border-radius: 16px; padding: .9rem 1.6rem; }
.oh-title { font-weight: 800; letter-spacing: .12em; color: var(--pg-lime); }
.oh-line { font-size: 1.3rem; font-weight: 700; }
.steps .step { display: flex; gap: .8rem; align-items: center; background: #fff; border-radius: 14px; padding: 1rem; box-shadow: 0 2px 10px rgba(0,0,0,.06); height: 100%; }
.step .num { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--pg-dark); color: var(--pg-lime); display: grid; place-items: center; font-size: 1.3rem; }
.step .t { font-weight: 700; } .step .d { font-size: .85rem; color: #5a6a60; }
.panel { background: #fff; border-radius: 16px; padding: 1.25rem; box-shadow: 0 2px 12px rgba(0,0,0,.07); }
.court-card { background: #fff; border-radius: 16px; padding: 1.4rem; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,.07); border-top: 5px solid var(--pg-lime); }
.court-ico { font-size: 2rem; color: var(--pg-green); } .court-name { font-weight: 900; font-size: 1.4rem; }
.site-footer { background: var(--pg-dark); color: #cfe3d4; } .foot-brand { color: var(--pg-lime); font-weight: 900; letter-spacing: .1em; } .foot-tag { letter-spacing: .3em; font-size: .75rem; }
.avail-date { font-weight: 800; } .loading { opacity: .5; transition: opacity .15s; }

/* ---------- availability calendar ---------- */
.avail-table { border-collapse: separate; border-spacing: 6px; }
.avail-table thead th { background: var(--pg-dark); color: var(--pg-lime); text-align: center; border-radius: 10px; padding: .6rem; letter-spacing: .08em; }
.avail-table .time-cell { white-space: nowrap; font-weight: 700; background: transparent; border: 0; }
.slot { text-align: center; border-radius: 12px; padding: 0 !important; min-width: 130px; color: #fff; font-weight: 800; border: 0 !important; }
.slot > .slot-label, .slot > .slot-link { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .7rem .4rem; min-height: 64px; color: inherit; text-decoration: none; }
.slot small { font-weight: 500; font-size: .72rem; opacity: .95; }
.slot-available { background: var(--st-available); } .slot-occupied { background: var(--st-occupied); }
.slot-closed { background: var(--st-closed); } .slot-maintenance { background: var(--st-maint); color: #2b2300; }
a.slot-link:hover { filter: brightness(1.12); box-shadow: 0 0 0 3px var(--pg-lime) inset; border-radius: 12px; }
.slot-legend { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .9rem; font-size: .8rem; font-weight: 700; }
.legend-dot { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: #fff; font-size: .8rem; } .legend-dot.slot-maintenance { color: #2b2300; }
.slot-pill { color: #fff; } .slot-pill.slot-maintenance { color: #2b2300; }
.selected-slot { background: #fff; border: 3px solid var(--pg-lime); border-radius: 16px; padding: 1.2rem; box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.sum-total { font-size: 1.6rem; font-weight: 900; color: var(--pg-green); }

/* ---------- timeline & live cards ---------- */
.timeline { display: flex; flex-direction: column; gap: .6rem; overflow-x: auto; }
.tl-row { display: flex; align-items: stretch; gap: .5rem; min-width: 520px; }
.tl-court { width: 74px; flex: none; font-weight: 800; display: flex; align-items: center; }
.tl-track { display: flex; gap: 3px; flex: 1; }
.tl-seg { flex: 1; min-width: 66px; border-radius: 8px; padding: .35rem .3rem; text-align: center; font-size: .68rem; color: #fff; font-weight: 700; line-height: 1.25; }
.tl-seg.slot-maintenance { color: #2b2300; } .tl-time { display: block; opacity: .9; } .tl-state { display: block; }
.tl-gap { width: 26px; flex: none; background: repeating-linear-gradient(45deg, #cfd5d0, #cfd5d0 4px, #e6eae6 4px, #e6eae6 8px); border-radius: 8px; font-size: 0; }
.live-card { border-radius: 16px; padding: 1rem 1.2rem; color: #fff; height: 100%; }
.live-card.slot-maintenance { color: #2b2300; }
.live-court { font-weight: 900; font-size: 1.3rem; } .live-badge { background: #0003; border-radius: 20px; padding: .15rem .7rem; font-weight: 800; font-size: .8rem; }
.live-body { margin-top: .6rem; font-size: .95rem; } .live-next { margin-top: .5rem; opacity: .95; font-size: .85rem; }

/* ---------- status / confirmation ---------- */
.status-panel { max-width: 540px; background: #fff; border-radius: 18px; padding: 2rem; box-shadow: 0 6px 24px rgba(0,0,0,.1); }
.status-icon { font-size: 3.2rem; }
.booking-id { font-size: 1.7rem; background: var(--pg-dark); color: var(--pg-lime); border-radius: 12px; padding: .35rem 1rem; display: inline-block; word-break: break-all; }
.confirm-page { max-width: 780px; }
.confirm-toolbar { display: flex; gap: .5rem; margin-bottom: 1rem; }
.confirm-sheet { background: #fff; border-radius: 16px; padding: 2rem; box-shadow: 0 4px 20px rgba(0,0,0,.1); text-align: center; }
.confirm-logo { width: 64px; height: 64px; object-fit: contain; }
.confirm-brand { font-size: 1.8rem; letter-spacing: .12em; color: var(--pg-dark); } .confirm-title { letter-spacing: .25em; font-weight: 700; font-size: .85rem; margin-bottom: 1rem; }
.confirm-banner { display: inline-block; padding: .4rem 1.2rem; border-radius: 30px; font-weight: 800; margin-bottom: 1rem; }
.confirm-banner.ok { background: #d9f7e3; color: #0b6b34; } .confirm-banner.wait { background: #fff3cd; color: #7a5b00; } .confirm-banner.bad { background: #fde0e0; color: #9b1c1c; } .confirm-banner.done { background: #e4e7ea; color: #333; }
.confirm-id-label { font-size: .75rem; text-transform: uppercase; color: #666; letter-spacing: .15em; }
.confirm-id { font-size: 1.6rem; margin: .3rem 0 1.2rem; }
.confirm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1.5rem; text-align: left; margin: 1rem 0; }
.confirm-grid dt { font-size: .72rem; text-transform: uppercase; color: #6b7a70; letter-spacing: .08em; margin: 0; } .confirm-grid dd { margin: 0; font-weight: 700; }
.confirm-qr img { width: 200px; height: 200px; } .confirm-qr-caption, .confirm-note { font-size: .8rem; color: #5a6a60; }
.confirm-foot { margin-top: 1.2rem; letter-spacing: .3em; font-weight: 800; font-size: .75rem; color: var(--pg-green); }
.confirm-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.login-wrap { min-height: 80vh; display: flex; align-items: center; } .login-logo { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.25); object-fit: contain; background: var(--pg-dark); }

/* ---------- admin shell ---------- */
.admin-body { background: #eef2ee; }
.admin-shell { display: flex; min-height: 100vh; }
.sidebar { background-color: var(--nav-bg); color: var(--nav-fg); width: 250px; flex: none; border-right: 3px solid var(--pg-lime); }
/* Bootstrap forces `.offcanvas-lg { background-color: transparent !important; width: auto !important }` (and the same on .offcanvas-body) from 992px up,
   which left white menu text on the pale page background. Re-assert the solid panel with matching strength. */
.sidebar, .sidebar .offcanvas-body { background-color: var(--nav-bg) !important; }
@media (min-width: 992px) { .sidebar { width: 250px !important; } .sidebar .offcanvas-body { flex-grow: 1; } }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; } .sidebar .offcanvas-body { display: flex; overflow-y: auto; } }
.sidebar .offcanvas-header { border-bottom: 1px solid var(--nav-border); }
.sidebar-brand { display: flex; align-items: center; gap: .6rem; padding: 1rem; font-weight: 900; letter-spacing: .06em; color: var(--pg-lime); border-bottom: 1px solid var(--nav-border); }
.sidebar-brand small { display: block; font-size: .72rem; letter-spacing: .1em; color: var(--nav-fg-soft); font-weight: 600; }
.sidebar-nav { padding: .6rem; gap: 2px; }
.sidebar-nav .nav-link { color: var(--nav-fg); font-weight: 600; border-radius: 10px; border-left: 4px solid transparent; padding: .6rem .8rem; display: flex; gap: .65rem; align-items: center; font-size: .95rem; }
.sidebar-nav .nav-link i { font-size: 1.05rem; color: var(--pg-lime); }
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link:focus-visible { background: var(--nav-hover-bg); color: var(--nav-fg); border-left-color: var(--nav-fg); }
.sidebar-nav .nav-link.active { background: var(--nav-active-bg); color: var(--nav-active-fg); font-weight: 800; border-left-color: var(--nav-fg); }
.sidebar-nav .nav-link.active i { color: var(--nav-active-fg); }
.sidebar-user { padding: .8rem 1rem; border-top: 1px solid var(--nav-border); color: var(--nav-fg); flex: none; background-color: var(--nav-bg); }
/* Only the menu list scrolls; brand and the user / Logout block stay pinned and visible at any window height */
.sidebar .offcanvas-body { overflow: hidden !important; min-height: 0; }
.sidebar .offcanvas-body { display: flex !important; flex-direction: column; }
.sidebar-nav { overflow-y: auto; overflow-x: hidden; min-height: 0; flex: 1 1 auto; flex-wrap: nowrap !important; }   /* .nav is flex-wrap:wrap: a short window would otherwise spill items into extra columns */
.sidebar { max-height: 100vh; max-height: 100dvh; }
.sidebar-brand { flex: none; }
@media (max-height: 820px) { .sidebar-nav .nav-link { padding-top: .42rem; padding-bottom: .42rem; font-size: .92rem; } .sidebar-user { padding: .6rem 1rem; } }
.sidebar-user-role { color: var(--nav-fg-soft); }
.sidebar .btn-outline-light { border-width: 2px; } .sidebar .btn-outline-light:hover { background: var(--nav-fg); color: var(--pg-dark); }
.sidebar .btn-close-white { opacity: 1; }
.admin-main { flex: 1; min-width: 0; }
.topbar { background: #ffffff; color: var(--pg-ink); opacity: 1; display: flex; align-items: center; padding: .65rem 1.25rem; position: sticky; top: 0; z-index: var(--nav-z);
  border-bottom: 3px solid var(--pg-lime); box-shadow: 0 3px 8px rgba(0,0,0,.12); }
.topbar h1 { font-weight: 800; color: var(--pg-dark); }
.live-status { color: #3d4f43; font-weight: 600; }
.btn-account { background: var(--pg-dark); color: #ffffff; border: 2px solid var(--pg-dark); font-weight: 700; }
.btn-account:hover, .btn-account:focus, .btn-account.show { background: var(--nav-hover-bg); color: #ffffff; border-color: var(--nav-hover-bg); }
.dropdown-menu { background: #ffffff; border: 2px solid var(--pg-dark); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.25); padding: .4rem; z-index: 1060; min-width: 220px; }
.dropdown-item { font-weight: 600; border-radius: 8px; color: var(--pg-ink); padding: .5rem .8rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--pg-dark); color: #ffffff; }
.dropdown-item.text-danger:hover { background: #b42318; color: #ffffff !important; }
.dropdown-item.active, .dropdown-item:active { background: var(--pg-lime); color: var(--nav-active-fg); }
.stat-card { background: #fff; border-radius: 14px; padding: 1rem 1.1rem; box-shadow: 0 2px 10px rgba(0,0,0,.06); border-left: 6px solid #9aa89f; height: 100%; }
.stat-card.confirmed { border-left-color: var(--st-available); } .stat-card.pending { border-left-color: var(--st-maint); } .stat-card.cancelled { border-left-color: var(--st-occupied); } .stat-card.occupied { border-left-color: #8a1f1f; } .stat-card.money { border-left-color: var(--pg-lime); }
.stat-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: #5a6a60; font-weight: 700; } .stat-value { font-size: 1.8rem; font-weight: 900; line-height: 1.2; }
.stat-flash { animation: flash 1.2s; } @keyframes flash { 0% { background: var(--pg-lime); } 100% { background: transparent; } }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #20c05a; animation: pulse 1.6s infinite; } @keyframes pulse { 50% { opacity: .3; } }
.booking-table td, .booking-table th { vertical-align: middle; }
.quick-actions .qa { display: flex; flex-direction: column; align-items: center; gap: .4rem; background: var(--pg-dark); color: var(--pg-lime); border-radius: 16px; padding: 1.2rem .5rem; font-weight: 800; text-decoration: none; text-align: center; font-size: .9rem; }
.quick-actions .qa i { font-size: 1.8rem; } .quick-actions .qa:hover { filter: brightness(1.25); }
.toast-host { position: fixed; right: 1rem; bottom: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; }
.pg-toast { background: var(--pg-dark); color: #fff; border-left: 6px solid var(--pg-lime); border-radius: 10px; padding: .8rem 1.1rem; box-shadow: 0 6px 24px rgba(0,0,0,.35); max-width: 320px; }

/* ---------- calendar (admin) ---------- */
.cal-grid { display: grid; gap: 6px; } .cal-grid.month { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-grid.week { grid-template-columns: repeat(7, minmax(150px, 1fr)); overflow-x: auto; } .cal-grid.day { grid-template-columns: 1fr; }
.cal-head { background: var(--pg-dark); color: var(--pg-lime); text-align: center; border-radius: 8px; padding: .3rem; font-weight: 700; font-size: .8rem; }
.cal-cell { background: #fff; border-radius: 10px; padding: .4rem; min-height: 96px; } .cal-cell.tall { min-height: 220px; } .cal-cell.out { opacity: .45; } .cal-cell.today { outline: 3px solid var(--pg-lime); }
.cal-day { font-weight: 800; text-decoration: none; display: block; margin-bottom: .2rem; }
.cal-chip { display: block; font-size: .72rem; border-radius: 6px; padding: .15rem .35rem; margin-bottom: 3px; background: #e5e9e6; color: #222; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-pending { background: #fff0b8; } .chip-confirmed { background: #c9f1d6; } .chip-done { background: #d9dde0; }
@media (max-width: 767px) { .cal-grid.month { grid-template-columns: repeat(7, minmax(46px, 1fr)); overflow-x: auto; } .cal-chip { font-size: .6rem; } }

/* ---------- check-in / verify ---------- */
.verify-banner { display: flex; gap: 1rem; align-items: center; color: #fff; border-radius: 16px; padding: 1.1rem 1.4rem; margin-bottom: 1rem; } .verify-banner i { font-size: 2.4rem; } .verify-title { font-size: 1.4rem; font-weight: 900; letter-spacing: .04em; }
.verify-banner.bg-warning { color: #2b2300; }
.scan-frame { position: relative; background: #0a1b12; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; max-height: 60vh; }
.scan-frame video { width: 100%; height: 100%; object-fit: cover; display: none; } .scan-frame video.live { display: block; }
.scan-idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #8fb09a; gap: .3rem; }
.scan-aim { position: absolute; inset: 14% 22%; border: 3px solid rgba(198,241,53,.95); border-radius: 18px; box-shadow: 0 0 0 999px rgba(10,27,18,.35); pointer-events: none; }

/* ---------- mobile ---------- */
@media (max-width: 575px) {
  .confirm-grid { grid-template-columns: 1fr; } .slot { min-width: 96px; } .slot > .slot-label, .slot > .slot-link { min-height: 56px; font-size: .78rem; }
  .avail-table { border-spacing: 4px; } .time-cell { font-size: .75rem; } .stat-value { font-size: 1.4rem; } .hero { padding: 2.5rem 0; }
}
@media (max-width: 991.98px) { .sidebar { width: 290px; max-width: 86vw; box-shadow: 8px 0 28px rgba(0,0,0,.45); } .topbar { padding: .55rem .8rem; } .topbar h1 { font-size: 1.05rem; } .topbar .btn-light { border: 2px solid var(--pg-dark); background: #fff; color: var(--pg-dark); font-size: 1.2rem; line-height: 1; } }
@media (max-width: 400px) { .site-nav .brand-name { font-size: 1rem; } .site-nav .brand-tag { letter-spacing: .08em; font-size: .6rem; } .logo-mark { width: 36px; height: 36px; } }

/* ---------- print ---------- */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; }
  .no-print, .site-nav, .site-footer, .sidebar, .topbar, .toast-host, .alert { display: none !important; }
  .confirm-sheet { box-shadow: none; border: 2px solid #000; border-radius: 0; }
  .booking-id { background: #fff !important; color: #000 !important; border: 2px solid #000; }
  .badge { border: 1px solid #000; color: #000 !important; background: #fff !important; }
  .confirm-page { max-width: 100%; }
}

/* =====================================================================
   MODAL + BUTTON SYSTEM  (every modal in the app: reason modal, confirmations, notices)
   Structure:  header (dark green, lime rule, title + icon, close)  |  body  |  footer (secondary left of primary / danger)
   ===================================================================== */
:root { --pg-radius: 14px; --pg-radius-sm: 10px; --pg-danger: #c62828; --pg-danger-dark: #a61e1e; --pg-line: #d5ded8; }
.modal-backdrop { --bs-backdrop-bg: #0a1d13; --bs-backdrop-opacity: .62; }
.modal-dialog { margin: .75rem auto; max-width: min(500px, calc(100vw - 1.5rem)); }
.modal-dialog.modal-lg { max-width: min(800px, calc(100vw - 1.5rem)); }
.modal-content { border: 0; border-radius: var(--pg-radius); overflow: hidden; background: #fff; color: var(--pg-ink); box-shadow: 0 16px 44px rgba(10, 29, 19, .38); max-height: calc(100vh - 1.5rem); max-height: calc(100dvh - 1.5rem); }
.modal-header { background: var(--pg-dark); color: #fff; border-bottom: 3px solid var(--pg-lime); padding: .85rem 1.1rem; align-items: center; }
.modal-title { display: flex; align-items: center; gap: .65rem; font-size: 1.05rem; font-weight: 800; letter-spacing: .02em; color: #fff; margin: 0; min-width: 0; }
.pg-modal-title-text { overflow-wrap: anywhere; }
.pg-modal-icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--pg-lime); color: var(--nav-active-fg, #10200f); font-size: 1.05rem; }
.pg-modal[data-variant="danger"] .pg-modal-icon { background: #ffffff; color: var(--pg-danger); }
.pg-modal[data-variant="warning"] .pg-modal-icon { background: #ffd23f; color: #3a2b00; }
.modal-header .btn-close { opacity: 1; width: 36px; height: 36px; padding: 0; margin: 0 -.25rem 0 .5rem; border-radius: 50%; background-size: 14px; flex: none; }
.modal-header .btn-close:hover { background-color: #1f4a33; }
.modal-header .btn-close:focus-visible { outline: 3px solid var(--pg-lime); outline-offset: 1px; box-shadow: none; }
.modal-body { padding: 1.15rem 1.25rem; overflow-wrap: anywhere; line-height: 1.5; }
.modal-body .form-label { font-weight: 700; font-size: .9rem; }
.modal-body .form-control:focus, .modal-body .form-select:focus { border-color: var(--pg-green); box-shadow: 0 0 0 3px #d9f58a; }
.modal-footer { background: #f3f6f2; border-top: 1px solid var(--pg-line); padding: .8rem 1.1rem; gap: .5rem; justify-content: flex-end; flex-wrap: nowrap; }
.modal-footer > * { margin: 0; }
.modal.fade .modal-dialog { transform: translateY(14px) scale(.985); transition: transform .18s ease-out; }
.modal.show .modal-dialog { transform: none; }
@media (prefers-reduced-motion: reduce) { .modal.fade .modal-dialog { transition: none; transform: none; } }
body.modal-open { overflow-x: hidden; }

/* Buttons - one hierarchy for modals: primary = lime, secondary = outlined dark, danger = solid red */
.modal .btn, .btn-lime { min-height: 44px; padding: .55rem 1.15rem; border-radius: var(--pg-radius-sm); font-weight: 800; font-size: .95rem; letter-spacing: .02em; border-width: 2px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; line-height: 1.2; transition: background-color .12s, border-color .12s, color .12s; }
.modal .btn-sm { min-height: 38px; }
.modal .btn-outline-secondary, .modal .btn-secondary { background: #fff; color: var(--pg-dark); border-color: var(--pg-dark); }
.modal .btn-outline-secondary:hover, .modal .btn-secondary:hover { background: var(--pg-dark); color: #fff; border-color: var(--pg-dark); }
.modal .btn-outline-secondary:active, .modal .btn-secondary:active { background: #1f4a33; color: #fff; border-color: #1f4a33; }
.modal .btn-danger { background: var(--pg-danger); border-color: var(--pg-danger); color: #fff; }
.modal .btn-danger:hover { background: var(--pg-danger-dark); border-color: var(--pg-danger-dark); color: #fff; }
.modal .btn-danger:active { background: #8a1818; border-color: #8a1818; color: #fff; }
.btn-lime:active { background: #b5dd22; border-color: #b5dd22; color: #0b1a0a; }
.modal .btn:disabled, .modal .btn.disabled, .btn-lime:disabled, .btn-lime.disabled { background: #e3e9e5; border-color: #e3e9e5; color: #6b786f; opacity: 1; cursor: not-allowed; }
.modal .btn:focus-visible, .btn-lime:focus-visible { outline: 0; box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px var(--pg-dark); }
.modal .btn i { font-size: 1.05em; }

@media (max-width: 575.98px) {
  .modal-dialog { margin: .6rem auto; }
  .modal-footer { flex-direction: column-reverse; align-items: stretch; }
  .modal-footer > .btn, .modal-footer > form, .modal-footer > button { width: 100%; }
  .modal-footer .btn { min-height: 48px; }
  .modal-header { padding: .75rem .9rem; } .modal-body { padding: 1rem; }
}

/* Save QR / confirmation actions: large touch targets on phones */
.confirm-actions .btn, .confirm-toolbar .btn { min-height: 44px; font-weight: 800; display: inline-flex; align-items: center; gap: .45rem; }
@media (max-width: 575.98px) { .confirm-actions { flex-direction: column; } .confirm-actions .btn { width: 100%; justify-content: center; min-height: 48px; } .confirm-toolbar { flex-wrap: wrap; } }
