/* PayeBill Phase 4 — production UI theme
   Direction: utility fintech — deep teal + warm paper, Sora + Source Sans 3
   Fonts load via <link> in layouts (not @import) for faster first paint.
*/

:root {
  --pb-ink: #12231c;
  --pb-muted: #5b6b63;
  --pb-brand: #0c6b4d;
  --pb-brand-2: #148f66;
  --pb-accent: #d97706;
  --pb-danger: #b42318;
  --pb-ok: #067647;
  --pb-surface: #f3efe6;
  --pb-surface-2: #fffdf8;
  --pb-line: rgba(18, 35, 28, 0.12);
  --pb-shadow: 0 18px 40px rgba(18, 35, 28, 0.08);
  --pb-radius: 14px;
  --pb-sidebar: 260px;
  --pb-top: 64px;
  --pb-font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --pb-display: "Sora", "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--pb-font);
  color: var(--pb-ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(20, 143, 102, 0.16), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(217, 119, 6, 0.10), transparent 50%),
    linear-gradient(180deg, #e8efe9 0%, var(--pb-surface) 40%, #ebe6db 100%);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--pb-brand); text-decoration: none; }
a:hover { color: var(--pb-brand-2); }

h1, h2, h3, h4, .pb-display {
  font-family: var(--pb-display);
  letter-spacing: -0.02em;
  color: var(--pb-ink);
}

/* ---------- Login (guest) ---------- */
.pb-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  position: relative;
  overflow: hidden;
}

.pb-login__visual {
  position: relative;
  padding: clamp(2rem, 5vw, 4rem);
  color: #f7faf8;
  background:
    linear-gradient(145deg, rgba(8, 48, 36, 0.88), rgba(12, 107, 77, 0.72)),
    radial-gradient(900px 480px at 15% 85%, rgba(217, 119, 6, 0.28), transparent 55%),
    linear-gradient(160deg, #083024 0%, #0c6b4d 48%, #0f2a21 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
}

.pb-login__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(transparent 40%, rgba(8, 30, 24, 0.75)),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 22px,
      rgba(255, 255, 255, 0.03) 22px,
      rgba(255, 255, 255, 0.03) 23px
    );
  pointer-events: none;
}

.pb-login__brand,
.pb-login__copy {
  position: relative;
  z-index: 1;
}

.pb-login__brand {
  font-family: var(--pb-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  animation: pb-rise 0.7s ease both;
}

.pb-login__copy {
  max-width: 28rem;
  font-size: 1.05rem;
  opacity: 0.92;
  animation: pb-rise 0.7s ease 0.12s both;
}

.pb-login__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    linear-gradient(160deg, rgba(255, 253, 248, 0.96), rgba(243, 239, 230, 0.92));
}

.pb-login__card {
  width: min(100%, 420px);
  animation: pb-rise 0.65s ease 0.08s both;
}

.pb-login__card h1 {
  font-size: 1.75rem;
  margin: 0 0 0.35rem;
}

.pb-login__card .pb-sub {
  color: var(--pb-muted);
  margin: 0 0 1.5rem;
}

.pb-login__mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
  font-family: var(--pb-display);
  font-weight: 700;
  color: var(--pb-brand);
  font-size: 1.15rem;
}

.pb-login__mark span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--pb-brand), var(--pb-brand-2));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .pb-login { grid-template-columns: 1fr; }
  .pb-login__visual {
    min-height: 34vh;
    justify-content: flex-end;
    padding: 1.5rem;
  }
  .pb-login__brand { font-size: 2rem; }
}

/* ---------- Shell / sidebar / topbar ---------- */
.pb-shell .sidebar,
.sidebar.sidebar-hide-to-small {
  width: var(--pb-sidebar) !important;
  background: #0f2a21 !important;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
  top: 0 !important;
  z-index: 1040;
}

.pb-shell .sidebar .logo,
.sidebar .logo {
  padding: 1.1rem 1rem 0.75rem !important;
  text-align: left !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pb-brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #f4faf7;
  font-family: var(--pb-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.pb-brand-lockup__badge {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, #19a06f, #0c6b4d);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.sidebar .logoimg { display: none !important; }

.pb-nav {
  list-style: none;
  margin: 0;
  padding: 0.75rem 0.65rem 2rem;
}

.pb-nav > li { margin: 0.15rem 0; }

.pb-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(244, 250, 247, 0.82) !important;
  padding: 0.72rem 0.85rem !important;
  border-radius: 10px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  border: 0 !important;
  background: transparent !important;
}

.pb-nav a:hover,
.pb-nav > li.active > a,
.pb-nav a.is-active {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  transform: translateX(2px);
}

.pb-nav > li > ul {
  list-style: none;
  margin: 0.15rem 0 0.35rem 0.4rem;
  padding: 0.2rem 0 0.2rem 0.55rem;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
  display: none;
}

.pb-nav > li.open > ul { display: block; animation: pb-fade 0.2s ease; }

.pb-nav > li > ul a {
  font-size: 0.92rem;
  padding: 0.55rem 0.7rem !important;
  color: rgba(244, 250, 247, 0.72) !important;
}

.pb-nav .sidebar-collapse-icon {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.pb-nav > li.open .sidebar-collapse-icon { transform: rotate(180deg); }

.header.fixed-top,
.pb-topbar {
  left: var(--pb-sidebar) !important;
  right: 0 !important;
  height: var(--pb-top);
  background: rgba(255, 253, 248, 0.86) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pb-line);
  box-shadow: none !important;
  z-index: 1030;
  display: flex;
  align-items: center;
}

.pb-topbar__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  gap: 1rem;
}

.pb-wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(12, 107, 77, 0.1);
  color: var(--pb-brand);
  border: 1px solid rgba(12, 107, 77, 0.18);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.pb-user-menu {
  position: relative;
}

.pb-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--pb-ink);
  font-weight: 600;
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0.15rem 0.25rem;
  border-radius: 999px;
}

.pb-user-chip[aria-expanded="true"],
.pb-user-chip:focus-visible {
  outline: 2px solid rgba(12, 107, 77, 0.35);
  outline-offset: 2px;
}

.pb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, #148f66, #0c6b4d);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--pb-display);
  font-size: 0.85rem;
}

.pb-profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.55rem);
  min-width: 210px;
  background: var(--pb-surface-2);
  border: 1px solid var(--pb-line);
  border-radius: 12px;
  box-shadow: var(--pb-shadow);
  padding: 0.4rem;
  z-index: 1200;
  display: none;
}

.pb-profile-menu.is-open { display: block; }

.pb-profile-menu a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: var(--pb-ink);
  font-weight: 500;
}

.pb-profile-menu a:hover {
  background: rgba(12, 107, 77, 0.08);
  color: var(--pb-brand);
}

.content-wrap {
  margin-left: var(--pb-sidebar) !important;
  padding-top: calc(var(--pb-top) + 1.25rem) !important;
  min-height: 100vh;
}

.content-wrap .main,
.content-wrap .container-fluid {
  max-width: 1200px;
}

/* ---------- Components ---------- */
.pb-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.pb-page-head h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
}

.pb-page-head p {
  margin: 0.25rem 0 0;
  color: var(--pb-muted);
}

.pb-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(12, 107, 77, 0.08);
  border: 1px solid rgba(12, 107, 77, 0.16);
  border-radius: var(--pb-radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.pb-notice__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--pb-brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pb-notice__text {
  white-space: nowrap;
  overflow: hidden;
  animation: pb-marquee 18s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pb-notice__text { animation: none; white-space: normal; }
  .pb-stat, .pb-toast, .pb-spinner { animation: none !important; }
}

.pb-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 992px) {
  .pb-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .pb-stat-grid { grid-template-columns: 1fr; }
  .content-wrap { margin-left: 0 !important; }
  .header.fixed-top, .pb-topbar { left: 0 !important; }
  .sidebar { transform: translateX(-105%); transition: transform 0.25s ease; }
  body.pb-nav-open .sidebar { transform: translateX(0); }
}

.pb-stat {
  background: var(--pb-surface-2);
  border: 1px solid var(--pb-line);
  border-radius: var(--pb-radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--pb-shadow);
  position: relative;
  overflow: hidden;
  animation: pb-rise 0.55s ease both;
}

.pb-stat:nth-child(2) { animation-delay: 0.05s; }
.pb-stat:nth-child(3) { animation-delay: 0.1s; }
.pb-stat:nth-child(4) { animation-delay: 0.15s; }
.pb-stat:nth-child(5) { animation-delay: 0.2s; }
.pb-stat:nth-child(6) { animation-delay: 0.25s; }

.pb-stat::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(12, 107, 77, 0.08);
}

.pb-stat__label {
  color: var(--pb-muted);
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.pb-stat__value {
  font-family: var(--pb-display);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.15;
}

.pb-stat__meta {
  margin-top: 0.35rem;
  color: var(--pb-brand);
  font-weight: 600;
  font-size: 0.95rem;
}

.pb-panel {
  background: var(--pb-surface-2);
  border: 1px solid var(--pb-line);
  border-radius: var(--pb-radius);
  padding: 1.25rem;
  box-shadow: var(--pb-shadow);
  margin-bottom: 1.25rem;
}

.pb-panel__title {
  font-family: var(--pb-display);
  font-size: 1.1rem;
  margin: 0 0 1rem;
}

.form-control,
.select2-container--default .select2-selection--single {
  border-radius: 10px !important;
  border-color: var(--pb-line) !important;
  min-height: 44px;
  box-shadow: none !important;
}

.form-control:focus {
  border-color: rgba(12, 107, 77, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(12, 107, 77, 0.12) !important;
}

label { font-weight: 600; color: var(--pb-ink); margin-bottom: 0.35rem; }

.btn,
.btn-primary,
.btn-success,
.btn-flat {
  border-radius: 10px !important;
  font-weight: 600 !important;
  padding: 0.65rem 1.1rem !important;
  border: 0 !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary,
.btn-success,
.pb-btn {
  background: linear-gradient(145deg, var(--pb-brand-2), var(--pb-brand)) !important;
  color: #fff !important;
  box-shadow: 0 10px 20px rgba(12, 107, 77, 0.22);
}

.btn-primary:hover,
.btn-success:hover,
.pb-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-block {
  display: block !important;
  width: 100% !important;
}

.pb-btn-ghost {
  background: transparent !important;
  color: var(--pb-brand) !important;
  border: 1px solid rgba(12, 107, 77, 0.28) !important;
  box-shadow: none !important;
}

/* BBPS wizard */
.pb-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.pb-step {
  flex: 1;
  min-width: 120px;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(18, 35, 28, 0.04);
  border: 1px solid transparent;
  font-weight: 600;
  color: var(--pb-muted);
}

.pb-step.is-active {
  background: rgba(12, 107, 77, 0.1);
  border-color: rgba(12, 107, 77, 0.2);
  color: var(--pb-brand);
}

.pb-step.is-done {
  color: var(--pb-ok);
}

.pb-bbps-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pb-bbps-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid var(--pb-line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-weight: 700;
  color: var(--pb-brand);
}

.pb-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.pb-preview-item {
  background: rgba(12, 107, 77, 0.05);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}

.pb-preview-item span {
  display: block;
  color: var(--pb-muted);
  font-size: 0.82rem;
}

.pb-preview-item strong {
  font-size: 1.02rem;
}

@media (max-width: 640px) {
  .pb-preview-grid { grid-template-columns: 1fr; }
}

/* Tables */
.pb-table-wrap {
  overflow: auto;
  border: 1px solid var(--pb-line);
  border-radius: var(--pb-radius);
  background: #fff;
}

.pb-table-wrap table,
.table {
  margin: 0;
  width: 100%;
  background: #fff;
}

.pb-table-wrap th,
.table thead th {
  background: #f7f4ec !important;
  color: var(--pb-ink) !important;
  font-weight: 700;
  border-bottom: 1px solid var(--pb-line) !important;
  white-space: nowrap;
}

.pb-table-wrap td,
.table td {
  vertical-align: middle !important;
  border-color: var(--pb-line) !important;
}

.pb-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(18, 35, 28, 0.06);
}

.pb-status.is-paid { background: rgba(6, 118, 71, 0.12); color: var(--pb-ok); }
.pb-status.is-due { background: rgba(217, 119, 6, 0.14); color: #b45309; }
.pb-status.is-reject { background: rgba(180, 35, 24, 0.12); color: var(--pb-danger); }

/* Admin user list — wide table with clipped long text */
.pb-users-table-wrap {
  max-height: min(72vh, 760px);
  overflow: auto;
}

.pb-users-table {
  table-layout: fixed;
  min-width: 1280px;
  font-size: 0.82rem;
}

.pb-users-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f4ec !important;
  box-shadow: 0 1px 0 var(--pb-line);
  padding: 0.65rem 0.55rem !important;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pb-users-table tbody td {
  padding: 0.55rem !important;
  line-height: 1.35;
  vertical-align: middle !important;
}

.pb-users-table tbody tr:nth-child(even) {
  background: rgba(18, 35, 28, 0.02);
}

.pb-users-table tbody tr:hover {
  background: rgba(12, 107, 77, 0.06);
}

.pb-users-table .col-sn { width: 42px; }
.pb-users-table .col-name { width: 130px; }
.pb-users-table .col-type { width: 118px; }
.pb-users-table .col-email { width: 168px; }
.pb-users-table .col-idno { width: 108px; }
.pb-users-table .col-address { width: 190px; }
.pb-users-table .col-farm { width: 130px; }
.pb-users-table .col-city { width: 88px; }
.pb-users-table .col-mobile { width: 100px; }
.pb-users-table .col-wallet { width: 96px; text-align: right; }
.pb-users-table .col-state { width: 88px; }
.pb-users-table .col-ref { width: 100px; }
.pb-users-table .col-flag { width: 58px; text-align: center; }
.pb-users-table .col-by { width: 88px; }
.pb-users-table .col-action { width: 64px; text-align: center; }

.pb-cell-clip {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.pb-cell-lines {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 2.7em;
  word-break: break-word;
}

.pb-users-table .pb-link-action {
  font-weight: 700;
  white-space: nowrap;
}

/* Unpaid bills admin table */
.pb-bills-table-wrap {
  max-height: min(72vh, 760px);
  overflow: auto;
}

.pb-bills-table {
  table-layout: fixed;
  min-width: 1180px;
  font-size: 0.82rem;
}

.pb-bills-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f4ec !important;
  box-shadow: 0 1px 0 var(--pb-line);
  padding: 0.6rem 0.5rem !important;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pb-bills-table tbody td {
  padding: 0.5rem !important;
  vertical-align: middle !important;
}

.pb-bills-table .col-action {
  text-align: center;
  white-space: nowrap;
}

.pb-bill-actions {
  white-space: normal;
  line-height: 1.6;
}

.pb-bill-actions .pb-action-sep {
  color: var(--pb-muted);
  margin: 0 0.25rem;
  font-weight: 400;
}

.pb-bills-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.pb-bills-filter .form-group {
  margin: 0;
  min-width: 220px;
}

.pb-bills-meta {
  color: var(--pb-muted);
  font-size: 0.88rem;
  margin-left: auto;
}

.pb-bills-loading {
  opacity: 0.55;
  pointer-events: none;
}

/* Mobile card table */
@media (max-width: 768px) {
  .pb-table-responsive table,
  .pb-table-responsive thead,
  .pb-table-responsive tbody,
  .pb-table-responsive th,
  .pb-table-responsive td,
  .pb-table-responsive tr { display: block; }

  .pb-table-responsive thead { display: none; }

  .pb-table-responsive tr {
    border: 1px solid var(--pb-line);
    border-radius: 12px;
    margin: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: #fff;
  }

  .pb-table-responsive td {
    border: 0 !important;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0 !important;
  }

  .pb-table-responsive td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--pb-muted);
  }
}

/* Toasts + loader */
.pb-toast-wrap {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: min(360px, calc(100vw - 2rem));
}

.pb-toast {
  background: #fff;
  border: 1px solid var(--pb-line);
  border-left: 4px solid var(--pb-brand);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  box-shadow: var(--pb-shadow);
  animation: pb-rise 0.25s ease both;
}

.pb-toast.is-error { border-left-color: var(--pb-danger); }
.pb-toast.is-success { border-left-color: var(--pb-ok); }

.pb-loader {
  position: fixed;
  inset: 0;
  background: rgba(18, 35, 28, 0.35);
  backdrop-filter: blur(2px);
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
}

.pb-loader.is-on { display: flex; }

.pb-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: pb-spin 0.7s linear infinite;
}

.pb-loader__card {
  background: #fff;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: var(--pb-shadow);
}

/* Legacy flashes stay visible until JS toasts them */
.flash-ok[data-pb-toasted],
.flash-err[data-pb-toasted],
.cvmsgok[data-pb-toasted],
.cvmsgno[data-pb-toasted],
.alert-success[data-pb-toasted],
.alert-danger[data-pb-toasted] {
  display: none !important;
}

.hamburger .line {
  background: var(--pb-ink) !important;
}

.hamburger[aria-expanded="true"] .line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hamburger[aria-expanded="true"] .line:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] .line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@keyframes pb-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pb-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pb-spin {
  to { transform: rotate(360deg); }
}

@keyframes pb-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-55%); }
}

/* Override old template leftovers */
.card {
  border: 1px solid var(--pb-line) !important;
  border-radius: var(--pb-radius) !important;
  box-shadow: var(--pb-shadow) !important;
  background: var(--pb-surface-2) !important;
}

.page-title h1,
.page-header h1 {
  font-family: var(--pb-display) !important;
}

.tital_name {
  background: transparent !important;
  border: 0 !important;
}

/* Legacy page polish inside themed shell */
.pb-shell .page-header {
  margin-bottom: 0.75rem !important;
  border: 0 !important;
  background: transparent !important;
}

.pb-shell .card {
  padding: 1rem 1.1rem;
}

.pb-shell .select2-container {
  width: 100% !important;
}

.pb-shell .nano-content {
  overflow-y: auto;
  max-height: 100vh;
}

/* Disable legacy mini-sidebar fighting the theme between 641–999px */
body.pb-shell .sidebar {
  width: var(--pb-sidebar) !important;
  left: 0 !important;
}
body.pb-shell.sidebar-hide .sidebar {
  /* ignore legacy class — PayeBill uses pb-nav-open on mobile only */
  left: 0 !important;
}

body.pb-nav-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(18, 35, 28, 0.35);
  z-index: 1035;
}

@media (min-width: 641px) {
  body.pb-nav-open::before { display: none; }
}
