/* =========================================================
   🎓 WAY2VIDYALAYA PARTNER PORTAL - MODERN PREMIUM DESIGN SYSTEM
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --agent-primary: #0284c7;
  --agent-primary-dark: #0369a1;
  --agent-primary-light: #e0f2fe;
  --agent-accent: #00D9A6;
  --agent-dark: #0f172a;
  --agent-slate: #1e293b;
  --agent-light-bg: #f8fafc;
  --agent-card-bg: #ffffff;
  --agent-border: #e2e8f0;
  --agent-text-main: #334155;
  --agent-text-muted: #64748b;
  --agent-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --agent-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --agent-shadow-hover: 0 20px 30px -10px rgba(2, 132, 199, 0.12), 0 12px 16px -8px rgba(2, 132, 199, 0.06);
  --agent-radius: 16px;
  --agent-sidebar-width: 260px;
  --agent-header-height: 72px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--agent-light-bg);
  color: var(--agent-text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Truncation helper */
.text-ellipsis {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: inline-block !important;
  max-width: 100% !important;
  vertical-align: middle !important;
}

/* Backdrop */
.agent-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.agent-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Header */
.agent-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--agent-header-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--agent-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 1000;
}

.agent-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.agent-mobile-toggle {
  display: none;
  background: #f8fafc;
  border: 1px solid var(--agent-border);
  color: var(--agent-dark);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.25rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.agent-mobile-toggle:hover {
  background: #e2e8f0;
  color: var(--agent-primary);
  transform: scale(1.02);
}

.agent-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.agent-header-brand img {
  height: 40px;
  object-fit: contain;
}

.agent-header-brand span {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--agent-dark);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-badge-pill {
  background: linear-gradient(135deg, #0284c7 0%, #00D9A6 100%);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 30px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.15);
}

.agent-user-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

.agent-user-info {
  text-align: right;
}

.agent-user-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--agent-dark);
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.agent-user-role {
  font-size: 0.8rem;
  color: var(--agent-text-muted);
  font-weight: 500;
}

.agent-logout-btn {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #ffe4e6;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.agent-logout-btn:hover {
  background: #ffe4e6;
  color: #be123c;
  border-color: #fecdd3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.1);
}

/* Sidebar */
.agent-sidebar {
  position: fixed;
  top: var(--agent-header-height);
  left: 0;
  width: var(--agent-sidebar-width);
  height: calc(100vh - var(--agent-header-height));
  background: #ffffff;
  border-right: 1px solid var(--agent-border);
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1030;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.agent-sidebar-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--agent-border);
}

.agent-sidebar-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--agent-dark);
}

.agent-sidebar-close {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--agent-slate);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.agent-sidebar-close:hover {
  background: #e2e8f0;
  color: #e11d48;
}

.agent-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agent-nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  color: var(--agent-text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.agent-nav-link i {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
  transition: transform 0.3s ease;
}

.agent-nav-link:hover {
  background: #f8fafc;
  color: var(--agent-dark);
}

.agent-nav-link:hover i {
  transform: translateX(2px);
}

.agent-nav-link.active {
  background: var(--agent-primary-light);
  color: var(--agent-primary);
  font-weight: 700;
}

.agent-nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  background: var(--agent-primary);
  border-radius: 0 4px 4px 0;
}

.agent-sidebar-footer {
  padding: 1.25rem;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid var(--agent-border);
  font-size: 0.82rem;
  color: var(--agent-text-muted);
}

.agent-sidebar-footer-title {
  color: var(--agent-dark);
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Mobile Bottom Nav */
.agent-mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--agent-border);
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.04);
}

.agent-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--agent-text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 8px 0;
  width: 20%;
  transition: all 0.2s ease;
}

.agent-bottom-nav-item i {
  font-size: 1.3rem;
  transition: transform 0.2s ease;
}

.agent-bottom-nav-item:hover {
  color: var(--agent-dark);
}

.agent-bottom-nav-item.active {
  color: var(--agent-primary);
  font-weight: 700;
}

.agent-bottom-nav-item.active i {
  transform: translateY(-2px);
}

/* Main Layout */
.agent-main-content {
  margin-top: var(--agent-header-height);
  margin-left: var(--agent-sidebar-width);
  padding: 2.5rem;
  min-height: calc(100vh - var(--agent-header-height));
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* KPI Cards Grid */
.agent-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.agent-kpi-card {
  background: var(--agent-card-bg);
  border: 1px solid var(--agent-border);
  border-radius: var(--agent-radius);
  padding: 1.75rem;
  box-shadow: var(--agent-shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.agent-kpi-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--agent-shadow-hover);
  border-color: #bae6fd;
}

.agent-kpi-val {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--agent-dark);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.agent-kpi-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--agent-text-muted);
  margin-top: 6px;
}

.agent-kpi-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: all 0.3s ease;
}

.agent-kpi-card:hover .agent-kpi-icon {
  transform: scale(1.1) rotate(4deg);
}

.agent-kpi-icon.blue { background: #e0f2fe; color: #0284c7; }
.agent-kpi-icon.green { background: #dcfce7; color: #16a34a; }
.agent-kpi-icon.purple { background: #f3e8ff; color: #9333ea; }
.agent-kpi-icon.orange { background: #ffedd5; color: #ea580c; }

/* Referral Banner Box */
.agent-referral-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--agent-radius);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.15);
}

.agent-referral-banner::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -5%;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.agent-referral-banner::before {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 20%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(0, 217, 166, 0.12) 0%, transparent 75%);
  pointer-events: none;
}

.agent-ref-input-group {
  display: flex;
  gap: 12px;
  max-width: 680px;
  margin-top: 1.5rem;
  position: relative;
  z-index: 5;
}

.agent-ref-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: all 0.3s ease;
}

.agent-ref-input:focus {
  border-color: var(--agent-primary);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25);
}

.agent-btn-copy {
  background: linear-gradient(135deg, #0284c7 0%, #00D9A6 100%);
  color: #ffffff;
  border: none;
  padding: 14px 28px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.2);
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

.agent-btn-copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(2, 132, 199, 0.35);
  opacity: 0.98;
}

/* Tables and Cards */
.agent-table-card {
  background: var(--agent-card-bg);
  border: 1px solid var(--agent-border);
  border-radius: var(--agent-radius);
  box-shadow: var(--agent-shadow-sm);
  overflow: hidden;
}

.agent-table-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--agent-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.agent-table-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--agent-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.agent-table th {
  background: #f8fafc;
  padding: 16px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--agent-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.75px;
  border-bottom: 1px solid var(--agent-border);
}

.agent-table td {
  padding: 18px 20px;
  font-size: 0.92rem;
  color: var(--agent-text-main);
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.agent-table tr:last-child td {
  border-bottom: none;
}

.agent-table tr {
  transition: background-color 0.2s ease;
}

.agent-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Status Badges */
.agent-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.agent-status-badge i {
  font-size: 6px;
}

.agent-status-badge.pending, .agent-status-badge.new { background: #fef3c7; color: #b45309; }
.agent-status-badge.processing, .agent-status-badge.contacted { background: #e0f2fe; color: #0369a1; }
.agent-status-badge.completed, .agent-status-badge.enrolled, .agent-status-badge.paid, .agent-status-badge.approved, .agent-status-badge.qualified { background: #dcfce7; color: #15803d; }
.agent-status-badge.rejected, .agent-status-badge.cancelled, .agent-status-badge.suspended, .agent-status-badge.lost { background: #ffe4e6; color: #be123c; }

/* Filter Bars */
.agent-filter-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

.agent-filter-form .agent-ref-input {
  color: var(--agent-dark);
  background: #ffffff;
  border: 1px solid var(--agent-border);
  padding: 12px 18px;
  border-radius: 12px;
}

.agent-filter-form .agent-ref-input::placeholder {
  color: var(--agent-text-muted);
}

.agent-filter-form .agent-ref-input:focus {
  border-color: var(--agent-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

/* QRCode custom styles */
.qr-card-container {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.qr-box {
  background: #ffffff;
  border: 1px solid var(--agent-border);
  border-radius: 24px;
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--agent-shadow);
  transition: all 0.3s ease;
}

.qr-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--agent-shadow-hover);
}

#qrcodeCanvas img, #qrcodeCanvas canvas {
  margin: 0 auto;
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--agent-border);
  box-shadow: var(--agent-shadow-sm);
}

.qr-info-step {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.qr-info-step:last-child {
  margin-bottom: 0;
}

.qr-step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--agent-primary-light);
  color: var(--agent-primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  box-shadow: var(--agent-shadow-sm);
}

.qr-step-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--agent-dark);
}

.qr-step-content p {
  color: var(--agent-text-muted);
  font-size: 0.9rem;
  margin-top: 6px;
  line-height: 1.5;
}

/* Ledger Details */
.comm-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2.5rem;
  align-items: start;
}

/* Authentication Layouts */
.agent-auth-body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  min-height: 100vh;
}

.agent-auth-card {
  background: #ffffff;
  border-radius: 28px;
  width: 100%;
  max-width: 460px;
  padding: 3rem 2.5rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.agent-auth-card.wide {
  max-width: 580px;
}

.agent-auth-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--agent-dark);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.agent-auth-sub {
  color: var(--agent-text-muted);
  font-size: 0.92rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
  color: var(--agent-dark);
}

.form-control::placeholder {
  color: #94a3b8;
}

.form-control:focus {
  border-color: var(--agent-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn-agent-submit {
  width: 100%;
  background: linear-gradient(135deg, #0284c7 0%, #00D9A6 100%);
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.2);
}

.btn-agent-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35);
  opacity: 0.98;
}

.agent-alert-error {
  background: #ffe4e6;
  color: #be123c;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-alert-success {
  background: #dcfce7;
  color: #15803d;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.agent-alert-success i {
  margin-top: 3px;
}

/* =========================================================
   📱 MOBILE-FIRST RESPONSIVE BREAKPOINTS & DYNAMIC CARD CONVERSION
   ========================================================= */

@media (max-width: 992px) {
  .agent-mobile-toggle {
    display: inline-flex;
  }

  .agent-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 1050;
    transform: translateX(-100%);
    box-shadow: 15px 0 35px rgba(15, 23, 42, 0.15);
  }

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

  .agent-sidebar-header {
    display: flex;
  }

  .agent-main-content {
    margin-left: 0;
    padding: 2rem 1.5rem;
  }

  .agent-user-info {
    display: none;
  }
}

@media (max-width: 768px) {
  /* convert ledger layouts to single column */
  .comm-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* convert tables to cards automatically on mobile screens */
  .agent-table, 
  .agent-table thead, 
  .agent-table tbody, 
  .agent-table th, 
  .agent-table td, 
  .agent-table tr { 
      display: block; 
  }
  
  .agent-table thead tr { 
      position: absolute;
      top: -9999px;
      left: -9999px;
  }
  
  .agent-table tr {
      background: #ffffff;
      border: 1px solid var(--agent-border);
      border-radius: 16px;
      padding: 16px;
      margin-bottom: 16px;
      box-shadow: var(--agent-shadow-sm);
      transition: all 0.2s ease;
      position: relative;
  }
  
  .agent-table tr:hover {
      transform: translateY(-2px);
      box-shadow: var(--agent-shadow);
      border-color: #bae6fd;
  }
  
  .agent-table td { 
      border: none;
      border-bottom: 1px solid #f1f5f9; 
      position: relative;
      padding: 12px 0 12px 45%; 
      font-size: 0.88rem;
      white-space: normal;
      text-align: right;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      min-height: 48px;
  }
  
  .agent-table td:last-child {
      border-bottom: none;
      padding-bottom: 0;
  }
  
  .agent-table td:first-child {
      padding-top: 0;
  }
  
  .agent-table td::before { 
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 40%; 
      padding-right: 10px; 
      white-space: nowrap;
      text-align: left;
      font-weight: 700;
      color: var(--agent-text-muted);
      content: attr(data-label);
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.5px;
  }
}

@media (max-width: 640px) {
  .agent-header {
    padding: 0 1.25rem;
  }

  .agent-main-content {
    padding: 1.5rem 1rem 6rem 1rem; /* Extra bottom padding for bottom nav */
  }

  .agent-mobile-bottom-nav {
    display: flex;
  }

  .agent-ref-input-group {
    flex-direction: column;
    gap: 10px;
  }

  .agent-btn-copy {
    width: 100%;
    justify-content: center;
  }

  .agent-dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .agent-kpi-card {
    padding: 12px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    position: relative;
    min-height: 100px;
  }

  .agent-kpi-val {
    font-size: 1.5rem;
  }

  .agent-kpi-label {
    font-size: 0.72rem;
    margin-top: 2px;
  }

  .agent-kpi-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    border-radius: 10px;
    position: absolute;
    top: 12px;
    right: 12px;
  }

  .agent-table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 1.25rem 1.5rem;
  }

  .agent-logout-btn span {
    display: none;
  }

  .agent-logout-btn {
    padding: 10px 14px;
  }

  .qr-card-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
