/* ==========================================================================
   🌿 KSR BIOLOGY PORTAL - COMPREHENSIVE RESPONSIVE STYLESHEET
   Mobile-First & Desktop Optimized
   ========================================================================== */

:root {
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-dark: #047857;
  --primary-deep: #064e3b;
  --primary-light: #d1fae5;
  --primary-glow: rgba(16, 185, 129, 0.22);
  
  --accent: #0284c7;
  --accent-light: #e0f2fe;
  
  --amber-dark: #b45309;
  --amber-light: #fef3c7;
  
  --light-bg: #f8fafc;
  --light-surface: #ffffff;
  --light-border: #e2e8f0;
  --light-border-hover: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #475569;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 20px -4px rgba(0, 0, 0, 0.08), 0 4px 8px -4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 30px -10px rgba(16, 185, 129, 0.15);
  
  --touch-target: 44px;
}

/* Base Reset & Mobile Viewport Safeguards */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--light-bg);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.navbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--light-border);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-main);
  flex-shrink: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #10b981, #047857);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #065f46, #047857);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-text span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: var(--touch-target);
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.btn-primary:active {
  transform: scale(0.98);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-secondary {
  background: white;
  color: var(--text-main);
  border-color: var(--light-border);
}
.btn-secondary:hover {
  background: #f1f5f9;
  border-color: var(--light-border-hover);
}

.btn-sm {
  min-height: 38px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary-dark);
  border-color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary-light);
}

.btn-danger {
  background: #ef4444;
  color: white;
}
.btn-danger:hover {
  background: #dc2626;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 60%),
              radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.08), transparent 50%),
              linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 2.25rem 1rem 2rem;
  border-bottom: 1px solid var(--light-border);
  text-align: center;
  width: 100%;
}

.hero-container {
  max-width: 850px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #10b981 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* Stats Pill Row */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  max-width: 650px;
  margin: 1.25rem auto 0;
}

.stat-chip {
  background: white;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.stat-chip strong {
  color: var(--primary-dark);
  font-size: 0.95rem;
  line-height: 1.2;
}

/* ==========================================================================
   ANNOUNCEMENTS BANNER
   ========================================================================== */
.announcement-banner {
  background: linear-gradient(90deg, #064e3b, #047857);
  color: white;
  padding: 0.65rem 1rem;
  width: 100%;
}
.announcement-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.84rem;
}
.announcement-content {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ann-tag {
  background: rgba(255, 255, 255, 0.22);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==========================================================================
   MAIN CONTENT & FILTERS
   ========================================================================== */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3.5rem;
  flex: 1;
  width: 100%;
}

.search-filter-wrapper {
  background: white;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.75rem;
  width: 100%;
}

.search-box {
  position: relative;
  margin-bottom: 1rem;
  width: 100%;
}

.search-box svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* 16px font size to eliminate iOS auto-zoom on input focus */
.search-input {
  width: 100%;
  min-height: 46px;
  padding: 0.75rem 0.85rem 0.75rem 2.75rem;
  font-size: 16px;
  font-family: inherit;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s;
  background: #f8fafc;
}

.search-input:focus {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Horizontal Scrolling Filter Pills on Mobile */
.filter-group {
  margin-bottom: 0.85rem;
  width: 100%;
}
.filter-group:last-child {
  margin-bottom: 0;
}
.filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  display: block;
}

.filter-pills {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-pills::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  background: #f1f5f9;
  border: 1px solid transparent;
  color: var(--text-sub);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.pill-btn.active {
  background: var(--primary-dark);
  color: white;
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.3);
}

/* ==========================================================================
   MATERIAL CARDS GRID (100% Mobile Safe)
   ========================================================================== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.materials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  width: 100%;
}

.material-card {
  background: white;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
  position: relative;
  width: 100%;
}

.material-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--light-border-hover);
}

.material-card.pinned {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.pin-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.card-tags {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
  padding-right: 4.5rem; /* Room for pinned badge */
}

.grade-badge {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.category-badge {
  background: var(--amber-light);
  color: var(--amber-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.material-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.3rem;
  line-height: 1.35;
}

.material-chapter {
  font-size: 0.82rem;
  color: var(--primary-dark);
  font-weight: 600;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.material-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-grow: 1;
  line-height: 1.45;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--light-border);
  padding-top: 0.85rem;
  margin-top: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-meta-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.file-pill {
  background: #f1f5f9;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  color: #475569;
  font-size: 0.72rem;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.card-actions .btn {
  width: 100%;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1.25rem;
  background: white;
  border: 2px dashed var(--light-border);
  border-radius: var(--radius-lg);
  grid-column: 1 / -1;
  width: 100%;
}
.empty-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

/* ==========================================================================
   CONTACT / WHATSAPP BANNER
   ========================================================================== */
.contact-card {
  margin-top: 3rem;
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-md);
  width: 100%;
}

.contact-info h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}
.contact-info p {
  color: #a7f3d0;
  font-size: 0.9rem;
  max-width: 500px;
}
.contact-btn {
  background: #25d366;
  color: white;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s;
  width: 100%;
  max-width: 320px;
}
.contact-btn:active {
  transform: scale(0.98);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 2rem 1rem;
  margin-top: auto;
  border-top: 1px solid #1e293b;
  width: 100%;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.footer-brand p {
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.84rem;
}
.footer-links a:hover {
  color: var(--primary);
}

/* ==========================================================================
   FLASH MESSAGES
   ========================================================================== */
.flash-container {
  max-width: 1200px;
  margin: 0.75rem auto 0;
  padding: 0 1rem;
  width: 100%;
}
.flash-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.85rem;
}
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.flash-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.flash-info { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }

/* ==========================================================================
   ADMIN DASHBOARD STYLES (MOBILE-FIRST)
   ========================================================================== */
.admin-header {
  background: white;
  border-bottom: 1px solid var(--light-border);
  padding: 1.25rem 0;
  margin-bottom: 1.5rem;
  width: 100%;
}

.admin-header .nav-container {
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.admin-header-actions {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}
.admin-header-actions .btn {
  flex: 1;
}

/* 2x2 Stats Grid on Mobile */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.stat-card {
  background: white;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-md);
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: var(--shadow-sm);
}

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

.stat-card.green .stat-icon { background: #dcfce7; color: #166534; }
.stat-card.blue .stat-icon { background: #e0f2fe; color: #0369a1; }
.stat-card.amber .stat-icon { background: #fef3c7; color: #b45309; }
.stat-card.purple .stat-icon { background: #f3e8ff; color: #6b21a8; }

.stat-details h4 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}
.stat-details span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Admin Card */
.admin-card {
  background: white;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  width: 100%;
}

.form-group {
  margin-bottom: 1rem;
  width: 100%;
}
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}
.form-control, .form-select, .form-textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  font-size: 16px; /* Prevents iOS auto-zoom */
  font-family: inherit;
  border: 1.5px solid var(--light-border);
  border-radius: var(--radius-md);
  outline: none;
  background-color: #f8fafc;
  transition: border-color 0.2s;
}
.form-control:focus, .form-select:focus, .form-textarea:focus {
  background-color: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

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

/* File Dropzone */
.file-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  width: 100%;
}
.file-dropzone:active {
  background: #f0fdf4;
  border-color: var(--primary);
}

/* Responsive Table & Mobile Card List for Admin */
.admin-mobile-cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.admin-item-card {
  background: #f8fafc;
  border: 1px solid var(--light-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.admin-item-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.admin-item-actions .btn {
  width: 100%;
  padding: 0.4rem 0.2rem;
  font-size: 0.78rem;
}

/* Table View for larger screens */
.table-responsive {
  display: none; /* hidden on mobile, enabled on desktop */
  overflow-x: auto;
  width: 100%;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.admin-table th {
  background: #f8fafc;
  padding: 0.75rem 0.85rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--light-border);
}
.admin-table td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--light-border);
  font-size: 0.85rem;
  vertical-align: middle;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.modal-overlay.active {
  display: flex;
}
.modal-box {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 550px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* ==========================================================================
   DESKTOP & TABLET ENHANCEMENTS (>= 768px)
   ========================================================================== */
@media (min-width: 768px) {
  .nav-container {
    padding: 1rem 1.5rem;
  }
  
  .hero-section {
    padding: 3.5rem 1.5rem 2.5rem;
  }
  
  .hero-title {
    font-size: 2.6rem;
  }
  
  .hero-desc {
    font-size: 1.05rem;
  }
  
  .stats-bar {
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    gap: 1.25rem;
  }
  
  .stat-chip {
    flex-direction: row;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    gap: 0.6rem;
    font-size: 0.88rem;
  }
  
  .stat-chip strong {
    font-size: 1rem;
  }
  
  .search-filter-wrapper {
    padding: 1.5rem;
    margin-bottom: 2.5rem;
  }
  
  .filter-pills {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  
  .materials-grid {
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.5rem;
  }
  
  .material-card {
    padding: 1.5rem;
  }
  
  .contact-card {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
    padding: 3rem 2.5rem;
  }
  
  .contact-btn {
    width: auto;
  }
  
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  
  .admin-header .nav-container {
    flex-direction: row;
    align-items: center;
  }
  
  .admin-header-actions {
    width: auto;
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
  
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  
  /* Switch from mobile cards to table on desktop */
  .admin-mobile-cards {
    display: none;
  }
  .table-responsive {
    display: block;
  }
  
  .admin-columns-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
  }
}
