/* AfriBilling – app layer on top of the design stylesheet (afribilling.css): bundled fonts, flash messages,
   form errors, pagination, notifications menu, demo/update banners, PWA hints, header fit levels, placeholders.
   Builders: do not edit; put page CSS in your own public/assets/css/<area>.css. */

/* ---------- bundled fonts (SIL Open Font License, see fonts/LICENSE-OFL.txt) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500 800; font-display: swap; src: url("../fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500 800; font-display: swap; src: url("../fonts/manrope-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/caveat-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/caveat-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2"); }

/* ---------- logo image (uploaded logo, light/dark) ---------- */
.logo .logo-img { height: 36px; width: auto; max-width: 180px; object-fit: contain; }
.logo .logo-dark { display: none; }
[data-theme="dark"] .logo:has(.logo-dark) .logo-light { display: none; }
[data-theme="dark"] .logo .logo-dark { display: block; }
.sidebar .logo .logo-img { filter: none; }
.app-ico { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; overflow: hidden; }
.app-ico svg, .app-ico img { width: 100%; height: 100%; }

/* ---------- flash messages + validation ---------- */
.flash-stack { display: grid; gap: 10px; margin-bottom: 20px; }
.alert { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px 13px 16px; border-radius: 12px; font-size: 14px; border: 1px solid transparent; }
.alert > i { font-size: 18px; line-height: 1.25; }
.alert p { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.alert .grow { flex: 1; }
.alert .close { width: 36px; height: 36px; margin: -8px -6px -8px 0; border: 0; background: transparent; }
.alert-ok { background: var(--ok-soft); } .alert-ok > i { color: var(--ok); }
.alert-warn { background: var(--bad-soft); } .alert-warn > i { color: var(--bad); }
.alert-info { background: var(--info-soft); } .alert-info > i { color: var(--info); }
.alert-accent { background: var(--accent-soft); } .alert-accent > i { color: var(--accent-ink); }
.field-error { font-size: 12.5px; color: var(--bad); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--bad); }
.req { color: var(--bad); margin-left: 2px; }

/* ---------- empty state + pagination (design pager) ---------- */
.empty-state { text-align: center; padding: 40px 20px; }
.empty-state .ico-box { margin: 0 auto 12px; }
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { margin: 0 auto; max-width: 420px; }
.pager .pg span.dis { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--border); color: var(--faint); }

/* ---------- notifications menu ---------- */
.notif-menu { width: 340px; max-width: calc(100vw - 32px); padding: 6px; }
.notif-menu .dd-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.notif-menu .dd-title button { width: auto; padding: 6px 8px; font-size: 12.5px; text-transform: none; letter-spacing: 0; color: var(--brand-ink); }
.notif-menu .n-item { align-items: flex-start; white-space: normal; }
.notif-menu .n-item.unread { background: var(--brand-soft); }
.notif-menu .n-item b { display: block; color: var(--text); }
.notif-menu .n-empty { padding: 16px 12px; color: var(--muted); font-size: 13.5px; text-align: center; }

/* ---------- demo + update banners ---------- */
.demo-banner { background: var(--accent); color: var(--accent-text); text-align: center; font: 600 13px/1.4 var(--font-ui); padding: 7px 16px; }
.update-banner { margin-bottom: 20px; }

/* ---------- PWA: iPhone hint, offline page ---------- */
.ios-hint { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 120; display: none; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: 14px; color: var(--text-2); }
.ios-hint.show { display: flex; }
.offline-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.offline-wrap .ico-box { margin: 0 auto 16px; }

/* ---------- app topbar fit levels (set by afribilling.js when the bar would still overflow) ---------- */
.topbar.fit-1 .tb-search { display: none; } .topbar.fit-1 .search-btn { display: inline-grid; }
.topbar.fit-2 .me b { display: none; } .topbar.fit-2 .me { padding: 3px; }
.topbar.fit-3 .crumbs { display: none; } .topbar.fit-3 .tb-tools { margin-left: auto; }
.topbar.fit-4 .tb-tools > .dd.hide-m:first-child { display: none; }
.site-header.fit-1 .hide-1360 { display: none !important; }
.site-header.fit-2 .hide-1280 { display: none !important; }
.site-header.fit-3 .main-nav .nav-extra { display: none; } .site-header.fit-3 .main-nav .more { display: block; }
.site-header.fit-4 .main-nav { display: none; } .site-header.fit-4 .burger { display: inline-grid; } .site-header.fit-4 .hide-m { display: none !important; }
.topbar .search-pop { position: absolute; left: 12px; right: 12px; top: calc(100% + 6px); z-index: 70; display: none; }
.topbar .search-pop.open { display: block; }
.topbar { position: sticky; }

/* ---------- placeholders (removed by the page builders) ---------- */
.placeholder-note { border: 1.5px dashed var(--border-strong); border-radius: 14px; padding: 18px 20px; background: var(--surface-2); color: var(--text-2); font-size: 14px; margin-bottom: 20px; }
.placeholder-note b { color: var(--text); }
.placeholder-note code { font-size: 12.5px; }

/* ---------- misc ---------- */
.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 720px) { .flash-stack { margin-bottom: 14px; } }

/* ---------- installer ---------- */
.installer { min-height: 100vh; display: grid; place-items: start center; padding: 48px 16px; background: var(--bg); }
.installer .inst-box { width: 100%; max-width: 700px; }
.installer .inst-steps { display: flex; gap: 6px; margin: 22px 0; flex-wrap: wrap; }
.installer .inst-steps span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 99px; font-size: 13px; font-weight: 650; background: var(--surface-3); color: var(--muted); }
.installer .inst-steps span.on { background: var(--brand); color: #fff; }
.installer .inst-steps span.done { background: var(--ok-soft); color: var(--ok); }
.installer form > .field + .field, .installer form .form-grid + .field, .installer form .field + .form-grid, .installer form hr + .field { margin-top: 14px; }
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.req-list li:last-child { border-bottom: 0; }
.req-list .bi-check-circle-fill { color: var(--ok); }
.req-list .bi-x-circle-fill { color: var(--bad); }
.progress > i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--brand); transition: width .3s; }
.stack > * + * { margin-top: 12px; }

/* Phone/tablet drawers: fit the visible screen (mobile browser toolbars overlap 100vh) and scroll as one panel,
   so the account card with Sign out at the bottom is always reachable. */
@media (max-width: 1100px) {
  .sidebar { height: 100vh; height: 100dvh; bottom: auto; overflow-y: auto; overscroll-behavior: contain; }
  .sidebar nav { flex: 0 0 auto; overflow: visible; }
  .sidebar .side-foot { margin-top: auto; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}
.mobile-drawer { height: 100vh; height: 100dvh; bottom: auto; overflow-y: auto; overscroll-behavior: contain; }
.mobile-drawer nav { flex: 0 0 auto; overflow: visible; }
.mobile-drawer .drawer-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.side-signout .so-label { display: none; }
@media (max-width: 1100px) {
  .sidebar .icon-btn.side-signout { width: auto; padding: 0 12px; gap: 6px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; min-height: 36px; display: inline-flex; align-items: center; }
  .sidebar .side-signout .so-label { display: inline; font-size: 13px; font-weight: 600; white-space: nowrap; }
  .sidebar .icon-btn.side-signout { flex-shrink: 0; }
  .sidebar .side-user > div { min-width: 0; }
  .sidebar .side-user b, .sidebar .side-user small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
