/* ============================================================
   MLM Platform — Global Design System
   Theme: Green / White / Black
   Font: Inter (Google Fonts)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---- CSS Custom Properties -------------------------------- */
:root {
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;

  --dark-950: #020b06;
  --dark-900: #0a1a0f;
  --dark-800: #0f2318;
  --dark-700: #1a3a26;
  --dark-600: #1e4a30;

  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --white: #ffffff;
  --black: #000000;

  --primary: var(--green-600);
  --primary-dark: var(--green-700);
  --primary-light: var(--green-400);
  --surface: var(--white);
  --bg: var(--gray-100);
  --text: var(--gray-900);
  --text-muted: var(--gray-500);
  --border: var(--gray-200);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .10);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .14);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, .18);
  --shadow-green: 0 4px 20px rgba(22, 163, 74, .25);

  --sidebar-w: 260px;
  --topbar-h: 64px;
  --transition: .2s ease;
}

/* ---- Reset ----------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input,
select,
textarea,
button {
  font-family: inherit;
}

ul {
  list-style: none;
}

/* ---- Typography ------------------------------------------ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.25;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

h4 {
  font-size: 1.125rem;
}

p {
  color: var(--text-muted);
  line-height: 1.8;
}

.text-center {
  text-align: center;
}

.text-green {
  color: var(--primary);
}

.text-muted {
  color: var(--text-muted);
}

.text-white {
  color: var(--white);
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

/* ---- Container ------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-sm {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   PUBLIC NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 26, 15, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  height: var(--topbar-h);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
}

.navbar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.navbar-brand span {
  color: var(--green-400);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.navbar-nav a {
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .8);
  transition: all var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--white);
  background: rgba(255, 255, 255, .08);
}

.navbar-nav .btn-nav-login {
  background: var(--primary);
  color: var(--white) !important;
  padding: .5rem 1.25rem;
  border-radius: var(--radius-full);
}

.navbar-nav .btn-nav-login:hover {
  background: var(--primary-dark);
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .5rem;
  background: transparent;
  border: none;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1.5rem;
  min-height: 44px;
  border-radius: var(--radius-full);
  font-size: .9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-green);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(22, 163, 74, .35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, .3);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .6);
}

.btn-dark {
  background: var(--dark-800);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--dark-700);
}

.btn-danger {
  background: #dc2626;
  color: var(--white);
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-warning {
  background: #d97706;
  color: var(--white);
}

.btn-success {
  background: var(--primary);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
}

.btn-ghost:hover {
  background: var(--green-50);
}

.btn-sm {
  padding: .4rem 1rem;
  font-size: .8rem;
}

.btn-lg {
  padding: .85rem 2rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  max-width: 100%;
  overflow-x: auto;
  word-wrap: break-word;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: .5rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}

/* Stat Cards */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon.green {
  background: var(--green-100);
  color: var(--green-700);
}

.stat-icon.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.stat-icon.purple {
  background: #ede9fe;
  color: #7c3aed;
}

.stat-icon.orange {
  background: #ffedd5;
  color: #c2410c;
}

.stat-icon.teal {
  background: #ccfbf1;
  color: #0d9488;
}

.stat-icon.red {
  background: #fee2e2;
  color: #dc2626;
}

.stat-label {
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: .3rem;
  line-height: 1.3;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  white-space: nowrap;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: .4rem;
}

.form-control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: .7rem 1rem;
  min-height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  /* Prevents iOS auto-zoom */
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

select.form-control {
  max-width: 100% !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%2364748b' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.2rem !important;
}

select.form-control option {
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}

.form-control::placeholder {
  color: var(--gray-400);
}

.form-control.is-invalid {
  border-color: #dc2626;
}

.form-hint {
  font-size: .78rem;
  color: var(--gray-400);
  margin-top: .3rem;
}

.form-error {
  font-size: .8rem;
  color: #dc2626;
  margin-top: .3rem;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .7rem;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
}

.badge-success {
  background: var(--green-100);
  color: var(--green-700);
}

.badge-danger {
  background: #fee2e2;
  color: #dc2626;
}

.badge-warning {
  background: #fef3c7;
  color: #d97706;
}

.badge-info {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-muted {
  background: var(--gray-100);
  color: var(--gray-600);
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: .9rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: .9rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}

.alert-success {
  background: var(--green-100);
  color: var(--green-800);
  border-left: 4px solid var(--green-600);
}

.alert-error {
  background: #fee2e2;
  color: #7f1d1d;
  border-left: 4px solid #dc2626;
}

.alert-warning {
  background: #fef3c7;
  color: #78350f;
  border-left: 4px solid #d97706;
}

.alert-info {
  background: #dbeafe;
  color: #1e3a8a;
  border-left: 4px solid #3b82f6;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 65vh;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.table th {
  background: var(--gray-50, #f8fafc);
  padding: .85rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--gray-600);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--gray-700);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--gray-50, #f8fafc);
}

.table-responsive {
  overflow-x: auto;
}

/* ============================================================
   PANEL LAYOUT (Member + Admin)
   ============================================================ */
.panel-wrapper {
  display: flex;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: #f0f4f0;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--dark-900);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  flex-shrink: 0;
}

.sidebar-brand .brand-logo {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--white);
}

.sidebar-brand .brand-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
}

.sidebar-brand .brand-sub {
  font-size: .72rem;
  color: var(--green-400);
  font-weight: 500;
}

.sidebar-nav {
  padding: 1rem 0;
  flex: 1;
}

.sidebar-section {
  padding: .5rem 1rem .25rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .3);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.25rem;
  margin: .15rem .75rem;
  border-radius: var(--radius-md);
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .6);
  transition: all var(--transition);
}

.sidebar-nav a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, .07);
}

.sidebar-nav a.active {
  color: var(--white);
  background: var(--primary);
  box-shadow: 0 2px 12px rgba(22, 163, 74, .35);
}

.sidebar-nav a .nav-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: rgba(255, 255, 255, .05);
  border-radius: var(--radius-md);
  margin-bottom: .5rem;
}

.sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .95rem;
  color: var(--white);
  flex-shrink: 0;
}

.sidebar-user-info {
  overflow: hidden;
}

.sidebar-user-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: .72rem;
  color: var(--green-400);
}

/* Main content */
.panel-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 769px) {
  body.sidebar-collapsed .sidebar {
    width: 76px;
  }

  body.sidebar-collapsed .panel-main {
    margin-left: 76px;
  }

  /* Hide textual content in sidebar */
  body.sidebar-collapsed .sidebar-brand {
    padding: 1.25rem 0;
    justify-content: center;
  }

  body.sidebar-collapsed .sidebar-brand>div:not(.brand-logo) {
    display: none;
  }

  body.sidebar-collapsed .sidebar-section {
    display: none;
  }

  body.sidebar-collapsed .sidebar-user-info {
    display: none;
  }

  /* Adjust links */
  body.sidebar-collapsed .sidebar-nav a {
    justify-content: center;
    padding: .65rem 0;
    font-size: 0;
    /* Hides the text node */
  }

  body.sidebar-collapsed .sidebar-nav a .nav-icon {
    font-size: 1.25rem;
    margin: 0;
  }

  /* Adjust footer user block */
  body.sidebar-collapsed .sidebar-user {
    justify-content: center;
    padding: .75rem 0;
  }

  body.sidebar-collapsed .sidebar-avatar {
    margin: 0;
  }

  /* Adjust logout button text visibility (clip it if possible, or font-size 0 with ::before emoji) */
  body.sidebar-collapsed .sidebar-footer .btn {
    font-size: 0;
    padding: .5rem 0;
    justify-content: center;
  }

  body.sidebar-collapsed .sidebar-footer .btn::before {
    content: '🚪';
    font-size: 1.2rem;
  }
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.topbar-greeting {
  font-size: .85rem;
  color: var(--gray-500);
}

.topbar-greeting strong {
  color: var(--gray-800);
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-700);
  cursor: pointer;
  padding: .3rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background var(--transition);
  line-height: 1;
}

.sidebar-toggle-btn:hover {
  background: var(--gray-100);
}

/* Panel body */
.panel-body {
  padding: 1.75rem;
  flex: 1;
  overflow-y: auto;
  height: calc(100vh - var(--topbar-h));
}

/* Custom Scrollbar for Panel Body */
.panel-body::-webkit-scrollbar {
  width: 6px;
}

.panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.panel-body::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

.panel-body::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

.panel-body .page-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stats-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.stats-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.stats-grid.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1280px) and (min-width: 993px) {
  .stats-grid.cols-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Default fallback if no cols specified */
.stats-grid:not(.cols-3):not(.cols-4):not(.cols-5) {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* ============================================================
   IMPERSONATION BANNER
   ============================================================ */
.impersonate-banner {
  background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 45%, #7c3aed 100%);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 9999;
  padding: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 24px rgba(109, 40, 217, 0.45);
}

.impersonate-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.5rem;
  max-width: 100%;
}

.impersonate-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.impersonate-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}

.impersonate-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.impersonate-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

.impersonate-username {
  font-weight: 800;
  font-size: 0.92rem;
  color: #fff;
  letter-spacing: 0.01em;
}

.impersonate-mode-badge {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #e9d5ff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.impersonate-exit-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
  white-space: nowrap;
  flex-shrink: 0;
}

.impersonate-exit-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 480px) {
  .impersonate-banner-inner {
    padding: 0.55rem 1rem;
    gap: 0.6rem;
  }

  .impersonate-label {
    display: none;
  }

  .impersonate-mode-badge {
    display: none;
  }

  .impersonate-username {
    font-size: 0.85rem;
  }

  .impersonate-exit-btn {
    font-size: 0.75rem;
    padding: 0.28rem 0.75rem;
  }
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn .25s ease;
}

@keyframes modalIn {
  from {
    transform: translateY(20px) scale(.97);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: var(--gray-100);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   OFFICIAL RECEIPT MODAL — WHITE BACKGROUND NEON 3D REDESIGN
   ============================================================ */

/* Overlay */
.rcpt-overlay {
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: 9999 !important;
  padding: 1rem 0.5rem;
  box-sizing: border-box;
  animation: none !important;
}

.rcpt-overlay.active {
  display: flex !important;
}

.rcpt-overlay.active .rcpt-card {
  animation: rcptCardIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes rcptCardIn {
  from { transform: translateY(20px) scale(0.95); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Main Card — Pure White Background with Glowing Neon Purple Border */
.rcpt-card {
  background: #ffffff !important;
  border: 2px solid #8b5cf6;
  border-radius: 26px;
  width: min(94vw, 420px);
  max-height: 94vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 
    0 0 0 1px rgba(139, 92, 246, 0.3),
    0 0 32px rgba(139, 92, 246, 0.22),
    0 25px 60px -10px rgba(15, 23, 42, 0.35);
  margin: auto;
}

/* Top Mini Bar */
.rcpt-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem 0.25rem;
  background: #ffffff;
}

.rcpt-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.rcpt-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.rcpt-close-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
  transform: rotate(90deg) scale(1.08);
}

/* Scrollable Body */
.rcpt-body-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.25rem 0.75rem 0.5rem;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

/* ── 3D Banner Plaque ── */
.rcpt-banner-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding-top: 0.25rem;
}

.rcpt-banner {
  position: relative;
  background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 45%, #4c1d95 100%);
  border: 2.5px solid #c084fc;
  border-radius: 16px;
  padding: 0.55rem 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 
    0 0 20px rgba(168, 85, 247, 0.55),
    0 8px 18px rgba(76, 29, 149, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: perspective(400px) rotateX(2deg);
}

.rcpt-banner-text {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.15rem;
  font-weight: 950;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  text-shadow: 
    0 1px 0 #3b0764,
    0 2px 0 #2e1065,
    0 4px 8px rgba(0, 0, 0, 0.45);
}

.rcpt-banner-wing {
  display: flex;
  gap: 2.5px;
}
.rcpt-wing-left span,
.rcpt-wing-right span {
  display: block;
  width: 3.5px;
  height: 18px;
  background: #c084fc;
  border-radius: 2px;
  box-shadow: 0 0 6px #c084fc;
}
.rcpt-wing-left {
  transform: skewX(-20deg);
}
.rcpt-wing-right {
  transform: skewX(20deg);
}

/* ── Rays + Approved Badge ── */
.rcpt-approved-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.15rem;
}

.rcpt-rays {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 8px;
}

.rcpt-rays span {
  display: block;
  background: #22c55e;
  border-radius: 2px;
  box-shadow: 0 0 6px #22c55e;
}
.rcpt-ray-l {
  width: 2.5px;
  height: 7px;
  transform: rotate(-35deg);
}
.rcpt-ray-c {
  width: 2.5px;
  height: 8px;
}
.rcpt-ray-r {
  width: 2.5px;
  height: 7px;
  transform: rotate(35deg);
}

.rcpt-approved-badge {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 55%, #15803d 100%);
  border: 2px solid #86efac;
  border-radius: 999px;
  padding: 0.32rem 1.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 
    0 0 16px rgba(34, 197, 94, 0.5),
    0 4px 10px rgba(21, 128, 61, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  color: #ffffff;
  font-weight: 950;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rcpt-check-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ── White Details Card with Glowing Purple Border ── */
.rcpt-details-box {
  background: #ffffff;
  border: 2px solid #8b5cf6;
  border-radius: 22px;
  padding: 0.75rem 1rem;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 
    0 0 16px rgba(139, 92, 246, 0.15),
    0 4px 16px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
}

.rcpt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.rcpt-row:last-child {
  border-bottom: none;
}

.rcpt-row-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.84rem;
  font-weight: 800;
  color: #1e1b4b;
  white-space: nowrap;
  flex-shrink: 0;
}

.rcpt-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  box-shadow: 0 3px 8px rgba(109, 40, 217, 0.35);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rcpt-row-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
  text-align: right;
  word-break: break-word;
}

.rcpt-amount-primary {
  font-size: 0.95rem;
  font-weight: 950;
  color: #0f172a;
  line-height: 1.2;
}

.rcpt-amount-secondary {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  margin-top: 1px;
}

.rcpt-method-val {
  font-weight: 950;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.rcpt-name-val {
  font-weight: 800;
  color: #0f172a;
}

/* TID + Copy Pill */
.rcpt-tid-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.rcpt-tid-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 800;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.rcpt-copy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #7c3aed;
  border-radius: 6px;
  padding: 0.2rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.rcpt-copy-pill:hover {
  background: #ede9fe;
  color: #6d28d9;
  border-color: #c4b5fd;
}

.rcpt-copy-pill.copied {
  background: #dcfce7 !important;
  color: #15803d !important;
  border-color: #86efac !important;
}

.rcpt-status-highlight {
  color: #16a34a;
  font-weight: 950 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.02em;
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.25);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.rcpt-status-highlight.is-pending,
.rcpt-status-highlight[data-status="pending"] {
  color: #d97706 !important;
  text-shadow: 0 0 6px rgba(217, 119, 6, 0.25) !important;
}

.rcpt-status-highlight.is-rejected,
.rcpt-status-highlight.is-failed,
.rcpt-status-highlight[data-status="rejected"] {
  color: #dc2626 !important;
  text-shadow: 0 0 6px rgba(220, 38, 38, 0.25) !important;
}

.rcpt-status-highlight.is-success,
.rcpt-status-highlight.is-approved,
.rcpt-status-highlight[data-status="success"],
.rcpt-status-highlight[data-status="approved"] {
  color: #16a34a !important;
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.25) !important;
}

.rcpt-gen-badge {
  display: inline-flex;
  align-items: center;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.rcpt-note {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3.5px solid #8b5cf6;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.rcpt-note-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.rcpt-note-text {
  font-size: 0.78rem;
  color: #334155;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

/* ── Footer Branding ── */
.rcpt-branding-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0.4rem 0 0.15rem;
  gap: 0.15rem;
}

.rcpt-thanks-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
}

.rcpt-dash {
  flex: 1;
  max-width: 50px;
  height: 1.5px;
  background: #cbd5e1;
}

.rcpt-thanks-text {
  font-family: Georgia, 'Playfair Display', serif, cursive;
  font-style: italic;
  font-size: 0.95rem;
  color: #64748b;
  font-weight: 600;
}

.rcpt-brand-title {
  font-size: 1.35rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 3px rgba(124, 58, 237, 0.2));
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
}

.rcpt-slogan {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}

/* ── Footer Action Bar ── */
.rcpt-action-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.rcpt-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.6rem 0.45rem;
  border-radius: 10px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
  line-height: 1.2;
  white-space: nowrap;
}

.rcpt-btn-copy {
  background: #ffffff;
  color: #475569;
  border-color: #cbd5e1;
}
.rcpt-btn-copy:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.rcpt-btn-print {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.35);
}
.rcpt-btn-print:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(124, 58, 237, 0.45);
}

.rcpt-btn-close {
  background: #ffffff;
  color: #ef4444;
  border-color: #fecaca;
}
.rcpt-btn-close:hover {
  background: #fee2e2;
  border-color: #f87171;
}

/* ── Mobile Responsive ── */
@media (max-width: 480px) {
  .rcpt-card {
    width: min(95vw, 380px);
    border-radius: 20px;
  }
  .rcpt-banner {
    padding: 0.45rem 1.1rem;
  }
  .rcpt-banner-text {
    font-size: 1rem;
  }
  .rcpt-approved-badge {
    font-size: 0.78rem;
    padding: 0.28rem 1rem;
  }
  .rcpt-details-box {
    padding: 0.6rem 0.75rem;
    border-radius: 18px;
  }
  .rcpt-row {
    padding: 0.45rem 0;
  }
  .rcpt-row-label {
    font-size: 0.78rem;
    gap: 0.45rem;
  }
  .rcpt-icon-circle {
    width: 28px;
    height: 28px;
  }
  .rcpt-row-val {
    font-size: 0.78rem;
  }
  .rcpt-brand-title {
    font-size: 1.15rem;
  }
  .rcpt-action-bar {
    padding: 0.6rem 0.75rem;
    gap: 0.35rem;
  }
  .rcpt-btn {
    font-size: 0.72rem;
    padding: 0.5rem 0.3rem;
  }
}

/* ── Clean White Print ── */
@media print {
  body > *:not(#receiptModal) { display: none !important; }
  #receiptModal {
    display: block !important;
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
  }
  .rcpt-card {
    box-shadow: none !important;
    border: 1.5px solid #8b5cf6 !important;
    max-width: 100% !important;
    width: 440px !important;
    margin: 1rem auto !important;
    background: #ffffff !important;
  }
  .rcpt-close-btn, .rcpt-top-bar, .rcpt-action-bar { display: none !important; }
  .rcpt-banner {
    background: #7c3aed !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .rcpt-approved-badge {
    background: #16a34a !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .rcpt-icon-circle {
    background: #8b5cf6 !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ============================================================
   BINARY TREE STYLES
   ============================================================ */
.tree-container {
  overflow: auto;
  padding: 2rem;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.tree-level {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: .5rem;
}

.tree-node {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.tree-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: .6rem 1rem;
  text-align: center;
  min-width: 110px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.tree-card.active-member {
  border-color: var(--green-400);
}

.tree-card.pending-member {
  border-color: #fbbf24;
}

.tree-card.self-node {
  border-color: var(--primary);
  background: var(--green-50);
}

.tree-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tree-card .tree-username {
  font-size: .82rem;
  font-weight: 700;
  color: var(--gray-800);
}

.tree-card .tree-status {
  font-size: .68rem;
  margin-top: .15rem;
}

.tree-card .tree-side {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.tree-card .tree-side.left {
  background: #3b82f6;
  color: var(--white);
}

.tree-card .tree-side.right {
  background: #8b5cf6;
  color: var(--white);
}

.tree-empty {
  background: var(--gray-100);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: .6rem 1rem;
  min-width: 110px;
  text-align: center;
  font-size: .8rem;
  color: var(--gray-400);
}

.tree-connector {
  width: 2px;
  background: var(--gray-300);
  height: 24px;
  margin: 0 auto;
}

.tree-branch {
  display: flex;
  justify-content: center;
}

/* ============================================================
   HOME PAGE — HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--dark-950) 0%, var(--dark-800) 50%, #0d2b18 100%);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--topbar-h);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(22, 163, 74, .18), transparent),
    radial-gradient(ellipse 40% 40% at 80% 60%, rgba(22, 163, 74, .1), transparent);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(22, 163, 74, .15);
  border: 1px solid rgba(22, 163, 74, .3);
  color: var(--green-400);
  padding: .4rem 1rem;
  border-radius: var(--radius-full);
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-title {
  color: var(--white);
  margin-bottom: 1.25rem;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.15;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--green-400), var(--green-600));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  color: rgba(255, 255, 255, .7);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Floating binary tree illustration */
.tree-illustration {
  position: relative;
  animation: floating 4s ease-in-out infinite;
}

@keyframes floating {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

.tree-illus-node {
  position: absolute;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .3);
}



/* ============================================================
   SECTIONS (PUBLIC PAGES)
   ============================================================ */
section {
  padding: 5rem 0;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--green-100);
  color: var(--green-700);
  padding: .3rem .9rem;
  border-radius: var(--radius-full);
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: .75rem;
}

.section-title {
  margin-bottom: .75rem;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 3rem;
}

.dark-section {
  background: var(--dark-900);
  color: var(--white);
}

.dark-section p {
  color: rgba(255, 255, 255, .65);
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-200);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--green-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}

.feature-title {
  font-size: 1.1rem;
  margin-bottom: .5rem;
}

.feature-desc {
  font-size: .9rem;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
}

.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-600), var(--green-400));
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: var(--shadow-green);
}

.step-title {
  font-size: 1.05rem;
  margin-bottom: .5rem;
}

.step-desc {
  font-size: .88rem;
}

/* Plan card (public) */
.plan-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
  border: 2px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.plan-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}

.plan-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: 16px;
  right: -28px;
  background: var(--primary);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: .3rem 2.5rem;
  transform: rotate(45deg);
}

.plan-price-big {
  font-size: 3rem;
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1;
}

.plan-price-big span {
  font-size: 1.2rem;
}

.plan-features {
  margin: 1.5rem 0;
  text-align: left;
}

.plan-feature {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem 0;
  font-size: .9rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--border);
}

.plan-feature:last-child {
  border: none;
}

.plan-feature .check {
  color: var(--green-600);
}

/* Contact Cards */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.contact-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.contact-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  border: 4px solid var(--green-200);
}

.contact-name {
  font-size: 1.3rem;
  margin-bottom: .25rem;
}

.contact-role {
  color: var(--green-600);
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.contact-info {
  font-size: .9rem;
  color: var(--gray-600);
  line-height: 2;
}

.contact-info a {
  color: var(--primary);
}

/* ============================================================
   PUBLIC FOOTER
   ============================================================ */
.footer {
  background: var(--dark-950);
  color: rgba(255, 255, 255, .65);
  padding: 4rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand .brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: .75rem;
}

.footer-brand p {
  font-size: .88rem;
  line-height: 1.8;
}

.footer-heading {
  font-size: .88rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.footer-links a {
  font-size: .88rem;
  color: rgba(255, 255, 255, .55);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--green-400);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .82rem;
}

/* ============================================================
   WORKING DETAILS PAGE
   ============================================================ */
.tree-demo {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin: 2rem 0;
  overflow-x: auto;
}

.commission-table {
  width: 100%;
  border-collapse: collapse;
}

.commission-table th {
  background: var(--green-600);
  color: var(--white);
  padding: .75rem 1rem;
  text-align: left;
  font-size: .88rem;
}

.commission-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}

.commission-table tr:nth-child(even) {
  background: var(--green-50);
}

/* ============================================================
   AUTH PAGES (login/register)
   ============================================================ */
/* Auth page entry animation */
@keyframes authSlideUp {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes authGlow {

  0%,
  100% {
    opacity: 0.15;
    transform: scale(1);
  }

  50% {
    opacity: 0.25;
    transform: scale(1.05);
  }
}

.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--dark-950) 0%, var(--dark-800) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  padding-top: calc(var(--topbar-h) + 4rem);
  padding-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(22, 163, 74, .15), transparent);
  animation: authGlow 4s ease-in-out infinite;
}

.auth-page::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(22, 163, 74, .12), transparent 70%);
  bottom: -100px;
  right: -100px;
  border-radius: 50%;
  animation: authGlow 5s ease-in-out infinite reverse;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.75rem 2.5rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .25), 0 0 80px rgba(22, 163, 74, .08);
  position: relative;
  z-index: 1;
  animation: authSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-card-wide {
  max-width: 720px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo .logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), #4ade80);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto .85rem;
  box-shadow: 0 8px 24px rgba(22, 163, 74, .3);
}

.auth-title {
  font-size: 1.65rem;
  text-align: center;
  margin-bottom: .4rem;
  font-weight: 800;
}

.auth-subtitle {
  font-size: .9rem;
  text-align: center;
}

.auth-divider {
  text-align: center;
  margin: 1.25rem 0;
  position: relative;
  font-size: .82rem;
  color: var(--gray-400);
}

.auth-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  position: relative;
  background: var(--white);
  padding: 0 .75rem;
}

.auth-footer-link {
  text-align: center;
  font-size: .9rem;
  margin-top: 1.5rem;
  color: var(--gray-500);
}

.auth-footer-link a {
  color: var(--primary);
  font-weight: 600;
}

/* Form rows */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ============================================================
   RANK BADGE SIZES
   ============================================================ */
.rank-card {
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 2px solid var(--border);
  transition: all var(--transition);
}

.rank-card.achieved {
  border-color: var(--green-400);
  background: var(--green-50);
}

.rank-card.locked {
  opacity: .65;
}

.rank-icon {
  font-size: 2.5rem;
  margin-bottom: .75rem;
}

.rank-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.rank-req {
  font-size: .82rem;
  color: var(--gray-500);
}

.rank-prize {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--green-700);
  margin-top: .5rem;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  min-width: 36px;
  width: auto;
  padding: 0 9px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  border: 1px solid var(--border);
  color: var(--gray-700);
  background: #ffffff;
  transition: all var(--transition);
  flex-shrink: 0;
  text-decoration: none;
}

.pagination a:hover {
  background: var(--green-50);
  border-color: var(--green-400);
  color: var(--green-700);
  transform: translateY(-1px);
}

.pagination .active {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: var(--white);
  border-color: #16a34a;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.3);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.mt-1 {
  margin-top: .25rem;
}

.mt-2 {
  margin-top: .5rem;
}

.mt-3 {
  margin-top: .75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: .25rem;
}

.mb-2 {
  margin-bottom: .5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.gap-2 {
  gap: .5rem;
}

.gap-3 {
  gap: .75rem;
}

.gap-4 {
  gap: 1rem;
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.grid {
  display: grid;
}

.hidden {
  display: none !important;
}

.d-block {
  display: block;
}

.w-full {
  width: 100%;
}

.relative {
  position: relative;
}

.overflow-hidden {
  overflow: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
.mobile-only {
  display: none !important;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .navbar-nav {
    display: none;
  }

  .navbar-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    background: var(--dark-900);
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    gap: .25rem;
  }

  .navbar-toggle {
    display: flex;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
  }

  .hero-visual {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
  }

  .hero-visual>div {
    width: 380px !important;
    height: 320px !important;
    transform: scale(0.82);
    transform-origin: top center;
  }

  .hero-actions {
    justify-content: center;
  }

  .form-row {
    grid-template-columns: 1fr !important;
  }

  .btn {
    white-space: normal;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* Panel and Sidebar */
  .sidebar {
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1000 !important;
    box-shadow: none;
  }

  .stats-grid.cols-3,
  .stats-grid.cols-4,
  .stats-grid.cols-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar.open {
    transform: translateX(0) !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.6) !important;
  }

  .panel-main {
    margin-left: 0;
    width: 100%;
    max-width: 100vw;
  }

  .sidebar-toggle-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 999 !important;
  }

  .sidebar-overlay.active {
    display: block !important;
  }

  .panel-body {
    padding: 0.85rem 0.85rem 110px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  /* Grids override (fix inline column styles breaking mobile) */
  .grid[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Tables */
  .table-wrapper {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Modals */
  .modal {
    padding: 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
    width: 95% !important;
    margin: 10px;
  }

  .modal-overlay {
    padding: 0.5rem;
  }

  /* Mobile Transaction Cards */
  .txn-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.25rem 0;
  }

  /* On dashboard/history, cap at 8 cards */
  .dashboard-txn-list {
    max-height: calc(8 * 72px + 7 * 0.6rem);
    overflow-y: auto;
  }

  .txn-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.85rem;
    background: var(--gray-50, #f8fafc);
    border-radius: 14px;
    border: 1px solid var(--border);
  }

  .txn-card-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .txn-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-600);
    flex-shrink: 0;
  }

  .txn-card-type {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-800);
  }

  .txn-card-date {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 2px;
  }

  .txn-card-amount {
    font-size: 0.95rem;
    font-weight: 700;
    flex-shrink: 0;
  }

  .txn-card-amount.credit {
    color: var(--green-700);
  }

  .txn-card-amount.debit {
    color: #dc2626;
  }

  /* Mobile Bottom Navigation */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    /* Dark background */
    border-radius: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    display: flex !important;
    align-items: center;
    justify-content: space-around;
    padding: 0.5rem;
    width: 92%;
    max-width: 400px;
    z-index: 150;
  }

  .mobile-bottom-nav .nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 1.35rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    transition: all 0.3s ease;
  }

  .mobile-bottom-nav .nav-item.active {
    color: #ffffff;
  }

  .mobile-bottom-nav .nav-item-main {
    background: var(--primary);
    color: #ffffff !important;
    transform: translateY(-15px);
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.5);
    width: 56px;
    height: 56px;
    border: 5px solid #111827;
    /* Matches the dark background for a seamless pop-out */
  }

  .mobile-bottom-nav .nav-item-main .icon {
    font-size: 1.5rem;
  }

  /* Typography & Visibility */
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: flex !important;
  }

  .panel-body .page-title {
    font-size: 1.15rem;
  }

  .topbar {
    padding: 0 0.75rem;
    gap: 0.5rem;
  }

  .topbar-left {
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
  }

  .topbar-title {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
  }

  .topbar-right {
    gap: 0.4rem;
    flex-shrink: 0;
  }

  .topbar-greeting {
    display: none;
  }

  /* Cards full width on mobile */
  .card {
    border-radius: var(--radius-md);
    padding: 1rem;
  }

  /* stat value smaller */
  .stat-value {
    font-size: 1.25rem;
  }

  /* form rows single column */
  .form-row {
    grid-template-columns: 1fr !important;
  }

  /* bonus rewards step cards */
  .step-card,
  .milestone-card {
    padding: 1rem !important;
  }
}

@media (max-width: 480px) {

  .stats-grid,
  .stats-grid.cols-3,
  .stats-grid.cols-4,
  .stats-grid.cols-5 {
    grid-template-columns: 1fr !important;
  }

  .auth-card {
    padding: 1.75rem 1.25rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .btn-lg {
    padding: .75rem 1.5rem;
    font-size: .95rem;
  }

  .plan-price-big {
    font-size: 2.4rem;
  }

  .grid[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pulse-green {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, .4);
  }

  50% {
    box-shadow: 0 0 0 12px rgba(22, 163, 74, 0);
  }
}

.animate-fadein {
  animation: fadeIn .5s ease forwards;
}

.animate-fadeup {
  animation: fadeInUp .6s ease forwards;
}

.animate-delay-1 {
  animation-delay: .1s;
}

.animate-delay-2 {
  animation-delay: .2s;
}

.animate-delay-3 {
  animation-delay: .3s;
}

.animate-delay-4 {
  animation-delay: .4s;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Custom Professional Confirm Modal --------------------- */
.custom-confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s ease;
}

.custom-confirm-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.custom-confirm-modal {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  transform: scale(0.85);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #ffffff;
}

.custom-confirm-backdrop.active .custom-confirm-modal {
  transform: scale(1);
}

.custom-confirm-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  border: 2px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  margin: 0 auto 1.25rem;
}

.custom-confirm-modal.is-danger .custom-confirm-icon-wrapper {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.custom-confirm-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.custom-confirm-msg {
  font-size: 0.9rem;
  color: #9ca3af;
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.custom-confirm-actions {
  display: flex;
  gap: 0.75rem;
}

.custom-confirm-actions button {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.custom-confirm-cancel {
  background: #374151 !important;
  color: #e5e7eb !important;
}

.custom-confirm-cancel:hover {
  background: #4b5563 !important;
}

.custom-confirm-ok {
  background: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
}

.custom-confirm-ok:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.custom-confirm-modal.is-danger .custom-confirm-ok {
  background: #dc2626 !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

/* ============================================================
   Verified Blue Tick Badge (Top Tier Plan Privilege)
   ============================================================ */
.user-verified-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
  position: relative;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  margin-left: 0.3rem;
}

.user-verified-tick svg {
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 2px 6px rgba(29, 155, 240, 0.5));
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.28s ease;
}

.user-verified-tick:hover svg {
  transform: scale(1.18) rotate(5deg);
  filter: drop-shadow(0 4px 12px rgba(29, 155, 240, 0.8));
}

@keyframes verifiedGlowPulse {
  0%, 100% {
    filter: drop-shadow(0 2px 5px rgba(29, 155, 240, 0.45));
  }
  50% {
    filter: drop-shadow(0 2px 9px rgba(56, 189, 248, 0.75));
  }
}

.user-verified-tick.with-glow svg {
  animation: verifiedGlowPulse 2.8s infinite ease-in-out;
}

.plan-verified-pill,
.vip-verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18) 0%, rgba(2, 132, 199, 0.3) 100%);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.22rem 0.65rem;
  border-radius: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.22);
  line-height: 1.25;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.plan-verified-pill:hover,
.vip-verified-pill:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28) 0%, rgba(2, 132, 199, 0.4) 100%);
  border-color: #38bdf8;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.38);
  transform: translateY(-1px);
}

/* ============================================================
   Facebook/Meta-Style Official Verified Badge Modal & Sheet
   ============================================================ */
.user-verified-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
  position: relative;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  margin-left: 0.3rem;
  padding: 3px;
  border-radius: 50%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
}

.user-verified-tick:hover {
  background-color: rgba(29, 155, 240, 0.14);
}

.user-verified-tick:active {
  transform: scale(0.88);
  background-color: rgba(29, 155, 240, 0.25);
}

.vbadge-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(11, 15, 25, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.vbadge-overlay.show {
  display: flex !important;
  opacity: 1;
}

.vbadge-card {
  background: linear-gradient(180deg, #0f1c34 0%, #0a1324 100%);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 20px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.85), 0 0 30px rgba(29, 155, 240, 0.18);
  width: 90%;
  max-width: 350px;
  padding: 1.15rem 1.25rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  margin: auto;
  transform: scale(0.92);
  animation: vbadgeScaleIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  box-sizing: border-box;
}

@keyframes vbadgeScaleIn {
  to {
    transform: scale(1);
  }
}

.vbadge-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.vbadge-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(29, 155, 240, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  padding: 0.2rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vbadge-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
  animation: verifiedGlowPulse 2s infinite ease-in-out;
}

.vbadge-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.8);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.vbadge-close-btn:hover {
  background: rgba(239, 68, 68, 0.9);
  border-color: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  transform: rotate(90deg);
}

.vbadge-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 0.75rem;
}

.vbadge-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.45rem;
}

.vbadge-aura {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 155, 240, 0.45) 0%, transparent 70%);
  filter: blur(6px);
  animation: verifiedGlowPulse 2.4s infinite ease-in-out;
}

.vbadge-hero-svg {
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 3px 10px rgba(29, 155, 240, 0.75));
}

.vbadge-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.vbadge-user-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.vbadge-fullname {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}

.vbadge-username-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #38bdf8;
}

.vbadge-desc-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.65rem;
  text-align: center;
}

.vbadge-desc-box p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

.vbadge-plan-highlight {
  color: #38bdf8;
  font-weight: 800;
}

.vbadge-criteria-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.vbadge-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
}

.vbadge-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vbadge-icon-diamond {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.vbadge-icon-shield {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.vbadge-icon-star {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.vbadge-item-content {
  flex: 1;
  min-width: 0;
}

.vbadge-item-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.vbadge-item-sub {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.25;
}

.vbadge-action-row {
  margin-top: 0.2rem;
}

.vbadge-primary-btn {
  width: 100%;
  background: #1d9bf0;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 12px rgba(29, 155, 240, 0.4);
  letter-spacing: 0.02em;
}

.vbadge-primary-btn:hover {
  background: #0c8de4;
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(29, 155, 240, 0.55);
}

.vbadge-primary-btn:active {
  transform: scale(0.98);
}

@media (max-width: 576px) {
  .vbadge-overlay {
    align-items: center !important;
    justify-content: center !important;
    padding: 0.75rem !important;
  }
  
  .vbadge-card {
    width: 90% !important;
    max-width: 340px !important;
    border-radius: 20px !important;
    padding: 1.05rem 1.15rem !important;
    margin: auto !important;
    transform: scale(0.95);
    animation: vbadgeScaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
  }
}
