html {
  -webkit-text-size-adjust: 100%;
}

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Ethiopic:wdth,wght@75,300;75,400;75,600;75,700&display=swap');

:root {
  --white: #ffffff;
  --navy: #1B3A5C;
  --navy-2: #234875;
  --navy-3: #2C5A8F;
  --gold: #18B5C4;
  --gold-lt: #4ECFDB;
  --gold-dk: #0F8A96;
  --cream: #F0F8F9;
  --cream-2: #D8EEF1;
  --ivory: #F7FCFD;
  --muted: #7A94A8;
  --danger: #C0392B;
  --success: #1B6B4A;
  --warn: #A0720A;
  --text: #1B3A5C;
  --border: #BDD8DC;
  --shadow-sm: 0 2px 8px rgba(27, 58, 92, 0.08);
  --shadow-md: 0 4px 24px rgba(27, 58, 92, 0.12);
  --shadow-lg: 0 8px 48px rgba(27, 58, 92, 0.18);
  --radius: 4px;
  --radius-lg: 8px;
  --font-d: 'Noto Serif Ethiopic', Georgia, serif;
  --font-b: 'Futura', 'Century Gothic', 'Trebuchet MS', sans-serif;
  --font-m: 'DM Mono', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-b);
  background: var(--cream);
  color: var(--navy);
  line-height: 1.65;
  min-height: 100vh;
}

a {
  color: var(--gold-dk);
  text-decoration: none;
}

a:hover {
  color: var(--gold);
}

/* AUTH */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-left {
  background: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  border: 1px solid rgba(24, 181, 196, 0.12);
  top: -200px;
  left: -200px;
}

.auth-left::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 1px solid rgba(24, 181, 196, 0.08);
  bottom: -150px;
  right: -100px;
}

.auth-logo {
  text-align: center;
  color: var(--cream);
  position: relative;
  z-index: 1;
}

.auth-logo .logo-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  background: rgba(24, 181, 196, 0.1);
  font-size: 2rem;
}

.auth-logo h1 {
  font-family: var(--font-d);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.auth-logo p {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  max-width: 280px;
}

.auth-features {
  margin-top: 2.5rem;
  width: 100%;
  max-width: 300px;
  position: relative;
  z-index: 1;
}

.auth-features .af-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(245, 240, 232, 0.65);
  font-size: 0.9rem;
  padding: 0.4rem 0;
}

.auth-features .af-item span:first-child {
  color: var(--gold);
  font-size: 1rem;
}

.auth-right {
  background: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.auth-form-wrap {
  width: 100%;
  max-width: 420px;
}

.auth-form-wrap h2 {
  font-family: var(--font-d);
  font-size: 1.85rem;
  margin-bottom: 0.4rem;
}

.auth-form-wrap>.sub {
  color: var(--muted);
  margin-bottom: 2rem;
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* FORM */
.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--navy-3);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  background: #fff;
  border: 1.5px solid #C8E6EA;
  border-radius: var(--radius);
  font-family: var(--font-b);
  font-size: 1rem;
  color: var(--navy);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(24, 181, 196, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 90px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-block {
  display: flex;
  gap: 1rem;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-b);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--navy);
  color: var(--cream);
}

.btn-primary:hover:not(:disabled) {
  background: var(--navy-3);
  color: var(--cream);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
}

.btn-gold:hover:not(:disabled) {
  background: var(--gold-lt);
  color: var(--navy);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--navy);
  color: var(--navy);
}

.btn-outline:hover:not(:disabled) {
  background: var(--navy);
  color: var(--cream);
}

.btn-outline-gold {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold-dk);
}

.btn-outline-gold:hover:not(:disabled) {
  background: var(--gold);
  color: var(--navy);
}

.btn-sm {
  padding: 0.42rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #a93226;
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

/* LAYOUT */
.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  z-index: 200;
  transition: transform 0.28s ease;
}

.sidebar-logo {
  padding: 1.75rem 1.5rem;
  border-bottom: 1px solid rgba(24, 181, 196, 0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo .logo-mark {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.sidebar-logo .logo-text {
  font-family: var(--font-d);
  font-size: 1rem;
  color: var(--cream);
  line-height: 1.2;
}

.sidebar-logo .logo-text small {
  display: block;
  font-family: var(--font-b);
  font-size: 0.7rem;
  color: var(--muted);
  font-style: italic;
}

.sidebar-user {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user .uname {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--cream);
}

.sidebar-user .uemail {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 0.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 0.4rem;
}

.sub-badge.active {
  background: rgba(27, 107, 74, 0.3);
  color: #5ec49a;
}

.sub-badge.expired {
  background: rgba(192, 57, 43, 0.25);
  color: #e87168;
}

.sub-badge.admin {
  background: rgba(24, 181, 196, 0.3);
  color: var(--gold-lt);
}

.sidebar-nav {
  flex: 1 1 auto;
  padding: 0.75rem 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 181, 196, 0.5) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(24, 181, 196, 0.45);
  border-radius: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(24, 181, 196, 0.7);
}

.nav-section {
  padding: 0.75rem 1.5rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(138, 155, 176, 0.5);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.5rem;
  color: rgba(245, 240, 232, 0.65);
  font-size: 0.93rem;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--cream);
}

.nav-item.active {
  background: rgba(24, 181, 196, 0.1);
  color: var(--gold-lt);
  border-left-color: var(--gold);
}

.nav-item .nav-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-bottom {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.main-content {
  margin-left: 260px;
  padding: 2rem 2.5rem;
  min-height: 100vh;
  min-width: 0;
  width: 82vw;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* MOBILE TOP BAR */
.mobile-topbar {
  display: none;
  background: var(--navy);
  padding: 0.85rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 150;
  border-bottom: 1px solid rgba(24, 181, 196, 0.15);
}

.mobile-topbar .topbar-logo {
  font-family: var(--font-d);
  color: var(--cream);
  font-size: 1rem;
}

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: all 0.25s;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 190;
}

.sidebar-overlay.active {
  display: block;
}

/* PAGE HEADER */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--cream-2);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header-text h1 {
  font-family: var(--font-d);
  font-size: 1.85rem;
  font-weight: 600;
}

.page-header-text p {
  color: var(--muted);
  margin-top: 0.25rem;
}

/* CARDS */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--cream-2);
  overflow: hidden;
}

.card-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-header h3 {
  font-family: var(--font-d);
  font-size: 1.1rem;
  font-weight: 600;
}

.card-body {
  padding: 1.5rem;
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
  width: 100%;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--cream-2);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--gold);
  min-width: 0;
  overflow: hidden;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-family: var(--font-d);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* ALERTS */
.alert {
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.93rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: #fce8e6;
  color: #8b1a12;
  border: 1px solid #f5c0bb;
}

.alert-success {
  background: #e8f5ef;
  color: #1B6B4A;
  border: 1px solid #b8dfc8;
}

.alert-warn {
  background: #fef6e4;
  color: #7a5510;
  border: 1px solid #f0d99b;
}

.alert-info {
  background: #eef3fb;
  color: #2c5282;
  border: 1px solid #b8cff0;
}

/* TABLES */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.91rem;
}

thead th {
  text-align: left;
  padding: 0.7rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--cream-2);
  white-space: nowrap;
}

tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--cream-2);
  vertical-align: middle;
  word-break: break-word;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--cream);
}

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-success {
  background: #e8f5ef;
  color: #1B6B4A;
}

.badge-danger {
  background: #fce8e6;
  color: #8b1a12;
}

.badge-warn {
  background: #fef6e4;
  color: #7a5510;
}

.badge-muted {
  background: #f0ece4;
  color: var(--muted);
}

.badge-gold {
  background: rgba(24, 181, 196, 0.15);
  color: var(--gold-dk);
}

/* LIFE FILE GRID */
.insurance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.insurance-card {
  background: #fff;
  border: 1.5px solid var(--cream-2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.insurance-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.ic-icon {
  width: 46px;
  height: 46px;
  background: rgba(24, 181, 196, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.insurance-card h3 {
  font-family: var(--font-d);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.insurance-card .ic-desc {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.progress-bar {
  height: 5px;
  background: var(--cream-2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width 0.6s ease;
}

.progress-fill.complete {
  background: var(--success);
}

.progress-text {
  font-size: 0.76rem;
  color: var(--muted);
}

/* WALLET */
.wallet-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.wallet-hero::before {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(24, 181, 196, 0.18);
  top: -80px;
  right: -80px;
}

.wallet-hero::after {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 1px solid rgba(24, 181, 196, 0.1);
  bottom: -40px;
  right: 80px;
}

.wallet-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-lt);
  margin-bottom: 0.5rem;
}

.wallet-amount {
  font-family: var(--font-d);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.wallet-sub {
  color: rgba(245, 240, 232, 0.5);
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

.wallet-actions {
  margin-top: 1.75rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* REFERRAL */
.referral-box {
  background: var(--cream);
  border: 1.5px dashed var(--gold);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.ref-code {
  font-family: var(--font-m);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0.18em;
  margin-bottom: 0.75rem;
}

.ref-link-row {
  display: flex;
  gap: 0.5rem;
}

.ref-link-row input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  background: #fff;
  border: 1px solid var(--cream-2);
  border-radius: var(--radius);
  font-family: var(--font-m);
  font-size: 0.8rem;
  color: var(--muted);
  outline: none;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 42, 0.55);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--ivory);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(14px);
  transition: transform 0.22s;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-lg .modal {
  max-width: 800px;
}

.modal-header {
  padding: 1.4rem 1.5rem;
  border-bottom: 1px solid var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: var(--font-d);
  font-size: 1.2rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--navy);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.2rem 1.5rem;
  border-top: 1px solid var(--cream-2);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media(max-width:540px) {
  .modal-overlay {
    padding: 0.5rem;
  }

  .modal {
    width: 100%;
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-footer {
    padding: 1rem;
    gap: 0.5rem;
  }
}

/* TOAST */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: #fff;
  min-width: 230px;
  max-width: 350px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s ease;
  pointer-events: all;
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--danger);
}

.toast-info {
  background: var(--navy-3);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(16px)
  }

  to {
    opacity: 1;
    transform: translateX(0)
  }
}

/* LANDING */
.land-nav {
  background: var(--navy);
  padding: 1.25rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(24, 181, 196, 0.15);
}

.land-nav .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-d);
  font-size: 1.25rem;
  color: var(--cream);
}

.land-nav .logo-ring {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.nav-logo {
  width: 150px;
  height: auto;
}

.hero {
  background: var(--navy);
  padding: 6rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  border: 1px solid rgba(24, 181, 196, 0.06);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero-eye {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero-h {
  font-family: var(--font-d);
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  color: var(--cream);
  line-height: 1.1;
  max-width: 680px;
  margin: 0 auto 1.5rem;
}

.hero-h em {
  font-style: italic;
  color: var(--gold-lt);
}

.hero-p {
  color: rgba(245, 240, 232, 0.55);
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.section {
  padding: 5rem 4rem;
}

.section-light {
  background: var(--ivory);
}

.section-dark {
  background: var(--navy);
}

.section-h {
  font-family: var(--font-d);
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-dark .section-h {
  color: var(--cream);
}

.section-p {
  text-align: center;
  color: var(--muted);
  max-width: 460px;
  margin: 0 auto 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.feature {
  background: #fff;
  border: 1px solid var(--cream-2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}

.feature .fi {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature h3 {
  font-family: var(--font-d);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature p {
  color: var(--muted);
  font-size: 0.88rem;
}

.pricing-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(24, 181, 196, 0.3);
  border-radius: var(--radius-lg);
  padding: 3rem;
  max-width: 380px;
  margin: 0 auto;
  color: var(--cream);
  text-align: center;
}

.price-amt {
  font-family: var(--font-d);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--gold-lt);
}

.price-per {
  color: var(--muted);
  font-size: 0.88rem;
}

.price-list {
  list-style: none;
  text-align: left;
  margin: 1.5rem 0;
}

.price-list li {
  padding: 0.4rem 0;
  color: rgba(245, 240, 232, 0.8);
  font-size: 0.95rem;
}

.price-list li::before {
  content: '✓ ';
  color: var(--gold);
}

footer {
  background: var(--navy);
  border-top: 1px solid rgba(24, 181, 196, 0.15);
  padding: 2rem 4rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.85rem;
}

/* BENEFICIARY ACCESS PAGE */
.access-page {
  min-height: 100vh;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.access-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  overflow: hidden;
}

.access-card-top {
  background: var(--navy);
  padding: 2.5rem;
  text-align: center;
}

.access-card-top h1 {
  font-family: var(--font-d);
  color: var(--cream);
  font-size: 1.5rem;
  margin-top: 1rem;
}

.access-card-top p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

.life-file-section {
  background: #fff;
  border: 1px solid var(--cream-2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.life-file-section h3 {
  font-family: var(--font-d);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lf-answer {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--cream-2);
  display: flex;
  flex-direction: column;
}

.lf-answer:last-child {
  border-bottom: none;
}

.lf-q {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.lf-a {
  font-size: 0.95rem;
  color: var(--navy);
}

/* SPINNER */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--cream-2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.loading-center {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

/* UTIL */
.text-muted {
  color: var(--muted);
}

.text-gold {
  color: var(--gold-dk);
}

.text-sm {
  font-size: 0.85rem;
}

.text-center {
  text-align: center;
}

.fw-600 {
  font-weight: 600;
}

.mt-1 {
  margin-top: 0.5rem
}

.mt-2 {
  margin-top: 1rem
}

.mt-3 {
  margin-top: 1.5rem
}

.mt-4 {
  margin-top: 2rem
}

.mb-1 {
  margin-bottom: 0.5rem
}

.mb-2 {
  margin-bottom: 1rem
}

.mb-3 {
  margin-bottom: 1.5rem
}

.flex {
  display: flex
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center
}

.items-center {
  align-items: center
}

.gap-1 {
  gap: 0.5rem
}

.gap-2 {
  gap: 1rem
}

.hidden {
  display: none !important
}

.w-full {
  width: 100%
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem
}

/* DASHBOARD BOTTOM GRID */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
  width: 100%;
}

@media(max-width:1100px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media(max-width:900px) {
  .auth-page {
    grid-template-columns: 1fr
  }

  .auth-left {
    display: none
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    transform: translateX(-100%);
    height: 100vh;
    height: 100dvh;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-topbar {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding: 1.25rem;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .land-nav,
  .section,
  .hero {
    padding-left: 1.5rem;
    padding-right: 1.5rem
  }

  .nav-logo {
    width: 100px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media(max-width:600px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .wallet-actions {
    flex-direction: column;
  }

  .wallet-actions .btn {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem 0.85rem;
  }

  .stat-val {
    font-size: 1.6rem;
  }

  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }
}

@media(max-width:400px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile table → card stack ── */
@media(max-width:700px) {

  /* ── Scope mobile card-stack ONLY to .table-wrap tables ── */
  .table-wrap {
    overflow-x: visible;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap th,
  .table-wrap td,
  .table-wrap tr {
    display: block;
  }

  .table-wrap thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .table-wrap tbody tr {
    background: #fff;
    border: 1.5px solid var(--cream-2);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    padding: 1rem 1rem 0.5rem;
    position: relative;
  }

  .table-wrap tbody td {
    border: none !important;
    padding: 0.4rem 0 0.4rem 35% !important;
    position: relative;
    min-height: 1.8rem;
    word-break: break-word;
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .table-wrap tbody td:before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 33%;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Action buttons — full width, separated */
  .table-wrap tbody td:last-child {
    padding-left: 0;
    margin-top: 0.75rem;
    border-top: 1px solid var(--cream-2);
    padding-top: 0.65rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .table-wrap tbody td:last-child:before {
    display: none;
  }

  /* Insurance types grid — fix blank left gap */
  .types-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Payment method badges & picker ───────────────────────────────────────── */
.wallet-payment-methods {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  justify-content: center;
}

.pm-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-right: 0.25rem;
}

.pm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.pm-visa {
  background: #1a1f71;
  color: #fff;
}

.pm-mc {
  background: #eb001b;
  color: #fff;
}

.pm-eft {
  background: #00a651;
  color: #fff;
}

.pm-apple {
  background: #000;
  color: #fff;
}

.pm-google {
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
}

.pm-samsung {
  background: #1428a0;
  color: #fff;
}

.pm-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pm-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: left;
  width: 100%;
}

.pm-option:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pm-option-icons {
  display: flex;
  gap: 0.3rem;
  min-width: 90px;
}

.pm-option-label {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
}

.pm-option-arrow {
  color: var(--gold);
  font-size: 1rem;
}

/* ============================================================================
   MOBILE HARDENING (appended) — client + admin. Progressive, tablet → phone.
   ============================================================================ */

/* Tablet: 4-up stat grids become 2-up so numbers never crush together. */
@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small tablet / large phone. */
@media (max-width: 720px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .grid-2,
  .grid-3,
  .re-grid,
  .ep-grid {
    grid-template-columns: 1fr !important;
  }

  .main-content {
    padding: 1.1rem 1rem;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header .btn,
  .page-header-actions .btn {
    width: 100%;
  }
}

/* Phone. */
@media (max-width: 540px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    overflow-x: hidden;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 1rem 0.85rem;
  }

  h1 {
    font-size: 1.4rem;
  }

  .page-header h1 {
    font-size: 1.4rem;
  }

  .card-body {
    padding: 1rem;
  }

  /* Off-canvas nav: full-height, comfortably wide but never the whole screen,
     and it must sit above the sticky top bar. */
  .sidebar {
    width: 84vw;
    max-width: 320px;
    z-index: 260;
  }

  .mobile-topbar {
    z-index: 150;
  }

  .sidebar-overlay {
    z-index: 240;
  }

  .sidebar-nav .nav-item {
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
  }

  /* bigger tap target */
  .sidebar-nav .nav-section {
    padding-top: 0.9rem;
  }

  /* Buttons and button rows: stack full-width, keep a 44px tap height. */
  .btn {
    min-height: 44px;
  }

  .btn-block,
  .modal-footer .btn {
    width: 100%;
  }

  .modal-footer {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .modal-footer .btn {
    margin: 0;
  }

  /* Forms: never sit two fields side-by-side on a phone. */
  .form-row {
    grid-template-columns: 1fr !important;
    display: block;
  }

  .form-row>.form-group {
    width: 100%;
  }

  input,
  select,
  textarea,
  .form-input {
    font-size: 16px;
  }

  /* stops iOS zoom-on-focus */

  /* Tabs / filter button rows wrap instead of overflowing. */
  .tabs,
  .filter-row,
  .audience-grid {
    flex-wrap: wrap;
  }

  /* Long tokens (referral links, emails, IDs) must wrap, not overflow. */
  .ref-link-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ref-link-row input {
    width: 100%;
    box-sizing: border-box;
  }

  .ref-code {
    font-size: 1.15rem;
    word-break: break-all;
  }

  table td,
  table th {
    word-break: break-word;
  }
}

/* Very small phones. */
@media (max-width: 380px) {
  .main-content {
    padding: 0.85rem 0.7rem;
  }

  .sidebar {
    width: 90vw;
  }

  .ep-amount,
  .calc-amount {
    font-size: 1.5rem;
  }
}