/* ============================================================
   DSY Card Portal — Stylesheet
   Extends DSY design language for the Customer Portal
   Mobile-first, RTL Arabic
   ============================================================ */

/* ---- Design Tokens (same as dsy.sy) ---- */
:root {
  --primary:         #0E4C8F;
  --primary-light:   #1B6FC4;
  --accent:          #17B3A6;
  --accent-dark:     #0f8a80;
  --bg-light:        #F6FAFE;
  --bg-soft:         #EAF2FB;
  --text-dark:       #16263A;
  --text-muted:      #5B7186;
  --white:           #FFFFFF;
  --shadow-sm:       0 2px 8px  rgba(14,76,143,0.08);
  --shadow-md:       0 8px 32px rgba(14,76,143,0.12);
  --shadow-lg:       0 20px 60px rgba(14,76,143,0.16);
  --radius:          12px;
  --radius-lg:       20px;
  --radius-xl:       28px;
  --transition:      0.3s ease;

  /* Portal-specific */
  --header-h:        60px;
  --bottom-nav-h:    64px;
  --status-active:   #059669;
  --status-susp:     #DC2626;
  --status-pending:  #D97706;
  --status-active-bg:#D1FAE5;
  --status-susp-bg:  #FEE2E2;
  --status-pending-bg:#FEF3C7;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Cairo', sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ---- Container ---- */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }
.btn--primary {
  background: var(--primary-light);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(27,111,196,0.3);
}
.btn--primary:hover:not(:disabled) {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(27,111,196,0.4);
}
.btn--outline {
  background: transparent;
  color: var(--primary-light);
  border: 2px solid var(--primary-light);
}
.btn--outline:hover:not(:disabled) {
  background: var(--primary-light);
  color: var(--white);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn--ghost:hover { color: var(--primary-light); background: var(--bg-soft); }
.btn--danger {
  background: #FEE2E2;
  color: #DC2626;
}
.btn--danger:hover { background: #DC2626; color: var(--white); }
.btn--sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn--full { width: 100%; }
.btn--accent {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(23,179,166,0.35);
}
.btn--accent:hover:not(:disabled) { background: var(--accent-dark); transform: translateY(-2px); }

/* ---- Spinner inside button ---- */
.btn-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   PORTAL LAYOUT
   ============================================================ */
.portal-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-light);
  padding-bottom: var(--bottom-nav-h);
}

/* ============================================================
   PORTAL HEADER
   ============================================================ */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(14,76,143,0.08);
  box-shadow: var(--shadow-sm);
}
.portal-header__inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.portal-header__logo {
  height: 32px;
  width: auto;
  flex-shrink: 0;
}
.portal-header__title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  flex: 1;
}
.portal-header__user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.portal-header__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.portal-header__name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portal-header__logout {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  border-radius: 8px;
  color: var(--text-muted);
  border: 1px solid rgba(91,113,134,0.25);
  transition: all var(--transition);
  flex-shrink: 0;
}
.portal-header__logout:hover { color: var(--status-susp); border-color: var(--status-susp); }

/* Header for auth pages (no user info) */
.auth-header {
  position: relative;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-header__logo { height: 36px; }

/* ============================================================
   BOTTOM NAVIGATION (Mobile App style)
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(14,76,143,0.08);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding: 0 0.5rem;
  box-shadow: 0 -4px 20px rgba(14,76,143,0.08);
}
.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.4rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  color: var(--text-muted);
  text-decoration: none;
  flex: 1;
  max-width: 80px;
}
.bottom-nav__item:hover { background: var(--bg-soft); }
.bottom-nav__item.active { color: var(--primary-light); }
.bottom-nav__item.active .bottom-nav__icon-wrap {
  background: var(--bg-soft);
}
.bottom-nav__icon-wrap {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.bottom-nav__icon { font-size: 1.2rem; line-height: 1; }
.bottom-nav__label { font-size: 0.68rem; font-weight: 700; line-height: 1; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#app-content {
  flex: 1;
  min-height: calc(100vh - var(--header-h) - var(--bottom-nav-h));
}

/* ============================================================
   AUTH PAGES (Login, Forgot, Activate)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--primary) 0%, #1a5fa8 45%, #1d7bc5 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0 1rem 2rem;
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 85% 15%, rgba(23,179,166,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 15% 85%, rgba(255,255,255,0.05) 0%, transparent 40%);
  pointer-events: none;
}
.auth-page__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 0 1.5rem;
  position: relative; z-index: 1;
}
.auth-page__logo { height: 42px; margin-bottom: 0.75rem; }
.auth-page__tagline {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.03em;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(14,76,143,0.25);
  position: relative; z-index: 1;
}
.auth-card__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.35rem;
}
.auth-card__sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

/* ---- Form elements ---- */
.form-group {
  margin-bottom: 1.1rem;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #D4E3F5;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: 'Cairo', sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  direction: ltr;
  text-align: right;
}
.form-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(27,111,196,0.12);
  background: var(--white);
}
.form-input::placeholder { color: #AAB8C8; }
.form-input--error {
  border-color: var(--status-susp);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}
.form-error {
  font-size: 0.8rem;
  color: var(--status-susp);
  margin-top: 0.3rem;
  display: none;
}
.form-error.show { display: block; }

/* Password field with show/hide toggle */
.input-group {
  position: relative;
}
.input-group .form-input { padding-left: 2.8rem; }
[dir="rtl"] .input-group .form-input { padding-left: 2.8rem; padding-right: 1rem; }
.input-group__toggle {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0.25rem;
  transition: color var(--transition);
}
.input-group__toggle:hover { color: var(--primary-light); }

/* ---- OTP inputs ---- */
.otp-inputs {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  margin: 1.25rem 0;
}
.otp-input {
  width: 58px; height: 62px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  border: 2px solid #D4E3F5;
  border-radius: var(--radius);
  background: var(--bg-light);
  color: var(--primary);
  direction: ltr;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  outline: none;
}
.otp-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(27,111,196,0.12);
  transform: scale(1.05);
}
.otp-input.filled { border-color: var(--accent); background: rgba(23,179,166,0.05); }

/* ---- Auth links ---- */
.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--bg-soft);
}
.auth-link {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--primary-light);
  cursor: pointer;
  background: none; border: none;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
.auth-link:hover { color: var(--primary); }
.auth-link--muted { color: var(--text-muted); text-decoration: none; font-weight: 500; }
.auth-link--muted span { color: var(--primary-light); text-decoration: underline; }

/* ---- Step progress ---- */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.75rem;
}
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 2px solid #D4E3F5;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.step-dot.active { background: var(--primary-light); border-color: var(--primary-light); color: var(--white); }
.step-dot.done   { background: var(--accent); border-color: var(--accent); color: var(--white); }
.step-line {
  flex: 1;
  height: 2px;
  background: #D4E3F5;
  transition: background var(--transition);
}
.step-line.done { background: var(--accent); }

/* ============================================================
   PORTAL PAGES LAYOUT
   ============================================================ */
.page { padding: 1rem 0 1.5rem; }
.page-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0 1rem;
}
.page-back {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid rgba(14,76,143,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dark);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.page-back:hover { background: var(--bg-soft); border-color: var(--primary-light); color: var(--primary-light); }
.page-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  flex: 1;
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1a5fa8 50%, #1d7bc5 100%);
  border-radius: 0 0 32px 32px;
  padding: 1.5rem 1.25rem 2rem;
  color: var(--white);
  position: relative;
  overflow: hidden;
  margin-bottom: -1rem;
}
.dashboard-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 85% 20%, rgba(23,179,166,0.25) 0%, transparent 55%);
  pointer-events: none;
}
.dashboard-hero__greeting {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.15rem;
  position: relative; z-index: 1;
}
.dashboard-hero__name {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  position: relative; z-index: 1;
}
.wallet-balance-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  position: relative; z-index: 1;
}
.wallet-balance-card__label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.2rem;
}
.wallet-balance-card__amount {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  direction: ltr;
  text-align: right;
}
.wallet-balance-card__currency {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.8;
}

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 1.5rem 1rem 0.5rem;
}
.quick-action {
  background: var(--white);
  border-radius: 16px;
  padding: 1rem 0.5rem;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(14,76,143,0.06);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
}
.quick-action:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.quick-action__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto;
}
.quick-action__icon--blue   { background: var(--bg-soft); }
.quick-action__icon--teal   { background: rgba(23,179,166,0.1); }
.quick-action__icon--orange { background: rgba(217,119,6,0.1); }
.quick-action__label { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); }

/* Section heading */
.section-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  padding: 0 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-light);
  cursor: pointer;
  text-decoration: none;
}
.section-link:hover { text-decoration: underline; }

/* ============================================================
   CARD WIDGET
   ============================================================ */
.card-widget {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(14,76,143,0.06);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-dark);
}
.card-widget:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-widget:active { transform: scale(0.98); }

.card-widget__visual {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, #1B6FC4 60%, #1d7bc5 100%);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
.card-widget--red .card-widget__visual {
  background: linear-gradient(135deg, #8B1A1A 0%, #C0392B 60%, #E74C3C 100%);
}
.card-widget__img {
  width: 120px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.25));
  transition: transform var(--transition);
}
.card-widget:hover .card-widget__img { transform: scale(1.05) rotate(-2deg); }

.card-widget__body {
  padding: 1rem;
}
.card-widget__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.card-widget__type {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}
.card-widget__number {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: 0.05em;
  direction: ltr;
  margin-bottom: 0.6rem;
}
.card-widget__balance-row {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}
.card-widget__balance {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--primary);
  direction: ltr;
}
.card-widget__currency { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; }
.card-widget__arrow {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--primary-light);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ---- Cards list / grid ---- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 0 1rem;
}
.cards-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.cards-empty__icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.cards-empty__text { font-size: 0.9rem; font-weight: 600; }

/* ============================================================
   CARD DETAILS
   ============================================================ */
.card-detail-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1a5fa8 50%, #1d7bc5 100%);
  border-radius: 0 0 28px 28px;
  padding: 1.5rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}
.card-detail-hero--red {
  background: linear-gradient(135deg, #8B1A1A 0%, #C0392B 60%, #E74C3C 100%);
}
.card-detail-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.12) 0%, transparent 55%);
  pointer-events: none;
}
.card-detail-hero__img {
  width: 180px;
  filter: drop-shadow(0 16px 40px rgba(0,0,0,0.3));
  position: relative; z-index: 1;
  animation: float-card 4s ease-in-out infinite;
}
@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.card-detail-hero__number {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.08em;
  direction: ltr;
  position: relative; z-index: 1;
}

/* Balance display */
.balance-display {
  background: var(--white);
  border-radius: 20px;
  padding: 1.25rem;
  margin: 1rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.balance-display__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.balance-display__amount {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  direction: ltr;
  line-height: 1.2;
}
.balance-display__currency { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }
.balance-display__recharge {
  flex-shrink: 0;
}

/* Card action buttons row */
.card-actions {
  display: flex;
  gap: 0.65rem;
  padding: 0 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 0.5rem;
}
.card-actions::-webkit-scrollbar { display: none; }
.card-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.75rem 1rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: 1px solid rgba(14,76,143,0.06);
  transition: all var(--transition);
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 72px;
}
.card-action-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--primary-light); }
.card-action-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.card-action-btn__icon { font-size: 1.3rem; }
.card-action-btn--future { position: relative; }
.card-action-btn--future::after {
  content: 'قريباً';
  position: absolute;
  top: -6px; left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: var(--white);
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ============================================================
   TRANSACTIONS LIST
   ============================================================ */
.txn-list { padding: 0 1rem; }
.txn-list__empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.txn-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(14,76,143,0.06);
  text-decoration: none;
  color: var(--text-dark);
  transition: background var(--transition);
  border-radius: 8px;
}
.txn-item:last-child { border-bottom: none; }
.txn-item__icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.txn-item__icon--debit  { background: rgba(220,38,38,0.08); }
.txn-item__icon--credit { background: rgba(5,150,105,0.08); }
.txn-item__info { flex: 1; min-width: 0; }
.txn-item__desc {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.txn-item__route {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.txn-item__date { font-size: 0.7rem; color: var(--text-muted); }
.txn-item__right { text-align: left; flex-shrink: 0; }
.txn-item__amount {
  font-size: 1rem;
  font-weight: 800;
  direction: ltr;
  white-space: nowrap;
}
.txn-item__amount--debit  { color: var(--status-susp); }
.txn-item__amount--credit { color: var(--status-active); }

/* ============================================================
   STATUS BADGE
   ============================================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
}
.status-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.status-badge--active  { background: var(--status-active-bg); color: var(--status-active); }
.status-badge--active::before  { background: var(--status-active); }
.status-badge--suspended { background: var(--status-susp-bg); color: var(--status-susp); }
.status-badge--suspended::before { background: var(--status-susp); }
.status-badge--pending { background: var(--status-pending-bg); color: var(--status-pending); }
.status-badge--pending::before { background: var(--status-pending); box-shadow: 0 0 0 2px rgba(217,119,6,0.25); animation: pulse-dot 1.5s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ============================================================
   RECHARGE PAGE
   ============================================================ */
.recharge-card-preview {
  background: var(--white);
  border-radius: 20px;
  padding: 1.25rem;
  margin: 0 1rem 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(14,76,143,0.06);
}
.recharge-card-preview__img { width: 72px; flex-shrink: 0; }
.recharge-card-preview__info {}
.recharge-card-preview__number { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); direction: ltr; }
.recharge-card-preview__balance { font-size: 1.1rem; font-weight: 900; color: var(--primary); direction: ltr; }

.amount-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  padding: 0 1rem;
  margin-bottom: 1rem;
}
.amount-preset {
  background: var(--white);
  border: 2px solid #D4E3F5;
  border-radius: var(--radius);
  padding: 0.6rem 0.25rem;
  text-align: center;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition);
}
.amount-preset:hover { border-color: var(--primary-light); color: var(--primary-light); }
.amount-preset.selected {
  border-color: var(--primary-light);
  background: rgba(27,111,196,0.06);
  color: var(--primary-light);
}

.wallet-balance-info {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0 1rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}
.wallet-balance-info__label { color: var(--text-muted); font-weight: 600; }
.wallet-balance-info__value { color: var(--primary); font-weight: 800; direction: ltr; }

/* ============================================================
   ACTIVATE CARD
   ============================================================ */
.found-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 1rem;
}
.found-card-item {
  background: var(--white);
  border: 2px solid #D4E3F5;
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
}
.found-card-item:hover { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.found-card-item.selected { border-color: var(--accent); background: rgba(23,179,166,0.04); }
.found-card-item__img { width: 56px; flex-shrink: 0; }
.found-card-item__info { flex: 1; }
.found-card-item__number { font-size: 0.88rem; font-weight: 600; direction: ltr; color: var(--text-dark); }
.found-card-item__type { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.found-card-item__check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #D4E3F5; flex-shrink: 0; transition: all var(--transition); }
.found-card-item.selected .found-card-item__check { background: var(--accent); border-color: var(--accent); }

/* ============================================================
   INFO / ALERT BOXES
   ============================================================ */
.info-box {
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin: 0 1rem 1rem;
  display: flex;
  gap: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.5;
}
.info-box--info    { background: rgba(27,111,196,0.08); color: var(--primary); }
.info-box--success { background: var(--status-active-bg); color: var(--status-active); }
.info-box--warning { background: var(--status-pending-bg); color: var(--status-pending); }
.info-box--error   { background: var(--status-susp-bg); color: var(--status-susp); }
.info-box__icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* ============================================================
   CONFIRM DIALOG
   ============================================================ */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(14,20,30,0.5);
  z-index: 300;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.confirm-overlay.show { opacity: 1; pointer-events: all; }
.confirm-sheet {
  background: var(--white);
  border-radius: 24px 24px 0 0;
  padding: 1.5rem;
  width: 100%;
  max-width: 480px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.confirm-overlay.show .confirm-sheet { transform: translateY(0); }
.confirm-sheet__title { font-size: 1.1rem; font-weight: 800; color: var(--primary); margin-bottom: 0.5rem; }
.confirm-sheet__body  { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.6; }
.confirm-sheet__actions { display: flex; gap: 0.75rem; }
.confirm-sheet__actions .btn { flex: 1; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.dsy-toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 1rem);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-dark);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 500;
  opacity: 0;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transition: opacity 0.3s, transform 0.3s;
  max-width: 90vw;
}
.dsy-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.dsy-toast--success { background: var(--status-active); }
.dsy-toast--error   { background: var(--status-susp); }
.dsy-toast--warning { background: var(--status-pending); }
.dsy-toast__icon    { font-size: 0.95rem; }

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
#portal-loading {
  position: fixed; inset: 0;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(4px);
  z-index: 400;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
#portal-loading.active { opacity: 1; pointer-events: all; }
.loading-spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(14,76,143,0.15);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================================
   PAGE SKELETON
   ============================================================ */
.page-skeleton { padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.skeleton-pulse {
  height: 18px;
  background: linear-gradient(90deg, var(--bg-soft) 25%, #dde9f7 50%, var(--bg-soft) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius);
  animation: shimmer 1.4s ease-in-out infinite;
}
.skeleton-pulse.short { width: 55%; height: 14px; }
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ============================================================
   ERROR PAGE
   ============================================================ */
.error-page {
  text-align: center;
  padding: 4rem 1.5rem;
}
.error-page__icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.error-page h2 { font-size: 1.2rem; font-weight: 800; color: var(--primary); margin-bottom: 0.5rem; }
.error-page p  { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.fw-bold     { font-weight: 700; }
.mb-1        { margin-bottom: 0.5rem; }
.mt-1        { margin-top: 0.5rem; }
.p-1         { padding: 0 1rem; }
.divider     { height: 1px; background: rgba(14,76,143,0.06); margin: 0.75rem 1rem; }

/* Reveal animation (reuse from landing page) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE — TABLET+
   ============================================================ */
@media (min-width: 500px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .otp-input  { width: 64px; height: 68px; }
}

@media (min-width: 768px) {
  .portal-app { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .portal-header { height: 68px; }
  :root { --header-h: 68px; }
  .container { max-width: 800px; }
  .auth-card { padding: 2.5rem 2rem; }
  .quick-actions { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   SAFE AREA (iPhone notch/home bar)
   ============================================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
  .portal-app { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
  .dsy-toast  { bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 1rem); }
}
