:root {
  /* Vibrant & Appetizing Modern Apple Color Palette */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-subtle: #e0e7ff;
  --primary-border: #c7d2fe;
  --primary-glow: rgba(99, 102, 241, 0.25);

  --admin-color: #f43f5e;
  --admin-subtle: #ffe4e6;
  --admin-border: #fecdd3;

  --teacher-color: #059669;
  --teacher-subtle: #d1fae5;
  --teacher-border: #a7f3d0;

  --parent-color: #0284c7;
  --parent-subtle: #e0f2fe;
  --parent-border: #bae6fd;

  /* User-Specified Palette: #e8e3d5, #8de3c9, #6ac4a9, #959595, #ffffff */
  --primary: #6ac4a9;               /* Deep Mint Teal (#6ac4a9) */
  --primary-hover: #54b297;
  --primary-subtle: #e6f7f2;        /* Soft Mint Subtle Tint */
  --primary-border: #8de3c9;        /* Soft Mint (#8de3c9) */
  --primary-glow: rgba(106, 196, 169, 0.3);

  --accent-mint: #8de3c9;           /* Soft Mint Accent (#8de3c9) */

  --admin-color: #e06659;           /* Soft Coral */
  --admin-subtle: #fbeee8;
  --admin-border: #f3c2bc;
  
  --teacher-color: #6ac4a9;         /* Deep Mint Teal */
  --teacher-subtle: #e6f7f2;
  --teacher-border: #8de3c9;

  --parent-color: #4a7c9d;          /* Soft Slate Blue */
  --parent-subtle: #e8f1f7;
  --parent-border: #b8d4e7;

  --bg-body: #e8e3d5;               /* Linen Cream Canvas (#e8e3d5) */
  --bg-surface: #ffffff;            /* Pure White Surfaces (#ffffff) */
  --bg-subtle: #f4f0e6;             /* Subtle Layer Cream */

  --text-main: #232725;             /* Deep Slate Text */
  --text-muted: #959595;           /* Refined Warm Gray (#959595) */
  --text-light: #b0b0b0;           /* Soft Subtext */
  --border-color: #d8d3c4;          /* Warm Cream Border */

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px 0 rgba(35, 39, 37, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(106, 196, 169, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 32px -4px rgba(106, 196, 169, 0.16), 0 4px 8px -2px rgba(0, 0, 0, 0.05);

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Minimalist Navbar */
.navbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--primary-subtle);
}

.unread-badge {
  background: var(--admin-color);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.25rem;
}

.is-hidden {
  display: none !important;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  background: var(--bg-subtle);
  border-radius: 999px;
  border: 1px solid var(--border-color);
}

.role-pill {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.role-pill.admin {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.role-pill.teacher {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.role-pill.parent {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.avatar-circle.sm {
  width: 34px;
  height: 34px;
}

.avatar-circle.lg {
  width: 64px;
  height: 64px;
  font-size: 1.5rem;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile Menu Toggle Button */
.mobile-toggle-btn {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  font-size: 1.2rem;
  color: var(--text-main);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
}

/* Mobile Drawer Overlay */
.mobile-nav-drawer {
  display: none;
  flex-direction: column;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  gap: 0.75rem;
  box-shadow: var(--shadow-md);
}

.mobile-nav-drawer.active {
  display: flex;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  min-height: 40px;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--text-light);
}

.btn-danger {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.btn-danger:hover {
  background: #fca5a5;
  color: #991b1b;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  min-height: 34px;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  min-height: 48px;
}

/* Layout Wrapper */
.main-wrapper {
  max-width: 1240px;
  width: 100%;
  margin: 1.75rem auto;
  padding: 0 1.25rem;
  flex: 1;
}

/* Glass & Card Panels */
.glass-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.glass-panel:hover {
  box-shadow: var(--shadow-md);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Metrics & Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-icon.total {
  background: var(--primary-subtle);
  color: var(--primary);
}

.stat-icon.teacher {
  background: var(--teacher-subtle);
  color: var(--teacher-color);
}

.stat-icon.parent {
  background: var(--parent-subtle);
  color: var(--parent-color);
}

.stat-icon.admin {
  background: var(--admin-subtle);
  color: var(--admin-color);
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Custom Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.custom-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.custom-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

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

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

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-main);
  transition: var(--transition);
  min-height: 42px;
}

select.form-control {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
}

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

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 1.25rem;
}

.modal-overlay.active {
  display: flex !important;
  animation: modalOverlayFadeIn 0.16s ease-out forwards;
}

.modal-overlay.active .modal-content {
  animation: modalContentSpringIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalOverlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalContentSpringIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-content {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: min(90vh, 760px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  margin: 0;
}

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

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.close-btn:hover {
  color: var(--text-main);
}

.modal-body-scroll {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* Flash Alerts */
.flash-container {
  margin-bottom: 1.25rem;
}

.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alert-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.alert-danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.alert-warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.alert-info {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* Status Badges for Leave Requests */
.leave-status {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.leave-status.pending {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.leave-status.approved {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.leave-status.rejected {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Dedicated Teacher Applicant Status Badges */
.applicant-status {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.applicant-status.new {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #d8b4fe;
}

.applicant-status.interviewed {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.applicant-status.hired {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.applicant-status.rejected {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

/* REAL-TIME TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 360px;
  width: calc(100% - 2rem);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: toastSlideIn 0.35s ease-out forwards;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-main);
}

.toast.warning {
  border-left-color: #f59e0b;
}

.toast.success {
  border-left-color: #10b981;
}

.toast.danger {
  border-left-color: #ef4444;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

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

footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle-btn {
    display: inline-flex;
  }

  .user-menu .user-badge span {
    display: none;
  }

  .main-wrapper {
    margin: 1rem auto;
    padding: 0 0.85rem;
  }

  .glass-panel {
    padding: 1.1rem;
    border-radius: var(--radius-md);
  }

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

  .page-title {
    font-size: 1.45rem;
  }

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

  .stat-card {
    padding: 0.85rem;
    gap: 0.75rem;
  }

  .stat-number {
    font-size: 1.25rem;
  }

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

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}

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

/* Dashboard workspace patterns */
.dashboard-section {
  margin-top: 1.25rem;
}

.profile-summary {
  background: linear-gradient(100deg, #fff 0%, #f8fbfa 100%);
}

.workspace-nav {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem;
  margin: 0 0 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 13px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-sm);
  scrollbar-width: none;
}

.workspace-nav::-webkit-scrollbar,
.admin-workspace-tabs::-webkit-scrollbar {
  display: none;
}

.workspace-nav-label {
  padding: 0 .7rem;
  color: var(--text-light);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 700;
  white-space: nowrap;
}

.workspace-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 36px;
  padding: .45rem .7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: .82rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}

.workspace-nav-link:hover,
.workspace-nav-link:focus-visible,
.workspace-nav-link.is-active {
  background: var(--primary-subtle);
  color: var(--primary);
  outline: none;
}

.workspace-nav-link span {
  min-width: 18px;
  padding: .05rem .32rem;
  border-radius: 999px;
  color: inherit;
  background: rgba(23, 79, 74, .1);
  font-size: .7rem;
}

.section-tools {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}

.dashboard-search {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 36px;
  width: min(210px, 100%);
  padding: 0 .7rem;
  color: var(--text-light);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: var(--transition);
}

.dashboard-search:focus-within {
  border-color: var(--primary-border);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 79, 74, .08);
}

.dashboard-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text-main);
  background: transparent;
  font: inherit;
  font-size: .8rem;
}

.dashboard-search input::placeholder {
  color: var(--text-light);
}

.teacher-household-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.household-workspace-card,
.learner-workspace-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.household-workspace-card:hover,
.household-workspace-card:focus-visible,
.learner-workspace-card:hover,
.learner-workspace-card:focus-visible {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  outline: none;
}

.learner-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
}

.learner-workspace-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.35rem;
}

.dashboard-empty-filter {
  grid-column: 1 / -1;
  padding: 1.3rem;
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  text-align: center;
  color: var(--text-muted);
  font-size: .86rem;
}

.admin-workspace-tabs {
  display: flex;
  gap: .4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: .4rem;
  border-radius: var(--radius-lg);
  margin-bottom: .75rem;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-workspace-tabs .tab-nav-btn {
  border-color: transparent;
  box-shadow: none;
}

.admin-workspace-tabs .tab-nav-btn.active {
  background: var(--primary-subtle) !important;
  border-color: var(--primary-border) !important;
  color: var(--primary);
}

.workspace-context {
  margin: 0 0 1.25rem .25rem;
  color: var(--text-muted);
  font-size: .82rem;
}

.workspace-context::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: .45rem;
  border-radius: 50%;
  background: var(--teacher-color);
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(23, 79, 74, .2);
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: var(--transition);
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 768px) {
  .workspace-nav {
    margin-bottom: 1rem;
  }

  .workspace-nav-label {
    display: none;
  }

  .workspace-nav-link {
    padding: .45rem .6rem;
  }

  .section-tools {
    width: 100%;
  }

  .dashboard-search {
    flex: 1;
    width: auto;
  }

  .teacher-families-panel>div:first-child,
  .parent-learners-panel>div:first-child {
    align-items: flex-start !important;
  }

  .learner-card-grid {
    grid-template-columns: 1fr;
  }

  .household-workspace-card>div:nth-child(2) {
    padding: 1rem !important;
  }
}

@media (max-width: 480px) {
  .workspace-nav-link {
    font-size: .78rem;
  }

  .workspace-nav-link i {
    font-size: .78rem;
  }

  .workspace-nav-link span {
    display: none;
  }

  .learner-workspace-card {
    padding: 1rem;
  }

  .back-to-top {
    right: .85rem;
    bottom: .85rem;
  }
}

/* --------------------------------------------------------------------------
   Apple-Grade Fluid UI/UX Design System
   User Palette: Linen #e8e3d5, Soft Mint #8de3c9, Deep Teal #6ac4a9, Muted #959595, Surface #ffffff
   -------------------------------------------------------------------------- */
:root {
  --primary: #6ac4a9;               /* Deep Mint Teal (#6ac4a9) */
  --primary-hover: #54b297;
  --primary-subtle: #e6f7f2;        /* Soft Mint Subtle Tint */
  --primary-border: #8de3c9;        /* Soft Mint (#8de3c9) */
  --primary-glow: rgba(106, 196, 169, 0.3);

  --accent-mint: #8de3c9;           /* Soft Mint Accent (#8de3c9) */

  --admin-color: #e06659;           /* Soft Coral */
  --admin-subtle: #fbeee8;
  --admin-border: #f3c2bc;
  
  --teacher-color: #6ac4a9;         /* Deep Mint Teal */
  --teacher-subtle: #e6f7f2;
  --teacher-border: #8de3c9;

  --parent-color: #4a7c9d;          /* Soft Slate Blue */
  --parent-subtle: #e8f1f7;
  --parent-border: #b8d4e7;

  --bg-body: #e8e3d5;               /* Linen Cream Canvas (#e8e3d5) */
  --bg-surface: #ffffff;            /* Pure White Surfaces (#ffffff) */
  --bg-subtle: #f4f0e6;             /* Subtle Layer Cream */

  --text-main: #232725;             /* Deep Slate Text */
  --text-muted: #959595;           /* Refined Warm Gray (#959595) */
  --text-light: #b0b0b0;           /* Soft Subtext */
  --border-color: #d8d3c4;          /* Warm Cream Border */

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-apple-sm: 0 2px 8px -2px rgba(35, 39, 37, 0.05), 0 0 0 1px rgba(35, 39, 37, 0.04);
  --shadow-apple-md: 0 12px 32px -8px rgba(106, 196, 169, 0.16), 0 0 0 1px rgba(35, 39, 37, 0.04);
  --shadow-apple-lg: 0 24px 56px -12px rgba(35, 39, 37, 0.16), 0 0 0 1px rgba(35, 39, 37, 0.05);

  --ease-apple: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.02em;
  background-color: var(--bg-body);
  color: var(--text-main);
}

/* Glass Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px -4px rgba(106, 196, 169, 0.08);
  transition: all 0.3s var(--ease-apple);
}

.nav-container,
.main-wrapper {
  max-width: 1360px;
}

.nav-container {
  min-height: 68px;
  padding: 0.75rem 1.5rem;
}

.brand-logo {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.035em;
  font-size: 1.25rem;
  transition: transform 0.25s var(--ease-apple);
}

.brand-logo:hover {
  transform: scale(1.02);
}

.brand-wordmark span {
  color: var(--primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6ac4a9 0%, #8de3c9 100%);
  color: #ffffff;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(106, 196, 169, 0.35);
  transition: transform 0.3s var(--ease-spring);
}

.brand-logo:hover .brand-icon {
  transform: rotate(-6deg) scale(1.08);
}

.nav-links {
  gap: 0.35rem;
}

.nav-link {
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  transition: all 0.25s var(--ease-apple);
}

.nav-link:hover, .nav-link.active {
  background: var(--primary-subtle);
  color: var(--primary);
  transform: translateY(-1px);
}

/* User Badge & Avatar Pill */
.user-badge {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  box-shadow: var(--shadow-apple-sm);
  transition: all 0.25s var(--ease-apple);
}

.user-badge:hover {
  background: #ffffff;
  box-shadow: var(--shadow-apple-md);
  transform: translateY(-1px);
}

.role-pill, .leave-status, .applicant-status {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* Apple Buttons with Tactile Spring Press Feedback */
.btn {
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 650;
  min-height: 42px;
  padding: 0.6rem 1.25rem;
  transition: all 0.25s var(--ease-apple);
  box-shadow: var(--shadow-apple-sm);
}

.btn:active {
  transform: scale(0.96) !important;
}

.btn-primary {
  background: linear-gradient(135deg, #6ac4a9 0%, #54b297 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(106, 196, 169, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #54b297 0%, #43a186 100%);
  box-shadow: 0 8px 24px rgba(106, 196, 169, 0.48);
  transform: translateY(-1.5px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #ffffff;
  color: var(--primary);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-apple-md);
  transform: translateY(-1.5px);
}

/* Apple Glass Panels & Cards */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-apple-sm);
  transition: all 0.3s var(--ease-apple);
  animation: appleSpringIn 0.45s var(--ease-apple) forwards;
}

.glass-panel:hover {
  box-shadow: var(--shadow-apple-md);
}

.page-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  letter-spacing: -0.04em;
  font-weight: 700;
}

/* Apple Stats Cards Grid */
.stats-grid {
  gap: 1.1rem;
}

.stat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 249, 0.85) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-apple-sm);
  transition: all 0.3s var(--ease-apple);
  animation: appleSpringIn 0.4s var(--ease-apple) forwards;
}

.stat-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--shadow-apple-md);
  border-color: var(--primary-border);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.04em;
  font-size: 1.7rem;
  font-weight: 700;
}

/* macOS Segmented Tab Navigation Controls */
.admin-workspace-tabs,
.workspace-nav {
  background: rgba(234, 240, 237, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(218, 228, 223, 0.8);
  border-radius: 16px;
  padding: 0.35rem;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.admin-workspace-tabs .tab-nav-btn,
.workspace-nav-link {
  border-radius: 11px;
  font-weight: 650;
  font-size: 0.85rem;
  padding: 0.55rem 0.95rem;
  transition: all 0.25s var(--ease-apple);
}

.admin-workspace-tabs .tab-nav-btn.active,
.workspace-nav-link.is-active {
  background: #ffffff !important;
  color: var(--primary) !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  transform: scale(1.015);
}

/* Apple Form Controls */
.form-control {
  border-radius: 12px;
  border: 1.5px solid #dbe2dd;
  background: #ffffff;
  padding: 0.7rem 0.95rem;
  font-size: 0.92rem;
  transition: all 0.25s var(--ease-apple);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.form-control:hover {
  border-color: #b3c5be;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(23, 79, 74, 0.14);
  background: #ffffff;
}

/* Apple Spring Modal Dialog Enhancements */
.modal-content {
  border-radius: 24px;
  box-shadow: var(--shadow-apple-lg);
}

.modal-header {
  padding: 1.25rem 1.65rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.7);
}

.modal-footer {
  padding: 1.1rem 1.65rem;
  background: #f7f9f8;
  border-top: 1px solid var(--border-color);
}

/* Keyframe Animations */
@keyframes appleSpringIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

footer {
  background: transparent;
  border: 0;
  padding: 2rem 1.25rem;
}

/* Public landing page */
.marketing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(290px, .78fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
  padding: clamp(2.25rem, 6vw, 5.5rem);
  border-radius: 28px;
  background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 40%, #e0f2fe 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: 0 20px 50px -10px rgba(99, 102, 241, 0.12);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.marketing-hero::after {
  content: '';
  width: 440px;
  height: 440px;
  position: absolute;
  right: -220px;
  bottom: -260px;
  border-radius: 50%;
  border: 72px solid rgba(255, 255, 255, .5);
  pointer-events: none;
}

.hero-copy,
.hero-summary {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--primary);
  text-transform: uppercase;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
}

.hero-copy h1 {
  font-family: 'Outfit', sans-serif;
  max-width: 700px;
  margin: .75rem 0 1.1rem;
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  line-height: .98;
  letter-spacing: -.065em;
}

.hero-copy h1 em {
  color: var(--primary);
  font-style: normal;
}

.hero-copy>p {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 610px;
  color: #475569;
}

.hero-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem 1.4rem;
  margin-top: 2.2rem;
  color: #64748b;
  font-size: .81rem;
}

.trust-line span+span {
  border-left: 1px solid #cbd5e1;
  padding-left: 1.4rem;
}

.trust-line strong {
  color: var(--text-main);
}

.hero-summary {
  padding: 1.5rem;
  border: 1px solid rgba(99, 102, 241, 0.18);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(99, 102, 241, 0.09);
}

.summary-label {
  display: block;
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.hero-summary ol {
  list-style: none;
  display: grid;
  gap: 1.1rem;
}

.hero-summary li {
  display: flex;
  gap: .8rem;
}

.hero-summary b {
  color: var(--primary);
  font-size: .73rem;
  padding-top: .14rem;
}

.hero-summary strong,
.hero-summary small {
  display: block;
}

.hero-summary strong {
  font-size: .92rem;
}

.hero-summary small {
  color: var(--text-muted);
  font-size: .79rem;
  margin-top: .15rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0 3.5rem;
}

.service-card {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: var(--shadow-apple-sm);
  transition: all .25s var(--ease-apple);
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-apple-md);
  border-color: var(--primary-border);
}

.request-panel {
  max-width: 880px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 22px;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-apple-sm);
}

.request-heading {
  margin-bottom: 1.75rem;
}

.request-heading h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  letter-spacing: -.045em;
  margin: .45rem 0 .3rem;
}

.request-heading p {
  color: var(--text-muted);
}

/* Sign-in page */
.is-public:has(.login-layout) .navbar,
.is-public:has(.login-layout) footer {
  display: none;
}

.is-public:has(.login-layout) .main-wrapper {
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.login-layout {
  width: min(1120px, 100%);
  margin: auto;
  min-height: min(700px, 100vh);
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  background: #fff;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 24px 70px -10px rgba(99, 102, 241, 0.18), 0 0 0 1px rgba(99, 102, 241, 0.08);
}

.login-aside {
  background: linear-gradient(135deg, #e0e7ff 0%, #dbeafe 50%, #e0f2fe 100%);
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4rem;
}

.login-aside h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1;
  letter-spacing: -.06em;
  margin: .8rem 0 1.25rem;
  max-width: 440px;
}

.login-aside p {
  color: #475569;
  max-width: 360px;
  line-height: 1.7;
}

.login-card {
  max-width: 460px;
  width: 100%;
  margin: auto;
  padding: 2rem;
}

.login-heading {
  margin-bottom: 2rem;
}

.login-heading h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  letter-spacing: -.045em;
  margin: .6rem 0 .35rem;
}

.login-heading p,
.login-note {
  color: var(--text-muted);
  font-size: .86rem;
}

.login-note {
  margin-top: 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border-color);
  line-height: 1.55;
}

.login-note i {
  color: var(--primary);
  margin-right: .35rem;
}

/* Chat has its own deliberate app-like layout */
.chat-shell {
  box-shadow: var(--shadow-md);
}

.chat-shell>div:first-child {
  background: #fbfcfb !important;
}

@media (max-width: 900px) {
  .marketing-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-summary {
    max-width: 560px;
  }

  .service-grid {
    grid-template-columns: 1fr;
    margin-bottom: 2.5rem;
  }

  .login-layout {
    max-width: 720px;
    grid-template-columns: 1fr;
    min-height: auto;
    border-radius: 0;
    box-shadow: none;
  }

  .login-aside {
    gap: 2rem;
    padding: 2rem;
  }

  .login-aside h1 {
    font-size: 2.3rem;
  }

  .login-card {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    min-height: 62px;
    padding: .65rem 1rem;
  }

  .brand-logo {
    font-size: 1.08rem;
  }

  .brand-icon {
    width: 33px;
    height: 33px;
  }

  .user-menu {
    gap: .45rem;
  }

  .user-badge .avatar-circle {
    width: 32px;
    height: 32px;
  }

  .main-wrapper {
    margin-top: 1rem;
    margin-bottom: 2rem;
  }

  .marketing-hero {
    padding: 2.1rem 1.35rem;
    border-radius: 16px;
  }

  .hero-copy h1 {
    font-size: clamp(2.45rem, 12vw, 3.25rem);
  }

  .hero-copy>p {
    font-size: .96rem;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .trust-line {
    gap: .5rem .85rem;
  }

  .trust-line span+span {
    padding-left: .85rem;
  }

  .hero-summary {
    padding: 1.2rem;
  }

  .request-panel {
    border-radius: 14px;
  }

  .chat-shell {
    height: calc(100dvh - 142px) !important;
    min-height: 500px;
  }

  .chat-shell>div:first-child {
    width: 92px !important;
    flex: 0 0 92px;
  }

  .chat-shell>div:first-child>div:first-child {
    padding: .6rem !important;
  }

  .chat-shell>div:first-child>div:first-child>div:first-child span {
    display: none;
  }

  .chat-shell #contactSearchInput {
    display: none;
  }

  .chat-shell .contact-item {
    padding: .7rem !important;
  }

  .chat-shell .contact-item>div:first-child>div:first-child>div:last-child,
  .chat-shell .contact-item>div:last-child {
    display: none !important;
  }

  .chat-shell #activeContactHeader {
    padding: .75rem .9rem !important;
  }

  .chat-shell #activeContactSubtitle {
    display: none;
  }

  .chat-shell #messagesContainer {
    padding: 1rem !important;
  }

  .chat-shell #sendMessageForm {
    padding: .7rem !important;
    gap: .45rem !important;
  }

  .chat-shell #sendMessageBtn {
    padding: .65rem .8rem !important;
  }

  .chat-shell #sendMessageBtn {
    font-size: 0;
  }

  .chat-shell #sendMessageBtn i {
    font-size: .9rem;
    margin: 0;
  }
}

@media (max-width: 480px) {
  .user-menu>.btn {
    display: none;
  }

  .mobile-nav-drawer {
    padding: .8rem 1rem;
  }

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

  .stat-card {
    padding: .9rem;
  }

  .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .stat-label {
    font-size: .72rem;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-content {
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
  }

  .modal-header,
  .modal-body-scroll,
  .modal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .modal-footer .btn {
    flex: 1;
  }

  .login-aside {
    padding: 1.5rem;
  }

  .login-aside h1 {
    font-size: 2rem;
  }

  .login-card {
    padding: 1.5rem;
  }

  .chat-shell>div:first-child {
    width: 68px !important;
    flex-basis: 68px;
  }

  .chat-shell #activeContactHeader {
    padding: .65rem .7rem !important;
  }

  .chat-shell #activeContactName {
    font-size: .9rem !important;
  }
}

/* ===== Fee Receipt Table & Cards ===== */
.receipt-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 700px;
}

.receipt-table thead {
  background: var(--bg-subtle);
}

.receipt-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  font-weight: 700;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.receipt-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

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

.receipt-table tbody tr {
  transition: background 0.15s ease;
}

.receipt-table tbody tr:hover {
  background: var(--primary-subtle);
}

.receipt-amount-cell {
  font-weight: 700;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
}

.receipt-method-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.receipt-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid var(--primary-border);
  color: var(--primary);
  background: var(--primary-subtle);
}

.receipt-link-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Parent receipt history cards */
.receipt-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.receipt-history-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.receipt-history-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary), #818cf8);
  border-radius: 4px 0 0 4px;
}

.receipt-history-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.receipt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.receipt-card-number {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.receipt-card-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.receipt-card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  margin-bottom: 0.85rem;
}

.receipt-card-detail-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light);
  font-weight: 700;
}

.receipt-card-detail-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.receipt-card-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

/* Receipt Verification QR Modal */
.qr-modal-dialog {
  max-width: 450px !important;
}
.qr-card-frame {
  position: relative;
  background: #ffffff;
  padding: 0.85rem;
  border-radius: 16px;
  border: 2px solid #e2e8f0;
  box-shadow: 0 12px 28px -6px rgba(124, 58, 237, 0.15), 0 4px 10px -2px rgba(0, 0, 0, 0.05);
  margin: 0.85rem auto;
  display: inline-block;
}
.qr-card-frame img {
  width: 190px;
  height: 190px;
  display: block;
  border-radius: 8px;
}
.qr-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 0.25rem;
}
.qr-info-box {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin: 0.85rem 0;
  text-align: left;
}
.qr-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  margin-bottom: 0.35rem;
}
.qr-info-row:last-child {
  margin-bottom: 0;
}
.qr-copy-bar {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 0.35rem 0.5rem 0.35rem 0.75rem;
}
.qr-copy-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.78rem;
  color: var(--text-muted);
  outline: none;
  font-family: monospace;
}
.qr-copy-btn {
  background: #7c3aed;
  color: white;
  border: none;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s;
  white-space: nowrap;
}
.qr-copy-btn:hover {
  background: #6d28d9;
}