/* Pasabuy — base layer on top of Bootstrap 5.3.8: tokens, typography, buttons, forms, navbar, page shell.
   Ported from the prototype (testsite/pasabuy/css/style.css). Components live in components.css, phone tweaks in mobile.css. */

:root {
  --pb-primary: #2563eb;
  --pb-primary-dark: #1d4ed8;
  --pb-primary-soft: #e8f0ff;
  --pb-navy: #0b1f44;
  --pb-text: #1e2a44;
  --pb-muted: #64748b;
  --pb-bg: #f4f7fc;
  --pb-border: #e3e9f4;
  --pb-success: #16a34a;
  --pb-success-soft: #e6f6ec;
  --pb-warning: #c2610c;
  --pb-warning-soft: #fff1de;
  --pb-danger: #dc2626;
  --pb-danger-soft: #fdeaea;
  --pb-info: #0e7490;
  --pb-info-soft: #e0f4f8;
  --pb-radius: 16px;
  --pb-shadow: 0 1px 2px rgba(11, 31, 68, .04), 0 6px 20px rgba(11, 31, 68, .06);

  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-link-color: #2563eb;
  --bs-link-color-rgb: 37, 99, 235;
  --bs-link-hover-color: #1d4ed8;
  --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-color: var(--pb-text);
  --bs-body-bg: var(--pb-bg);
  --bs-border-color: var(--pb-border);
  --bs-border-radius: .75rem;
}

body { font-size: .95rem; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { color: var(--pb-navy); font-weight: 700; letter-spacing: -.01em; }
a { text-decoration: none; }
.text-muted, .text-secondary { color: var(--pb-muted) !important; }
.pb-main { min-height: 60vh; padding-bottom: 3rem; }

/* buttons */
.btn { font-weight: 600; border-radius: 12px; }
.btn-primary { --bs-btn-bg: #2563eb; --bs-btn-border-color: #2563eb; --bs-btn-hover-bg: #1d4ed8; --bs-btn-hover-border-color: #1d4ed8; --bs-btn-active-bg: #1e40af; --bs-btn-active-border-color: #1e40af; --bs-btn-disabled-bg: #2563eb; --bs-btn-disabled-border-color: #2563eb; }
.btn-outline-primary { --bs-btn-color: #2563eb; --bs-btn-border-color: #bcd0fb; --bs-btn-hover-bg: #2563eb; --bs-btn-hover-border-color: #2563eb; --bs-btn-active-bg: #1d4ed8; }
.btn-success { --bs-btn-bg: #16a34a; --bs-btn-border-color: #16a34a; --bs-btn-hover-bg: #15803d; --bs-btn-hover-border-color: #15803d; }
.btn-light-soft { background: var(--pb-primary-soft); color: var(--pb-primary); border: 0; }
.btn-light-soft:hover { background: #d7e5ff; color: var(--pb-primary-dark); }
/* Bootstrap 5.3 inputs default to background-color: var(--bs-body-bg) — fine on Bootstrap's own white page,
   but this app repoints --bs-body-bg to a light grey (see --pb-bg above), which made every input blend into
   the page/card background instead of reading as a distinct, clickable surface. Forcing white here fixes it
   without touching the page's own background tone. */
.form-control, .form-select { background-color: #fff; border-radius: 12px; border-color: #d5deee; padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { background-color: #fff; border-color: #7aa2f7; box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .15); }
.form-control:disabled, .form-control[readonly] { background-color: var(--pb-bg); }

/* same --bs-body-bg inheritance issue as the inputs above, but on the modal surface itself — a modal is
   meant to float above the dimmed page as a distinct white card, not blend into the page's own grey tone */
.modal-content { background-color: #fff; }
.form-label { font-weight: 600; font-size: .85rem; color: var(--pb-navy); margin-bottom: .3rem; }

/* navbar (desktop) + notifications + account dropdown */
/* Demo bar (demo mode only — templates/includes/demo_bar.html) */
.demo-bar { background: var(--pb-navy); color: #c9d6f3; font-size: .78rem; padding: .4rem 0; }
.demo-bar form { margin: 0; }
.demo-bar select { background: #14306a; color: #fff; border: 1px solid #2c4a8c; border-radius: 8px; padding: .1rem .4rem; font-size: .78rem; max-width: 300px; }
.demo-bar button { background: transparent; border: 1px solid #2c4a8c; color: #c9d6f3; border-radius: 8px; padding: .1rem .55rem; font-size: .75rem; }
.demo-bar button:hover { background: #14306a; color: #fff; }
.demo-bar .demo-toggle { border: 0; padding: 0; font-size: .78rem; font-weight: 600; color: #c9d6f3; }
.demo-bar .demo-toggle:hover { background: transparent; }
.demo-bar .demo-toggle[aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }

.pb-nav { background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--pb-border); }
.pb-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.35rem; color: var(--pb-navy); letter-spacing: -.02em; }
.pb-brand .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #2563eb, #38bdf8); color: #fff; display: grid; place-items: center; font-size: 1.05rem; }
.pb-nav .nav-link { color: var(--pb-text); font-weight: 500; padding: .45rem .5rem !important; border-radius: 10px; white-space: nowrap; font-size: .9rem; }
.pb-nav .btn { white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1399px) { .pb-nav .nav-link { padding: .45rem .42rem !important; font-size: .87rem; } .pb-brand { font-size: 1.2rem; } }
.pb-nav .nav-link:hover { background: var(--pb-bg); }
.pb-nav .nav-link.active { color: var(--pb-primary); background: var(--pb-primary-soft); }
.bell-btn { position: relative; border: 0; background: var(--pb-bg); width: 40px; height: 40px; border-radius: 12px; color: var(--pb-navy); }
.bell-btn .dot { position: absolute; top: -4px; right: -4px; background: var(--pb-danger); color: #fff; font-size: .65rem; border-radius: 999px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; font-weight: 700; }
.notif-menu { width: 340px; max-width: 92vw; padding: 0; border-radius: 16px; overflow: hidden; border-color: var(--pb-border); box-shadow: var(--pb-shadow); }
.notif-item { display: flex; gap: .65rem; padding: .7rem .9rem; border-bottom: 1px solid var(--pb-border); color: var(--pb-text); font-size: .85rem; }
.notif-item:hover { background: var(--pb-bg); color: var(--pb-text); }
.notif-item.unread { background: #f3f8ff; }
.notif-ico { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--pb-primary-soft); color: var(--pb-primary); }
.account-menu { width: 260px; padding-bottom: .5rem; max-height: min(80vh, 560px); overflow-y: auto; }
.account-menu .px-3.py-2 { position: sticky; top: 0; background: #fff; z-index: 1; }
.account-menu .dropdown-item { font-weight: 600; font-size: .87rem; padding: .45rem 1rem; }
.account-menu .dropdown-item.active { background: var(--pb-primary-soft); color: var(--pb-primary-dark); }
.account-menu .count { background: var(--pb-danger); color: #fff; border-radius: 999px; font-size: .68rem; padding: 0 .4rem; line-height: 1.5; }

/* cards + page structure */
.pb-card { background: #fff; border: 1px solid var(--pb-border); border-radius: var(--pb-radius); box-shadow: var(--pb-shadow); }
.pb-card.hover { transition: transform .15s, box-shadow .15s; }
.pb-card.hover:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(11, 31, 68, .1); }
.card-pad { padding: 1.25rem; }
@media (min-width: 1200px) { .row-cols-xl-7 > * { flex: 0 0 auto; width: 14.2857%; } }
.section-title { font-size: 1.45rem; margin-bottom: .25rem; }
.section-sub { color: var(--pb-muted); margin-bottom: 1.25rem; }
.page-head { padding: 2rem 0 1.25rem; }
.page-head h1 { font-size: 1.8rem; margin: 0; }
.crumb { font-size: .82rem; color: var(--pb-muted); }

.route { font-weight: 700; color: var(--pb-navy); display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.route .arrow { color: var(--pb-primary); }
.route.big { font-size: 1.6rem; }
.meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem 1rem; }
.meta-grid .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pb-muted); font-weight: 600; }
.meta-grid .v { font-weight: 600; color: var(--pb-navy); }
.fee { font-size: 1.35rem; font-weight: 800; color: var(--pb-primary); }

/* list rows */
.list-row { display: flex; gap: .85rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--pb-border); }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--pb-bg); margin: 0 -.5rem; padding-left: .5rem; padding-right: .5rem; border-radius: 10px; }

/* footer, toasts (Django messages), tables */
.pb-footer { background: var(--pb-navy); color: #a9bbe0; padding: 2.5rem 0 1.5rem; }
.pb-footer a { color: #cfdcf7; } .pb-footer a:hover { color: #fff; }
.pb-footer h6 { color: #fff; }
.toast-wrap { position: fixed; right: 1rem; bottom: 1rem; z-index: 2000; display: grid; gap: .5rem; }
.pb-toast { background: var(--pb-navy); color: #fff; border-radius: 14px; padding: .8rem 1rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); display: flex; gap: .6rem; align-items: center; max-width: 360px; animation: slidein .25s; }
.pb-toast.success i { color: #4ade80; } .pb-toast.danger i { color: #f87171; } .pb-toast.warning i { color: #fbbf24; }
@keyframes slidein { from { transform: translateY(12px); opacity: 0; } }
.table-clean th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pb-muted); font-weight: 700; }

[id^='panel-'], #safety { scroll-margin-top: 130px; }
