:root {
  --bg-page: #f1f5f9;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f8fafc;
  --bg-card-hover: #f1f5f9;

  /* Borders */
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-focus: #0f766e;

  /* Primary Teal Brand Palette */
  --teal-950: #042f2e;
  --teal-900: #134e4a;
  --teal-800: #115e59;
  --teal-700: #0f766e;  /* Core Brand Teal */
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-100: #ccfbf1;
  --teal-50: #f0fdfa;

  /* Accent Orange Brand Palette */
  --orange-900: #7c2d12;
  --orange-800: #9a3412;
  --orange-700: #c2410c;
  --orange-600: #ea580c;  /* Core Brand Orange */
  --orange-500: #f97316;
  --orange-400: #fb923c;
  --orange-100: #ffedd5;
  --orange-50: #fff7ed;

  /* Neutral Typography */
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;

  /* Status Colors */
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-700: #b45309;
  --rose-50: #fef2f2;
  --rose-100: #fee2e2;
  --rose-600: #dc2626;

  /* Sharp Geometry - "Not so rounded" */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-badge: 4px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  position: relative;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--teal-700);
  border: 1px solid var(--teal-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.2);
}

.brand-logo .logo-t {
  color: #ffffff;
}

.brand-logo .logo-s {
  color: var(--orange-400);
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-header-title {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.brand-teal {
  color: var(--teal-700);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.3px;
}

.brand-orange {
  color: var(--orange-600);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.3px;
}

.header-portal-tag {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: var(--orange-50);
  color: var(--orange-700);
  border: 1px solid var(--orange-100);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
}

.header-agent-line {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.agent-badge-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--teal-50);
  color: var(--teal-800);
  border: 1px solid var(--teal-100);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  color: var(--teal-700);
  border-color: var(--border-subtle);
}

.icon-btn:active {
  transform: scale(0.95);
}

.register-header-btn {
  background: var(--orange-600);
  border: 1px solid var(--orange-700);
  color: #ffffff;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.2);
}

.register-header-btn:hover {
  background: var(--orange-700);
}

.register-header-btn:active {
  transform: scale(0.97);
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 16px 16px calc(76px + var(--safe-bottom));
  overflow-y: auto;
}

/* Hero Balance Card (High-Impact Orange Background with Full Legibility) */
.balance-card {
  background: var(--orange-600);
  border: 1px solid var(--orange-700);
  border-radius: var(--radius-lg);
  padding: 18px 18px 0 18px;
  position: relative;
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.22);
  margin-bottom: 16px;
  overflow: hidden;
  color: #ffffff;
}

.balance-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.balance-meta-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.balance-dot {
  width: 7px;
  height: 7px;
  background: #ffffff;
  border-radius: var(--radius-xs);
}

.balance-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: rgba(255, 255, 255, 0.95);
}

.balance-status-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.4px;
}

.balance-amount-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 14px;
}

.balance-currency {
  font-size: 20px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: -0.5px;
}

.balance-amount-num {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -1.2px;
  color: #ffffff;
  line-height: 1;
}

.balance-card .withdraw-btn {
  background: #ffffff;
  color: var(--teal-900);
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.balance-card .withdraw-btn svg {
  stroke: var(--teal-800);
}

.balance-card .withdraw-btn:hover {
  background: #f8fafc;
  color: var(--teal-950);
}

.balance-details-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(0, 0, 0, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  margin: 0 -18px;
  padding: 12px 18px;
}

.balance-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.balance-col-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.25);
}

.balance-sub {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.88);
}

.balance-sub-val {
  font-size: 15px;
  font-weight: 900;
  color: #ffffff !important;
}

.balance-sub-val.teal-accent {
  color: #ffffff !important;
}

.balance-sub-val.orange-accent {
  color: #ffffff !important;
}

/* Quick Actions Strip */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.action-btn-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: all 0.15s ease;
}

.action-btn-card:hover {
  border-color: var(--teal-500);
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.08);
  transform: translateY(-1px);
}

.action-btn-card:active {
  transform: scale(0.98);
}

.action-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

.action-icon.orange {
  background: var(--orange-50);
  color: var(--orange-600);
  border: 1px solid var(--orange-100);
}

.action-icon.teal {
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-100);
}

.action-text h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.action-text p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.2px;
}

.section-count {
  font-size: 10px;
  font-weight: 800;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--teal-800);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.section-link {
  font-size: 12px;
  color: var(--teal-700);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.section-link:hover {
  color: var(--orange-600);
}

/* School Cards */
.school-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.school-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: all 0.15s ease;
}

.school-card:hover {
  border-color: var(--border-subtle);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.school-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.school-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.status-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
}

.status-badge.pitching {
  background: var(--orange-50);
  color: var(--orange-700);
  border: 1px solid var(--orange-100);
}

.status-badge.onboarded, .status-badge.active {
  background: var(--teal-50);
  color: var(--teal-800);
  border: 1px solid var(--teal-100);
}

.status-badge.churned {
  background: var(--rose-50);
  color: var(--rose-600);
  border: 1px solid var(--rose-100);
}

.school-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.school-contact-link {
  color: var(--teal-700);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.school-contact-link:hover {
  color: var(--orange-600);
}

/* Earnings & Ledger Items */
.ledger-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.ledger-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}

.ledger-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ledger-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ledger-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ledger-amount {
  text-align: right;
  flex-shrink: 0;
}

.ledger-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--teal-700);
}

.ledger-status {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 4px;
  border-radius: var(--radius-xs);
  display: inline-block;
  margin-top: 2px;
}

.ledger-status.approved {
  background: var(--teal-50);
  color: var(--teal-800);
  border: 1px solid var(--teal-100);
}

.ledger-status.pending {
  background: var(--orange-50);
  color: var(--orange-700);
  border: 1px solid var(--orange-100);
}

.ledger-status.paid {
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 520px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 8px calc(6px + var(--safe-bottom));
  z-index: 50;
  box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.04);
}

.nav-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.nav-tab svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
}

.nav-tab.active {
  color: var(--teal-800);
  font-weight: 800;
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2.5px;
  background: var(--orange-600);
  border-radius: 1px;
}

/* Bottom Sheet / Modal Drawer */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  border-radius: 10px 10px 0 0;
  padding: 18px 18px calc(24px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 -8px 25px rgba(15, 23, 42, 0.12);
}

.modal-overlay.active .bottom-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 3px;
  background: var(--border-subtle);
  border-radius: var(--radius-xs);
  margin: 0 auto 14px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.sheet-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--teal-900);
  letter-spacing: -0.3px;
}

/* Forms & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--teal-700);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

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

.submit-btn {
  background: var(--teal-700);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.25);
  transition: all 0.15s ease;
}

.submit-btn:hover {
  background: var(--teal-800);
}

.submit-btn:active {
  transform: scale(0.99);
}

/* ── Full Page App Preloader (Mobile & Desktop) ─────────────────────────── */
.app-preloader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.app-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.preloader-logo {
  height: 46px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.preloader-spinner-ring {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--orange-600);
  border-right-color: var(--teal-700);
  border-radius: 50%;
  animation: preloaderSpin 0.75s linear infinite;
  margin-top: 4px;
}

.preloader-label {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.preloader-subtext {
  font-size: 12px;
  color: var(--text-muted);
}

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

/* Login Screen — full-screen standalone view with centered white card on full teal background */
.login-view {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow-y: auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background: #042f2e;
}

#viewLogin[style*="display: none"],
#viewRegister[style*="display: none"],
#viewApp[style*="display: none"],
.login-view[style*="display: none"],
.register-view[style*="display: none"],
.app-container[style*="display: none"],
.app-shell-container[style*="display: none"] {
  display: none !important;
}

/* ── Full-Page Dedicated Registration View ─────────────────────────────── */
.register-view {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow-y: auto;
  min-height: 100vh;
  background: #042f2e;
  padding: 32px 16px 64px;
}

.register-page-container {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.register-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.register-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #99f6e4;
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.register-back-link:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.register-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: rgba(234, 88, 12, 0.2);
  color: #fdba74;
  border: 1px solid rgba(234, 88, 12, 0.4);
  padding: 4px 10px;
  border-radius: 6px;
}

.register-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 40px 48px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.15);
}

.register-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.register-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin: 8px 0 6px;
}

.register-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

.register-section {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 22px;
}

.register-section-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.section-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal-700);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-step-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.section-step-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
}

@media (max-width: 768px) {
  .register-card {
    padding: 24px 18px;
  }
  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .register-section {
    padding: 16px 14px;
  }
}

.register-perks-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 24px;
}

.perk-pill {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--teal-900);
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(15, 118, 110, 0.2);
}

.register-submit-btn {
  background: var(--orange-600);
  border: 1px solid var(--orange-700);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  padding: 14px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}

.register-submit-btn:hover {
  background: var(--orange-700);
}

.auth-desktop-wrapper {
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
}

.login-card {
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  padding: 38px 34px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.15);
  border: none;
}

.login-card-inner {
  width: 100%;
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.login-logo-img {
  height: 48px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
}

.login-motto {
  font-size: 11px;
  font-weight: 800;
  color: var(--orange-600);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.auth-hero-logo-box {
  background: #ffffff;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  align-self: flex-start;
}

.auth-hero-logo-img {
  height: 42px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.login-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 10px;
  margin-bottom: 4px;
}

.login-header p {
  font-size: 12.5px;
  color: var(--text-muted);
}

.login-btn-accent {
  background: var(--orange-600);
  border: 1px solid var(--orange-700);
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
}

.login-btn-accent:hover {
  background: var(--orange-700);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 30px 16px;
  background: #ffffff;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.empty-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.empty-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}

.empty-desc {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Toast alerts */
.toast-notice {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--teal-950);
  border: 1px solid var(--teal-700);
  color: #ffffff;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  z-index: 200;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
}

.toast-notice.error {
  background: #991b1b;
  border-color: #dc2626;
  color: #ffffff;
}

/* ── Notification Bell & Badges ────────────────────────────────────────── */
.notif-btn {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--orange-600);
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  min-width: 15px;
  height: 15px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.4);
  border: 1.5px solid #ffffff;
  line-height: 1;
}

.notif-badge.hidden {
  display: none;
}

.notif-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}

.notif-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: all 0.15s ease;
}

.notif-item:hover {
  border-color: var(--border-subtle);
  background: var(--bg-card-subtle);
}

.notif-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.notif-icon.earning {
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-100);
}

.notif-icon.payout {
  background: var(--orange-50);
  color: var(--orange-600);
  border: 1px solid var(--orange-100);
}

.notif-icon.school {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.notif-icon.system {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.notif-msg {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

.notif-time {
  font-size: 10px;
  color: var(--text-subtle);
  margin-top: 4px;
}

/* ── Transfer to M-Pesa Card Actions & Modal ──────────────────────────── */
.balance-action-row {
  margin-top: 10px;
  padding-bottom: 12px;
}

.withdraw-btn {
  background: var(--teal-700);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.25);
}

.withdraw-btn:hover {
  background: var(--teal-800);
}

.withdraw-btn:active {
  transform: scale(0.98);
}

.dest-phone-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dest-phone-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.dest-phone-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-800);
}

.quick-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 14px;
}

.chip-btn {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 7px 4px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  border-color: var(--teal-700);
  color: var(--teal-700);
  background: var(--teal-50);
}

.fee-calc-box {
  background: var(--orange-50);
  border: 1px solid var(--orange-100);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 11.5px;
  color: var(--orange-900);
  line-height: 1.4;
  margin-bottom: 14px;
}

/* ── Avatar & Account Dropdown Menu ────────────────────────────────────── */
.avatar-dropdown-wrap {
  position: relative;
}

.avatar-btn {
  width: 35px;
  height: 35px;
  border-radius: var(--radius-sm);
  background: var(--teal-700);
  border: 1.5px solid var(--teal-600);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.2);
  user-select: none;
}

.avatar-btn:hover {
  background: var(--teal-800);
  border-color: var(--orange-500);
  transform: translateY(-1px);
}

.avatar-btn:active {
  transform: scale(0.96);
}

.avatar-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--teal-700);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.12), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  padding: 8px 0;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.avatar-dropdown-wrap.open .avatar-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.avatar-menu-header {
  padding: 8px 14px 10px;
}

.avatar-menu-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
}

.avatar-menu-code {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.avatar-menu-phone {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.avatar-menu-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

.avatar-menu-item {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.12s ease;
  font-family: inherit;
}

.avatar-menu-item svg {
  color: var(--teal-700);
  flex-shrink: 0;
}

.avatar-menu-item:hover {
  background: var(--bg-card-subtle);
  color: var(--teal-700);
}

.avatar-menu-item.logout-item {
  color: var(--rose-600);
}

.avatar-menu-item.logout-item svg {
  color: var(--rose-600);
}

.avatar-menu-item.logout-item:hover {
  background: var(--rose-50);
}

/* ── Content Marketplace & Creator Studio ─────────────────────────────── */
.market-view-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 4px;
  margin-bottom: 14px;
}

.market-toggle-btn {
  background: none;
  border: none;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.market-toggle-btn.active {
  background: var(--teal-700);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.25);
}

.market-search-wrap {
  margin-bottom: 10px;
}

.market-search-input {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
}

.market-tags-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.market-tags-scroll::-webkit-scrollbar {
  display: none;
}

.market-tag-chip {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.market-tag-chip.active {
  background: var(--orange-50);
  color: var(--orange-700);
  border-color: var(--orange-100);
}

.market-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.resource-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: all 0.15s ease;
}

.resource-card:hover {
  border-color: var(--teal-500);
  box-shadow: 0 3px 8px rgba(15, 118, 110, 0.08);
}

.resource-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.resource-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.res-tag {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.res-tag.exam {
  background: var(--orange-50);
  color: var(--orange-700);
  border: 1px solid var(--orange-100);
}

.res-tag.sow {
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-100);
}

.res-tag.rubric {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.res-tag.notes {
  background: #fdf4ff;
  color: #a21caf;
  border: 1px solid #f5d0fe;
}

.res-grade-pill {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
}

.resource-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.resource-author {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.resource-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.resource-price {
  font-size: 15px;
  font-weight: 900;
  color: var(--teal-900);
}

.resource-price.free {
  color: var(--teal-700);
}

.resource-price .currency {
  font-size: 11px;
  color: var(--orange-600);
  font-weight: 800;
}

.resource-action-btn {
  background: var(--orange-600);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-xs);
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.resource-action-btn:hover {
  background: var(--orange-700);
}

.resource-action-btn.free-dl {
  background: var(--teal-700);
}

.resource-action-btn.free-dl:hover {
  background: var(--teal-800);
}

/* ── Creator Studio View ─────────────────────────────────────────────── */
.creator-stats-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--orange-600);
  border-radius: var(--radius-md);
  padding: 16px 16px 0 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  margin-bottom: 16px;
  overflow: hidden;
}

.creator-stats-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.creator-stats-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--orange-700);
}

.creator-stats-amount {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
  margin-top: 2px;
}

.creator-upload-btn {
  background: var(--orange-600);
  border: 1px solid var(--orange-700);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.25);
  transition: all 0.15s ease;
}

.creator-upload-btn:hover {
  background: var(--orange-700);
}

.creator-stats-metrics {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1.2fr;
  align-items: center;
  background: var(--bg-card-subtle);
  border-top: 1px solid var(--border-color);
  margin: 0 -16px;
  padding: 10px 16px;
}

.creator-stats-metrics .sub-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
}

.creator-stats-metrics .sub-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}

.creator-stats-metrics .divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
}

.file-drop-area {
  border: 2px dashed var(--border-subtle);
  background: var(--bg-card-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.file-drop-area:hover {
  border-color: var(--teal-700);
  background: var(--teal-50);
}

/* ── Auth / Login / Self-Registration Responsive Layout ─────────────────── */
.auth-desktop-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.auth-hero-pane {
  display: none;
}

.auth-tab-switch {
  display: flex;
  background: var(--bg-card-hover);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  border: none;
  background: transparent;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: var(--teal-800);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  font-weight: 800;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-switch-prompt {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
}

.auth-switch-prompt a {
  color: var(--teal-700);
  font-weight: 700;
  text-decoration: none;
  margin-left: 4px;
}

.auth-switch-prompt a:hover {
  text-decoration: underline;
}

.desktop-sidebar {
  display: none;
}

.desktop-header-action-btn {
  display: none;
}

/* ── Tablet & Desktop Breakpoints (>= 768px) ────────────────────────────── */
@media (min-width: 768px) {
  /* Modals center as dialogs on larger screens */
  .modal-overlay {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  .bottom-sheet {
    max-width: 560px;
    border-radius: 12px;
    transform: scale(0.96) translateY(12px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
    border: 1px solid var(--border-color);
    padding: 24px 24px 28px;
  }

  .modal-overlay.active .bottom-sheet {
    transform: scale(1) translateY(0);
  }

  .sheet-handle {
    display: none;
  }
}

/* ── Desktop Web App (>= 1024px) ────────────────────────────────────────── */
@media (min-width: 1024px) {
  /* Full-page Desktop Auth Layout — centered card on teal */
  .login-view {
    padding: 0;
    background: #042f2e;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .auth-desktop-wrapper {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .login-card {
    width: 480px;
    min-width: 420px;
    max-width: 500px;
    padding: 48px 52px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28), 0 4px 16px rgba(0, 0, 0, 0.12);
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .login-card-inner {
    width: 100%;
  }

  .app-container,
  .app-shell-container {
    max-width: 100%;
    margin: 0;
    border: none;
    box-shadow: none;
    background: #f8fafc;
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: 100%;
  }

  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    width: 260px;
    min-width: 260px;
    height: 100vh;
    position: sticky;
    top: 0;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    z-index: 50;
  }

  .sidebar-brand {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .sidebar-tag {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    background: var(--teal-50);
    color: var(--teal-800);
    border: 1px solid var(--teal-100);
    padding: 1px 6px;
    border-radius: var(--radius-xs);
    display: inline-block;
    margin-top: 2px;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 12px;
    flex: 1;
    overflow-y: auto;
  }

  .sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    width: 100%;
  }

  .sidebar-nav-item svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    flex-shrink: 0;
  }

  .sidebar-nav-item:hover {
    background: var(--bg-card-hover);
    color: var(--teal-800);
  }

  .sidebar-nav-item.active {
    background: var(--teal-50);
    color: var(--teal-800);
    font-weight: 800;
    border-left: 3px solid var(--orange-600);
  }

  .sidebar-badge {
    margin-left: auto;
    background: var(--teal-100);
    color: var(--teal-900);
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
  }

  .sidebar-action-wrap {
    padding: 0 14px 14px;
  }

  .sidebar-action-btn {
    width: 100%;
    background: var(--orange-600);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--orange-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
  }

  .sidebar-action-btn:hover {
    background: var(--orange-700);
  }

  .sidebar-agent-card {
    margin: 10px 12px 16px;
    padding: 12px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .sidebar-agent-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--teal-700);
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .sidebar-agent-meta {
    flex: 1;
    min-width: 0;
  }

  .sidebar-agent-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-agent-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
  }

  .sidebar-agent-bal {
    font-size: 11px;
    font-weight: 700;
    color: var(--teal-700);
  }

  .sidebar-logout-btn {
    background: none;
    border: none;
    color: var(--text-subtle);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s ease;
  }

  .sidebar-logout-btn:hover {
    color: var(--rose-600);
  }

  .app-main-layout {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f8fafc;
  }

  .app-header {
    padding: 12px 32px;
  }

  .desktop-header-action-btn {
    background: var(--orange-600);
    color: #ffffff;
    border: 1px solid var(--orange-700);
    border-radius: var(--radius-sm);
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin-right: 6px;
    transition: background 0.15s ease;
    box-shadow: 0 1px 3px rgba(234, 88, 12, 0.2);
  }

  .desktop-header-action-btn:hover {
    background: var(--orange-700);
  }

  .main-content {
    padding: 24px 32px 48px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
  }

  .bottom-nav {
    display: none !important;
  }

  /* Two-column dashboard split on laptop */
  .dash-grid-split {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
    margin-top: 8px;
  }

  /* Multi-column grids for cards */
  .school-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
  }

  .market-catalog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
  }

  /* Quick action cards on desktop */
  .quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
  }
}




/* Agent commission wallet */
.wallet-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 18px;
}
.wallet-eyebrow { color: var(--teal-700); font-size: 10px; font-weight: 900; letter-spacing: .11em; }
.wallet-page-title { margin: 3px 0 4px; color: var(--text-main); font-size: 24px; line-height: 1.2; font-weight: 900; }
.wallet-page-subtitle { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.wallet-secondary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 12px; border: 1px solid var(--border-color); border-radius: 9px;
  background: #fff; color: var(--text-main); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.wallet-secondary-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wallet-secondary-btn:disabled { opacity: .6; cursor: wait; }
.wallet-provider-notice {
  display: flex; align-items: flex-start; gap: 11px; margin: 0 0 14px; padding: 12px 14px;
  border: 1px solid var(--border-color); border-radius: 11px; background: #fff; color: var(--text-main);
}
.wallet-provider-notice.ready { border-color: #99e5c4; background: #effcf5; }
.wallet-provider-notice.setup { border-color: #f6d398; background: #fff9ed; }
.wallet-provider-notice.checking { background: #f8fafc; }
.wallet-notice-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: #e2e8f0; color: #334155; font-size: 13px; font-weight: 900; }
.wallet-provider-notice.ready .wallet-notice-icon { background: #c9f2dc; color: #087443; }
.wallet-provider-notice.setup .wallet-notice-icon { background: #ffebbf; color: #9a5b00; }
.wallet-provider-notice strong { display: block; font-size: 12px; font-weight: 800; }
.wallet-provider-notice p { margin: 3px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.45; }
.wallet-summary-grid { display: grid; grid-template-columns: minmax(270px, 1.25fr) repeat(3, minmax(150px, .75fr)); gap: 12px; margin-bottom: 24px; }
.wallet-balance-card { display: flex; min-height: 230px; flex-direction: column; padding: 17px; border-radius: 14px; color: #fff; background: linear-gradient(145deg, #0c766e 0%, #07534f 100%); box-shadow: 0 8px 24px rgba(7, 83, 79, .16); }
.wallet-balance-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: rgba(255,255,255,.82); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.wallet-card-icon { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 9px; background: rgba(255,255,255,.12); }
.wallet-card-icon svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wallet-main-amount { display: flex; align-items: baseline; gap: 7px; margin: 12px 0 auto; }
.wallet-main-amount small { color: rgba(255,255,255,.8); font-size: 13px; font-weight: 800; }
.wallet-main-amount strong { font-size: clamp(28px, 3vw, 38px); line-height: 1.1; letter-spacing: -.04em; font-weight: 900; }
.wallet-balance-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 12px; color: rgba(255,255,255,.86); font-size: 10px; }
.wallet-balance-foot button { border: 0; padding: 3px 0; background: transparent; color: #fff; text-decoration: underline; font: inherit; font-weight: 800; cursor: pointer; }
.wallet-withdraw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; border: 0; border-radius: 9px; background: #fff; color: #07534f; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
.wallet-withdraw-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wallet-withdraw-btn:disabled { cursor: not-allowed; opacity: .55; }
.wallet-action-hint { min-height: 25px; margin: 7px 0 0; color: rgba(255,255,255,.82); font-size: 9px; line-height: 1.4; }
.wallet-stat-card { display: flex; min-height: 230px; flex-direction: column; align-items: flex-start; padding: 17px 15px; border: 1px solid var(--border-color); border-radius: 14px; background: #fff; }
.wallet-stat-icon { display: grid; width: 31px; height: 31px; place-items: center; margin-bottom: 14px; border-radius: 9px; font-size: 18px; font-weight: 900; }
.wallet-stat-teal { background: #e6f8f3; color: #08776d; }
.wallet-stat-orange { background: #fff1e7; color: #d94b08; }
.wallet-stat-blue { background: #ecf3ff; color: #4169aa; }
.wallet-stat-label { color: var(--text-muted); font-size: 9px; font-weight: 900; letter-spacing: .06em; }
.wallet-stat-card strong { margin: 8px 0 5px; color: var(--text-main); font-size: clamp(18px, 2vw, 24px); line-height: 1.15; letter-spacing: -.03em; font-weight: 900; overflow-wrap: anywhere; }
.wallet-stat-card small { margin-top: auto; color: var(--text-muted); font-size: 10px; line-height: 1.45; }
.wallet-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 23px 0 10px; }
.wallet-section-heading h3, .wallet-guide-heading h3 { margin: 0; color: var(--text-main); font-size: 15px; font-weight: 900; }
.wallet-section-heading p, .wallet-guide-heading p { margin: 3px 0 0; color: var(--text-muted); font-size: 11px; }
.wallet-count-pill { padding: 5px 8px; border: 1px solid var(--border-color); border-radius: 999px; background: #fff; color: var(--text-muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.wallet-transfer-list { display: flex; flex-direction: column; gap: 8px; }
.wallet-transfer-item { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 12px; border: 1px solid var(--border-color); border-radius: 11px; background: #fff; }
.wallet-transfer-icon { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #fff5e5; color: #b76808; font-size: 16px; font-weight: 900; }
.wallet-transfer-icon.completed { background: #e7f8ef; color: #0b8050; }
.wallet-transfer-icon.failed { background: #fff0f0; color: #bd3030; }
.wallet-transfer-main { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.wallet-transfer-main strong { color: var(--text-main); font-size: 12px; font-weight: 800; }
.wallet-transfer-main > span { overflow: hidden; color: var(--text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.wallet-transfer-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: 0 0 auto; }
.wallet-transfer-amount > strong { color: var(--text-main); font-size: 13px; font-weight: 900; white-space: nowrap; }
.wallet-status-pill { padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.wallet-status-pill.pending { background: #fff4dc; color: #996000; }
.wallet-status-pill.completed { background: #e6f8ee; color: #087344; }
.wallet-status-pill.failed { background: #fff0f0; color: #b42323; }
.wallet-retry-btn { align-self: flex-start; margin-top: 3px; padding: 0; border: 0; background: none; color: var(--teal-700); font: inherit; font-size: 10px; font-weight: 800; text-decoration: underline; cursor: pointer; }
.wallet-empty-activity { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px dashed var(--border-color); border-radius: 11px; background: #fff; }
.wallet-empty-icon { display: grid; flex: 0 0 37px; width: 37px; height: 37px; place-items: center; border-radius: 10px; background: #eef8f5; }
.wallet-empty-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--teal-700); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wallet-empty-activity strong { color: var(--text-main); font-size: 12px; font-weight: 800; }
.wallet-empty-activity p { margin: 3px 0 0; color: var(--text-muted); font-size: 10px; line-height: 1.45; }
.wallet-settlement-guide { margin-top: 19px; padding: 16px; border: 1px solid var(--border-color); border-radius: 13px; background: #fff; }
.wallet-guide-heading { display: flex; align-items: center; gap: 10px; }
.wallet-guide-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: #e6f8f3; color: var(--teal-700); font-size: 20px; font-weight: 900; }
.wallet-guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.wallet-guide-steps > div { position: relative; padding-left: 29px; }
.wallet-guide-steps > div > span { position: absolute; top: 0; left: 0; display: grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; background: #e8f4f2; color: var(--teal-800); font-size: 10px; font-weight: 900; }
.wallet-guide-steps strong { color: var(--text-main); font-size: 11px; font-weight: 800; }
.wallet-guide-steps p { margin: 4px 0 0; color: var(--text-muted); font-size: 10px; line-height: 1.5; }
.wallet-commission-heading { margin-top: 26px; }
.wallet-confirm-row { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 14px; color: var(--text-main); font-size: 11px; line-height: 1.45; cursor: pointer; }
.wallet-confirm-row input { margin: 1px 0 0; accent-color: var(--teal-700); }

@media (max-width: 1000px) {
  .wallet-summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .wallet-balance-card { grid-row: span 2; }
  .wallet-stat-card { min-height: 105px; }
}
@media (max-width: 560px) {
  .wallet-page-header { align-items: flex-start; }
  .wallet-page-title { font-size: 21px; }
  .wallet-page-subtitle { max-width: 260px; font-size: 11px; }
  .wallet-secondary-btn { padding: 8px; }
  .wallet-secondary-btn span { display: none; }
  .wallet-summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .wallet-balance-card { min-height: 205px; grid-column: 1 / -1; grid-row: auto; }
  .wallet-stat-card { min-height: 125px; padding: 12px; }
  .wallet-stat-label { font-size: 8px; }
  .wallet-stat-card strong { font-size: 18px; }
  .wallet-guide-steps { grid-template-columns: 1fr; gap: 13px; }
  .wallet-guide-steps p { font-size: 10.5px; }
  .wallet-section-heading { align-items: flex-start; }
  .wallet-count-pill { font-size: 9px; }
  .wallet-transfer-item { gap: 8px; padding: 10px; }
  .wallet-transfer-icon { flex-basis: 30px; width: 30px; height: 30px; }
  .wallet-transfer-main strong { font-size: 10px; }
  .wallet-transfer-main > span { max-width: 155px; font-size: 9px; }
  .wallet-transfer-amount > strong { font-size: 11px; }
}


