@import url("rushpay-brand.css");
@import url("rushpay-public.css");
@import url("rushpay-portal.css");
@import url("rushpay-dashboard.css");

:root {
  --rp-brand: #FF6B00;
  --rp-brand-hover: #E65100;
  --rp-brand-soft: #FF9248;
  --rp-brand-rgb: 255, 107, 0;
  --rp-success: #10B981;
  --rp-success-rgb: 16, 185, 129;
  --rp-warning: #FBBF24;
  --rp-danger: #EF4444;
  --rp-bg-deep: #1D1B1B;
  --rp-bg-elevated: #201E1E;
  --rp-surface: #1A1A1A;
  --rp-text: #FFFFFF;
  --rp-text-muted: #B8BCC8;
  --rp-font: "Inter", "Segoe UI", Arial, sans-serif;
  --admin-primary: var(--rp-brand);
  --admin-sidebar: #201E1E;
}

html {
  font-family: var(--rp-font);
}

[x-cloak] {
  display: none !important;
}

/* Account balances are private by default and are revealed only for the current page view. */
.rp-private-balance {
  position: relative;
  display: inline-block;
}
body:not(.rp-balances-visible) .rp-private-balance {
  color: transparent !important;
  min-width: 6.2rem;
  user-select: none;
}
body:not(.rp-balances-visible) .rp-private-balance::after {
  content: "GH₵••••";
  position: absolute;
  inset: 0 auto auto 0;
  color: var(--rp-text, #182238);
}

html.rp-auth-pending body,
html.rp-auth-pending .admin-shell,
html.rp-auth-pending [data-rp-topnav],
html.rp-auth-pending [data-rp-sidebar],
html.rp-auth-pending [data-rp-bottomnav] {
  visibility: hidden !important;
}

/* Hide entire portal shell until auth gate releases */
body[data-rp-shell][x-cloak],
html.rp-auth-pending body[data-rp-shell] {
  display: block !important;
}

body[data-rp-shell][x-cloak] .admin-shell,
body[data-rp-shell][x-cloak] [data-rp-topnav],
body[data-rp-shell][x-cloak] [data-rp-sidebar],
body[data-rp-shell][x-cloak] [data-rp-bottomnav],
body[data-rp-shell][x-cloak] .dashboard-content,
body[data-rp-shell][x-cloak] > .admin-shell > .admin-main > .admin-footer {
  visibility: hidden;
}

/* Public marketing + auth: keep header visible while Alpine boots (not portal shell) */
body.rp-public-body[x-cloak]:not([data-rp-shell]) {
  display: flex !important;
  flex-direction: column;
}

body.rp-public-body[x-cloak]:not([data-rp-shell]) [data-rp-public-header],
body.rp-public-body[x-cloak]:not([data-rp-shell]) .rp-public-header {
  display: block !important;
  visibility: visible !important;
}

body.rp-public-body[x-cloak]:not([data-rp-shell]) > main,
body.rp-public-body[x-cloak]:not([data-rp-shell]) > .auth-page,
body.rp-public-body[x-cloak]:not([data-rp-shell]) > footer,
body.rp-public-body[x-cloak]:not([data-rp-shell]) > .public-page-wrap {
  visibility: hidden;
}

.rp-page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
}

.rp-notify-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.rp-notify-backdrop.is-active {
  display: flex;
}

.rp-notify-backdrop.is-visible {
  opacity: 1;
}

.rp-notify-popup {
  position: relative;
  width: min(100%, 380px);
  margin: 0;
  padding: 1.35rem 1.35rem 1.15rem;
  border-radius: var(--rp-radius-lg, 18px);
  border: 1px solid var(--rp-glass-border);
  background: var(--rp-glass-bg);
  color: var(--rp-text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

html[data-theme="light"] .rp-notify-popup {
  background: var(--rp-surface, #fff);
  box-shadow: var(--rp-shadow-elevated, 0 28px 65px rgba(15, 23, 42, 0.18));
}

.rp-notify-backdrop.is-visible .rp-notify-popup {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.rp-notify-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  border: 0;
  background: transparent;
  color: var(--rp-text-muted);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.rp-notify-close:hover {
  color: var(--rp-text);
  background: rgba(var(--rp-brand-rgb), 0.1);
}

.rp-notify-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 0.85rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.65rem;
}

.rp-notify-popup--success .rp-notify-icon {
  background: rgba(var(--rp-success-rgb), 0.16);
  color: var(--rp-success);
}

.rp-notify-popup--danger .rp-notify-icon {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
}

.rp-notify-popup--warning .rp-notify-icon {
  background: rgba(251, 191, 36, 0.18);
  color: #f59e0b;
}

.rp-notify-popup--info .rp-notify-icon {
  background: rgba(var(--rp-brand-rgb), 0.14);
  color: var(--rp-brand-soft);
}

.rp-notify-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.45rem;
  color: var(--rp-text);
}

.rp-notify-message {
  margin: 0 0 1rem;
  color: var(--rp-text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  word-break: break-word;
}

.rp-notify-action {
  min-width: 7rem;
  border-radius: 12px;
  font-weight: 600;
}

@media (max-width: 575.98px) {
  .rp-notify-backdrop {
    align-items: flex-end;
    padding: 0.75rem;
  }

  .rp-notify-popup {
    width: 100%;
    border-bottom-left-radius: calc(var(--rp-radius-lg, 18px) - 2px);
    border-bottom-right-radius: calc(var(--rp-radius-lg, 18px) - 2px);
  }
}

.sidebar-section-label {
  padding: 0.75rem 1rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rp-text-muted);
}

.sidebar-wallet {
  flex-shrink: 0;
  padding: 0.85rem 1rem 1rem;
  border-bottom: 1px solid var(--rp-glass-border);
}

.sidebar-wallet-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rp-text-muted);
  margin-bottom: 0.35rem;
}

.sidebar-wallet-balance {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--rp-text);
  line-height: 1.2;
}

.sidebar-balance-toggle {
  border: 0;
  background: transparent;
  color: var(--rp-text-muted);
  padding: 0;
  line-height: 1;
}

.sidebar-balance-toggle:hover {
  color: var(--rp-text);
}

.sidebar-wallet-name {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--rp-text-muted);
}

.sidebar-account {
  flex-shrink: 0;
  margin-top: 0;
  padding: 0.75rem 0 0.25rem;
  border-top: 1px solid var(--rp-glass-border);
}

.sidebar-account .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-account .nav-link[data-rp-logout-sidebar],
.sidebar-account .nav-link:last-child {
  color: #fca5a5;
}

.sidebar-account .nav-link[data-rp-logout-sidebar]:hover,
.sidebar-account .nav-link:last-child:hover {
  color: #fecaca;
}

.brand-mark .brand-title {
  font-weight: 700;
}

html.rp-dialog-open,
html.rp-dialog-open body {
  overflow: hidden;
}

.rp-dialog-root {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.rp-dialog-root.is-open {
  display: flex;
}

.rp-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 24, 0.62);
  backdrop-filter: blur(4px);
}

.rp-dialog-card {
  position: relative;
  width: min(100%, 420px);
  padding: 1.5rem 1.35rem 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--rp-glass-border, rgba(255, 255, 255, 0.12));
  background: var(--rp-bg-elevated, var(--rp-surface, #fff));
  box-shadow: var(--rp-shadow-elevated, 0 28px 65px rgba(0, 0, 0, 0.35));
  color: var(--rp-text, #111827);
  text-align: center;
}

.rp-dialog-icon {
  font-size: 2rem;
  color: var(--rp-brand, #ff6b00);
  margin-bottom: 0.65rem;
}

.rp-dialog-root.rp-dialog-danger .rp-dialog-icon {
  color: var(--rp-danger, #ef4444);
}

.rp-dialog-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

.rp-dialog-message {
  margin: 0 0 1.25rem;
  color: var(--rp-text-muted, #6b7280);
  line-height: 1.5;
}

.rp-dialog-actions {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.rp-dialog-root.rp-dialog-alert [data-rp-dialog-cancel] {
  display: none;
}

.rp-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  display: flex;
  justify-content: space-around;
  background: var(--admin-card-bg, #fff);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.35rem 0 calc(0.35rem + env(safe-area-inset-bottom));
}

.rp-bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.65rem;
  color: var(--rp-text-muted);
  text-decoration: none;
}

.rp-bottom-nav-link.active,
.rp-bottom-nav-link:hover {
  color: var(--rp-brand);
}

.rp-bottom-nav-link i {
  font-size: 1.2rem;
}

.rp-bottom-nav-menu {
  border: 0;
  background: transparent;
}

.rp-bottom-nav-featured i {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--admin-primary), #ff8c42);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 107, 0, 0.35);
}

.rp-bottom-nav-featured {
  color: var(--rp-text) !important;
  font-weight: 700;
}

.rp-bottom-nav-featured.active i {
  outline: 3px solid rgba(var(--rp-brand-rgb), 0.2);
}

/* V2.5 mobile command menu: raised above a soft curved cradle. */
body[data-rp-shell="user"] .rp-bottom-nav:has(.rp-bottom-nav-center)::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -1px;
  left: 50%;
  width: 5.25rem;
  height: 2.35rem;
  transform: translateX(-50%);
  border-radius: 0 0 2.8rem 2.8rem;
  background: var(--admin-bg, var(--bs-body-bg, #f7f8fb));
  box-shadow: inset 0 -1px 0 rgba(var(--rp-brand-rgb), 0.08);
  pointer-events: none;
}

body[data-rp-shell="user"] .rp-bottom-nav-link {
  position: relative;
  z-index: 1;
  flex: 1 1 20%;
}

body[data-rp-shell="user"] .rp-bottom-nav-center {
  z-index: 2;
  transform: translateY(-1.15rem);
  color: var(--rp-brand) !important;
  font-weight: 800;
}

body[data-rp-shell="user"] .rp-bottom-nav-center i {
  width: 3.65rem;
  height: 3.65rem;
  border: 0.32rem solid var(--admin-bg, var(--bs-body-bg, #f7f8fb));
  background: linear-gradient(145deg, #f59a3d 0%, var(--admin-primary, #eb7b20) 55%, #d86712 100%);
  box-shadow: 0 0.7rem 1.4rem rgba(222, 104, 20, 0.34), inset 0 1px 0 rgba(255,255,255,0.38);
  font-size: 1.55rem;
  transition: transform .18s ease, box-shadow .18s ease;
}

body[data-rp-shell="user"] .rp-bottom-nav-center:active i {
  transform: scale(.94);
  box-shadow: 0 .35rem .85rem rgba(222, 104, 20, .28);
}

body[data-rp-shell="user"] .rp-bottom-nav-center span {
  margin-top: -.08rem;
  padding: .08rem .45rem;
  border-radius: 999px;
  background: var(--admin-card-bg, #fff);
  box-shadow: 0 .18rem .55rem rgba(15,23,42,.09);
  letter-spacing: .02em;
}

@media (max-width: 991.98px) {
  body[data-rp-shell="user"] .dashboard-content {
    padding-bottom: 4.5rem;
  }

  body[data-rp-shell="user"] .rp-bottom-nav {
    padding-bottom: calc(0.12rem + env(safe-area-inset-bottom));
  }

  body[data-rp-shell="user"] .rp-bottom-nav-link {
    padding-bottom: 0.12rem;
  }

  body[data-rp-shell="user"] .rp-bottom-nav-link:not(.rp-bottom-nav-center) {
    padding-top: 1.5rem;
  }
}

.auth-brand strong {
  color: var(--admin-primary);
}

.pin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.pin-modal-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .pin-modal-card {
  background: #1e293b;
  color: #f8fafc;
}

.rp-coming-soon {
  border: 1px dashed rgba(100, 116, 139, 0.4);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  color: #64748b;
}

.public-hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  color: var(--rp-text);
}

.public-stat {
  font-size: 1.75rem;
  font-weight: 700;
}

.admin-footer span a {
  text-decoration: none;
}
/* Compact user account navigation group. */
body[data-rp-shell="user"] .sidebar-account-group {
  padding: 0.45rem 0.75rem 0.55rem;
}

body[data-rp-shell="user"] .sidebar-account-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.62rem 0.7rem;
  border: 0;
  border-radius: 9px;
  background: rgba(100, 116, 139, 0.07);
  color: var(--rp-text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-align: left;
  text-transform: uppercase;
}

body[data-rp-shell="user"] .sidebar-account-toggle:hover,
body[data-rp-shell="user"] .sidebar-account-toggle:focus,
body[data-rp-shell="user"] .sidebar-account-toggle[aria-expanded="true"] {
  background: rgba(100, 116, 139, 0.12);
  color: var(--rp-text);
}

body[data-rp-shell="user"] .sidebar-account-toggle i {
  flex: 0 0 auto;
  font-size: 0.72rem;
  transition: transform 0.18s ease;
}

body[data-rp-shell="user"] .sidebar-account-toggle[aria-expanded="true"] i {
  color: var(--rp-brand);
  transform: rotate(180deg);
}

body[data-rp-shell="user"] .sidebar-account-links {
  display: grid;
  gap: 0.16rem;
  padding-top: 0.28rem;
}

body[data-rp-shell="user"] .sidebar-account-links[hidden] {
  display: none;
}

html[data-theme="dark"] body[data-rp-shell="user"] .sidebar-account-toggle {
  background: rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] body[data-rp-shell="user"] .sidebar-account-toggle:hover,
html[data-theme="dark"] body[data-rp-shell="user"] .sidebar-account-toggle:focus,
html[data-theme="dark"] body[data-rp-shell="user"] .sidebar-account-toggle[aria-expanded="true"] {
  background: rgba(148, 163, 184, 0.14);
}

@media (min-width: 992px) {
  body.sidebar-mini[data-rp-shell="user"] .sidebar-account-toggle {
    display: none !important;
  }

  body.sidebar-mini[data-rp-shell="user"] .sidebar-account-group {
    padding: 0.35rem;
  }

  body.sidebar-mini[data-rp-shell="user"] .sidebar-account-links,
  body.sidebar-mini[data-rp-shell="user"] .sidebar-account-links[hidden] {
    display: grid !important;
    padding-top: 0;
  }
}
