* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: #f8f9fc;
  color: #121417;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Original Dark Mode Body Background */
body.dark-theme {
  background-color: #0b0f17;
  color: #f1f5f9;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================
   2. DESKTOP / LAPTOP FULLSCREEN LAYOUT
   ========================================== */
.app-layout {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: 240px;
  background-color: #ffffff;
  border-right: 1px solid #e6e8ea;
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
}

body.dark-theme .sidebar {
  background-color: #111827;
  border-right-color: #1f293d;
}

.brand-logo {
  font-size: 18px;
  font-weight: 700;
  color: #000033;
  padding-left: 10px;
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}

body.dark-theme .brand-logo {
  color: #3b82f6;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #707a8a;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}

body.dark-theme .nav-links a {
  color: #94a3b8;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: #f0f4fd;
  color: #000033;
  font-weight: 600;
}

body.dark-theme .nav-links a:hover,
body.dark-theme .nav-links a.active {
  background-color: #1e293b;
  color: #3b82f6;
}

/* Main Content Workspace */
.main-wrapper {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100% - 240px);
}

/* Header Section */
.header-blue {
  background-color: #000033;
  color: #ffffff;
  padding: 24px 32px 40px 32px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

body.dark-theme .header-blue {
  background: linear-gradient(135deg, #0d1b2a 0%, #1b2a4a 100%);
  border-bottom: 1px solid #1f293d;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

body.dark-theme .avatar {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.user-text .greeting {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
}

.user-text .subtext {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}

body.dark-theme .user-text .subtext {
  color: #94a3b8;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

body.dark-theme .icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Balance Section */
.balance-card {
  margin-bottom: 4px;
}

.balance-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 480px;
}

body.dark-theme .balance-label {
  color: #94a3b8;
}

.tier-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

body.dark-theme .tier-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.25);
}

.balance-amount {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.3px;
  color: #ffffff;
}

/*====================================
   3. FLOATING QUICK-ACTIONS
  ==================================== */
.floating-quick-actions-wrapper {
  padding: 0 32px;
  margin-top: -22px;
  z-index: 10;
}

.quick-actions-card {
  background-color: #ffffff;
  border: 1px solid #e6e8ea;
  border-radius: 12px;
  padding: 12px;
  max-width: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

body.dark-theme .quick-actions-card {
  background-color: #161f2e;
  border-color: #233148;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #ebf2ff;
  border: 1px solid #d0e1ff;
  color: #000033;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

body.dark-theme .action-btn {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #3b82f6;
}

.action-btn:hover {
  background-color: #000033;
  color: #ffffff;
  border-color: #000033;
}

body.dark-theme .action-btn:hover {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.action-card span {
  font-size: 11px;
  font-weight: 500;
  color: #1e293b;
}

body.dark-theme .action-card span {
  color: #cbd5e1;
}

/* ==========================================
   4. PAGE BODY CONTENT
   ========================================== */
.page-content {
  padding: 20px 24px;
  flex: 1;
  background-color: #ffffff;
  margin: 20px 32px;
  border-radius: 12px;
  border: 1px solid #e6e8ea;
}

body.dark-theme .page-content {
  background-color: #111827;
  border-color: #1f293d;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: #121417;
  margin-bottom: 12px;
  letter-spacing: -0.1px;
  text-transform: uppercase;
}

body.dark-theme .section-title {
  color: #f8fafc;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 16px 120px;
  margin-bottom: 24px;
}

.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  cursor: pointer;
}

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f8f9fc;column-width: cmcmmcm;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000033;
  font-size: 14px;
  border: 1px solid #e6e8ea;
}

body.dark-theme .service-icon {
  background-color: #1e293b;
  color: #60a5fa;
  border-color: #334155;
}

.service-item span {
  font-size: 11px;
  color: #475569;
  font-weight: 500;
}

body.dark-theme .service-item span {
  color: #cbd5e1;
}

/* ==========================================
   5. CRYPTO & GIFT CARDS
   ========================================== */
.icon-box {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.dark-theme .icon-box {
  background-color: #1e293b;
  border: none;
}

.crypto-rates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.rate-card {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.dark-theme .rate-card {
  background-color: #161f2e;
  border-color: #233148;
}

.crypto-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crypto-icon {
  font-size: 15px;
  margin: 0 auto;
}

.crypto-icon.btc { color: #d97706; }
body.dark-theme .crypto-icon.btc { color: #f59e0b; }

.crypto-icon.eth { color: #4f46e5; }
body.dark-theme .crypto-icon.eth { color: #818cf8; }

.rate-pair {
  font-size: 12px;
  font-weight: 600;
  color: #121417;
}

body.dark-theme .rate-pair {
  color: #ffffff;
}

.rate-link {
  font-size: 10px;
  color: #64748b;
}

body.dark-theme .rate-link {
  color: #94a3b8;
}

/* Sparkline Mini Chart Styling */
.sparkline-chart {
  width: 44px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-svg {
  width: 100%;
  height: 100%;
}

.rate-badge.positive {
  background-color: rgba(16, 185, 129, 0.12);
  color: #10b981;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  min-width: 58px;
  text-align: center;
}

body.dark-theme .rate-badge.positive {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

/* Gift Cards Section */
.gift-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.card-rate-item {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.dark-theme .card-rate-item {
  background-color: #161f2e;
  border-color: #233148;
}

.card-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gift-icon {
  font-size: 15px;
  margin: 0 auto;
}

.gift-icon.apple { color: #000000; }
body.dark-theme .gift-icon.apple { color: #f8fafc; }

.gift-icon.amazon { color: #d97706; }
body.dark-theme .gift-icon.amazon { color: #f59e0b; }

.gift-icon.steam { color: #0284c7; }
body.dark-theme .gift-icon.steam { color: #38bdf8; }

.gift-icon.google { color: #059669; }
body.dark-theme .gift-icon.google { color: #34d399; }

.card-name {
  font-size: 12px;
  font-weight: 600;
  color: #121417;
}

body.dark-theme .card-name {
  color: #ffffff;
}

.card-sub {
  font-size: 10px;
  color: #64748b;
}

.card-rate {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.rate-val {
  font-size: 12px;
  font-weight: 700;
  color: #000033;
}

body.dark-theme .rate-val {
  color: #60a5fa;
}

.rate-tag {
  font-size: 9px;
  color: #64748b;
  background-color: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
}

body.dark-theme .rate-tag {
  color: #94a3b8;
  background-color: rgba(255, 255, 255, 0.05);
}

.rate-tag.high {
  color: #059669;
  background-color: rgba(16, 185, 129, 0.12);
}

body.dark-theme .rate-tag.high {
  color: #34d399;
  background-color: rgba(52, 211, 153, 0.1);
}

/* Footer Section */
.desktop-footer {
  padding: 16px 32px;
  font-size: 11px;
  color: #64748b;
  text-align: center;
}

/* ==========================================
   6. FLOATING MOBILE NAVIGATION & RESPONSIVE
   ========================================== */
.mobile-nav {
  display: none;
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main-wrapper {
    margin-left: 0;
    width: 100%;
  }

  .header-blue {
    padding: 20px 16px 36px 16px;
    border-radius: 0;
  }

  .floating-quick-actions-wrapper {
    padding: 0 12px;
    margin-top: -20px;
  }

  .page-content {
    margin: 12px;
    padding: 16px 12px;
  }

  .gift-card-grid,
  .crypto-rates-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 6px;
  }

  /* FLOATING MOBILE NAVIGATION BAR */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 16px;
    left: 5%;
    width: 90%;
    background-color: #000033;
    border-radius: 30px;
    justify-content: space-around;
    align-items: center;
    padding: 8px 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 200;
  }

  body.dark-theme .mobile-nav {
    background-color: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.65);
  }

  body.dark-theme .mobile-nav-item {
    color: #64748b;
  }

  .mobile-nav-item i {
    font-size: 15px;
  }

  .mobile-nav-item.active {
    color: #ffffff;
    font-weight: 600;
  }

  body.dark-theme .mobile-nav-item.active {
    color: #60a5fa;
  }

  .desktop-footer {
    padding-bottom: 80px;
  }
}

/* ==========================================
   7. POP-UP OVERLAYS & BOTTOM-SHEET STYLES
   ========================================== */
.cz-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 1000;
}


.cz-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Desktop Modal Card View */
.cz-modal-sheet {
  background-color: #ffffff;
  width: 90%;
  max-width: 440px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s ease;
  border: 1px solid #e6e8ea;
}

body.dark-theme .cz-modal-sheet {
  background-color: #161f2e;
  border-color: #233148;
  color: #f8fafc;
}

.cz-modal-sheet.active {
  display: flex;
  transform: scale(1);
}

.cz-modal-drag {
  display: none;
}

.cz-modal-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e6e8ea;
}

body.dark-theme .cz-modal-header {
  border-bottom-color: #233148;
}

.cz-modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #000033;
}

body.dark-theme .cz-modal-header h3 {
  color: #ffffff;
}

.cz-close-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.cz-modal-body {
  padding: 20px;
  max-height: 75vh;
  overflow-y: auto;
}

.cz-modal-desc {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 16px;
}

body.dark-theme .cz-modal-desc {
  color: #94a3b8;
}

/* Options List in Modals */
.cz-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cz-option-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background-color: #f8f9fc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  width: 100%;
}

body.dark-theme .cz-option-item {
  background-color: #0f172a;
  border-color: #233148;
}

.cz-option-item:hover {
  border-color: #000033;
  background-color: #f0f4fd;
}

body.dark-theme .cz-option-item:hover {
  border-color: #3b82f6;
  background-color: #1e293b;
}

.cz-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #ebf2ff;
  color: #000033;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

body.dark-theme .cz-option-icon {
  background-color: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.cz-option-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cz-option-title {
  font-size: 13px;
  font-weight: 600;
  color: #121417;
}

body.dark-theme .cz-option-title {
  color: #ffffff;
}

.cz-option-sub {
  font-size: 10px;
  color: #64748b;
  margin-top: 1px;
}

body.dark-theme .cz-option-sub {
  color: #94a3b8;
}

.cz-arrow {
  font-size: 12px;
  color: #94a3b8;
}

/* Form controls in Popups */
.cz-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cz-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cz-form-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
}

body.dark-theme .cz-form-label {
  color: #94a3b8;
}

.cz-form-control {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  font-size: 16px; /* 16px stops automatic mobile browser auto-zoom */
  color: #121417;
  outline: none;
}

body.dark-theme .cz-form-control {
  background-color: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

.cz-form-control:focus {
  border-color: #000033;
}

body.dark-theme .cz-form-control:focus {
  border-color: #3b82f6;
}

.cz-submit-btn {
  background-color: #000033;
  color: #ffffff;
  border: none;
  padding: 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: opacity 0.15s ease;
}

body.dark-theme .cz-submit-btn {
  background-color: #2563eb;
}

.cz-submit-btn:hover {
  opacity: 0.9;
}

/* Mobile Bottom Sheet Override */
@media (max-width: 768px) {
  .cz-modal-overlay {
    align-items: flex-end; /* Push to bottom on Android / mobile */
  }

  .cz-modal-sheet {
    width: 100%;
    max-width: 100%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .cz-modal-sheet.active {
    transform: translateY(0);
  }

  .cz-modal-drag {
    display: block;
    width: 36px;
    height: 4px;
    background-color: #cbd5e1;
    border-radius: 2px;
    margin: 10px auto 0 auto;
  }

  body.dark-theme .cz-modal-drag {
    background-color: #334155;
  }
}