/**
 * Valencia UI Design System
 * Coaching & Coding Management Portal
 * Developer: Md. Wali Khan
 * Portfolio: https://MyWeb.iq9.in
 * 
 * Mobile-First, Glassmorphism, Animated Gradients
 */

/* ===== CSS VARIABLES (DESIGN TOKENS) ===== */
:root {
  /* Background Gradients */
  --bg-gradient-start: #c8d9ff;
  --bg-gradient-end: #e2c8ff;
  
  /* Card & Container */
  --card-bg: #ffffff; 
  --card-radius: 22px;
  --card-shadow: 0 18px 40px rgba(15, 23, 42, 0.22); 
  
  /* Primary Colors */
  --coaching-blue: #345cff;
  --coaching-blue-light: #6b8aff;
  --coding-purple: #8e5bff;
  --coding-purple-light: #b18aff;
  
  /* Status Colors */
  --success-green: #16a34a;
  --success-green-light: #dcfce7;
  --danger-red: #ef4444;
  --danger-red-light: #fee2e2;
  --warning-amber: #f59e0b;
  --warning-amber-light: #fef3c7;
  
  /* Text Colors */
  --text-dark: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  
  /* Effects */
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.15);
  --shadow-hover: 0 20px 40px rgba(15, 23, 42, 0.25);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, 'Helvetica Neue', Arial, sans-serif;
  background: #e2c8ff;
  background: linear-gradient(180deg, #c8d9ff 0%, #e2c8ff 100%);
  min-height: 100vh;
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background-attachment: fixed;
}

html {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  background: #e2c8ff;
}

/* Desktop Mode Background - Match gradient colors */
@media (min-width: 481px) {
  body {
    background: linear-gradient(180deg, #c8d9ff 0%, #e2c8ff 100%) !important;
    background-attachment: fixed;
  }
}

/* ===== MAIN APP CONTAINER - FULLY RESPONSIVE ===== */
.app-container {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh;
  margin: 0 auto !important;
  padding: 0 20px 100px 20px;
  background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  position: relative;
  box-shadow: none;
  overflow-x: hidden !important;
}

/* Mobile (<768px) - No box shadow, 100% width */
@media (max-width: 767px) {
  .app-container {
    box-shadow: none;
    max-width: 100%;
    padding: 0 16px 100px 16px;
    width: 100%;
  }
}

/* Tablet (768px-1023px) - Full width */
@media (min-width: 768px) and (max-width: 1023px) {
  .app-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 24px 100px 24px;
    box-shadow: none;
  }
}

/* Desktop (>=1024px) - Full width without viewport unit gap */
@media (min-width: 1024px) {
  .app-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 32px 60px 32px;
    box-shadow: none;
  }
}

/* ===== CARDS ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(148, 163, 184, 0.15);
  transition: var(--transition-smooth);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* Announcement icon styling */
.card > div[style*="border-radius: 50%"] svg {
    width: 32px !important;
    height: 32px !important;
}

/* Make announcement type icons white - but not holiday/important */
.card > div[style*="background: linear-gradient(135deg, #345cff"] svg {
    fill: white !important;
}

.card > div[style*="background: linear-gradient(135deg, #6b8aff"] svg {
    fill: white !important;
}.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
}

.card-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
}

h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }

.text-muted {
  color: var(--text-muted);
  font-size: 14px;
}

.text-small {
  font-size: 12px;
  color: var(--text-light);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  line-height: 1;
  max-width: 100%;
}

.btn:active {
  transform: scale(0.98);
}

/* Mobile - Full width buttons */
@media (max-width: 767px) {
  .btn-block {
    width: 100%;
  }
}

/* Tablet/Desktop - Restrict button width to prevent stretching */
@media (min-width: 768px) {
  .btn {
    max-width: 400px;
  }
  
  .btn-block {
    width: auto;
    max-width: 400px;
  }
}

/* Primary Button */
.btn-primary {
  background: linear-gradient(135deg, #345cff 0%, #6b8aff 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(52, 92, 255, 0.35);
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Prevent wrapping + oversized icons on upload buttons */
.assignment-upload-btn {
  display: inline-flex !important;
  align-items: center;
  white-space: nowrap;
}

.assignment-upload-btn svg {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  flex-shrink: 0;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2449ff 0%, #5775ff 100%);
  box-shadow: 0 12px 28px rgba(52, 92, 255, 0.45);
  transform: translateY(-2px);
}

/* Upload/Download Button Icon Sizing */
.btn-primary svg,
.btn-success svg {
  height: 16px;
  width: 16px;
  flex-shrink: 0;
}

/* Secondary Button */
.btn-secondary {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  color: var(--text-dark);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #d1d5db 0%, #b8bcc2 100%);
}

/* Success Button */
.btn-success {
  background: linear-gradient(135deg, #16a34a 0%, #23c16b 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.35);
}

.btn-success:hover {
  background: linear-gradient(135deg, #15803d 0%, #1a9952 100%);
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.45);
  transform: translateY(-2px);
}

/* Danger Button */
.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #ff6b6b 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #ee5555 100%);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.45);
  transform: translateY(-2px);
}

/* Warning Button */
.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #f0a518 100%);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
}

/* Coding Purple Button */
.btn-coding {
  background: linear-gradient(135deg, #8e5bff 0%, #b18aff 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(142, 91, 255, 0.35);
}

.btn-coding:hover {
  background: linear-gradient(135deg, #7a48ff 0%, #9d76ff 100%);
  box-shadow: 0 12px 28px rgba(142, 91, 255, 0.45);
  transform: translateY(-2px);
}

/* Full Width Button */
.btn-block {
  width: 100%;
  display: flex;
}

/* Tablet/Desktop - Restrict full width buttons */
@media (min-width: 768px) {
  .btn-block {
    width: auto;
    max-width: 400px;
  }
}

/* Small Button */
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* Icon Button */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
}

/* ===== PILLS (STATUS BADGES) ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.pill-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid rgba(22, 101, 52, 0.1);
}

.pill-danger {
  background: var(--danger-red-light);
  color: #991b1b;
}

.pill-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid rgba(146, 64, 14, 0.1);
}

.pill-primary {
  background: #e5ebff;
  color: var(--coaching-blue);
}

.pill-muted {
  background: #f3f4f6;
  color: var(--text-muted);
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  transition: var(--transition-smooth);
  background: #ffffff;
  max-width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--coaching-blue);
  box-shadow: 0 0 0 3px rgba(52, 92, 255, 0.1);
}

.form-control::placeholder {
  color: var(--text-light);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
}

/* Tablet/Desktop - Restrict form control width */
@media (min-width: 768px) {
  .form-control {
    max-width: 400px;
  }
}

/* ===== BOTTOM NAVIGATION - RESPONSIVE ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 0 12px 12px;
  z-index: 1000;
}

.bottom-nav-inner {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 26px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
  padding: 8px;
  display: flex;
  justify-content: space-around;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.nav-item {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding: 10px 8px;
  border: none;
  background: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  border-radius: 16px;
}

.nav-item:hover {
  background: rgba(52, 92, 255, 0.05);
}

.nav-item.active {
  color: var(--coaching-blue);
  background: rgba(52, 92, 255, 0.1);
}

.nav-item .icon {
  font-size: 22px;
  display: block;
  margin-bottom: 4px;
}

/* Tablet - Expand bottom nav */
@media (min-width: 768px) and (max-width: 1023px) {
  .bottom-nav {
    max-width: 600px;
    padding: 0 12px 12px;
  }
}

/* Desktop - Keep centered with max-width */
@media (min-width: 1024px) {
  .bottom-nav {
    max-width: 600px;
    padding: 0 12px 12px;
  }
}

/* ===== ATTENDANCE CIRCLE ===== */
.attendance-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 12px solid var(--coaching-blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 24px auto;
  position: relative;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(52, 92, 255, 0.15);
}

.attendance-circle.coding {
  border-color: var(--coding-purple);
  box-shadow: 0 8px 20px rgba(142, 91, 255, 0.15);
}

.attendance-circle .percentage {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
}

.attendance-circle .label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.attendance-circle .days-info {
  position: absolute;
  bottom: -28px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Color variations based on attendance % */
.attendance-circle.high {
  border-color: var(--success-green);
}

.attendance-circle.medium {
  border-color: var(--warning-amber);
}

.attendance-circle.low {
  border-color: var(--danger-red);
}

/* ===== BAR CHARTS ===== */
.bar-chart-container {
  margin: 24px 0;
}

.bar-chart {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 120px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 16px;
  margin-bottom: 12px;
  position: relative;
  background-image: repeating-linear-gradient(
    to top,
    transparent,
    transparent calc(20% - 1px),
    rgba(209, 213, 219, 0.3) calc(20% - 1px),
    rgba(209, 213, 219, 0.3) 20%
  );
  width: 100%;
}

/* Tablet/Desktop - Ensure responsive chart width */
@media (min-width: 768px) {
  .bar-chart {
    min-height: 180px;
    height: auto;
    max-width: 100%;
  }
}

.bar-chart::after {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #d1d5db;
  z-index: 0;
}

.bar-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.bar {
  width: 100%;
  background: linear-gradient(180deg, #3b82f6 0%, #60a5fa 100%);
  border-radius: 6px 6px 0 0;
  position: relative;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  min-height: 10px;
  box-shadow: 0 -2px 8px rgba(59, 130, 246, 0.3), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.bar:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.bar.coaching {
  background: linear-gradient(135deg, var(--coaching-blue), var(--coaching-blue-light));
}

.bar.coding {
  background: linear-gradient(135deg, var(--coding-purple), var(--coding-purple-light));
}

.bar.high {
  background: linear-gradient(180deg, #3b82f6 0%, #60a5fa 100%);
  box-shadow: 0 -2px 8px rgba(59, 130, 246, 0.35), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.bar.medium {
  background: linear-gradient(180deg, #60a5fa 0%, #93c5fd 100%);
  box-shadow: 0 -2px 8px rgba(96, 165, 250, 0.35), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.bar.low {
  background: linear-gradient(180deg, #a78bfa 0%, #c4b5fd 100%);
  box-shadow: 0 -2px 8px rgba(167, 139, 250, 0.35), 0 2px 4px rgba(0, 0, 0, 0.05);
}

.bar-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.bar-tooltip {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-dark);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.bar:hover .bar-tooltip {
  opacity: 1;
}

/* Chart Legend */
.chart-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* ===== COURSE SELECTION CARDS ===== */
.course-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 24px 0;
}

/* Tablet - 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
  .course-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Desktop - Auto-fit columns */
@media (min-width: 1024px) {
  .course-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
  }
}

.course-card {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--card-radius);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 3px solid transparent;
  overflow: hidden;
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.1;
  pointer-events: none;
}

/* Coaching Card - Unlocked */
.course-card.coaching.unlocked {
  background: linear-gradient(135deg, #2563eb, #6366f1);
  color: #ffffff;
  border-color: var(--coaching-blue);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.3);
}

.course-card.coaching.unlocked:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 50px rgba(37, 99, 235, 0.4);
}

/* Coding Card - Unlocked */
.course-card.coding.unlocked {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: #ffffff;
  border-color: var(--coding-purple);
  box-shadow: 0 16px 40px rgba(139, 92, 246, 0.3);
}

.course-card.coding.unlocked:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 50px rgba(139, 92, 246, 0.4);
}

/* Locked Cards */
.course-card.locked {
  background: #f3f4f6;
  color: var(--text-muted);
  border: 2px dashed #d1d5db;
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.course-card.locked:hover {
  transform: none;
}

.course-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.course-card h3 {
  font-size: 22px;
  margin-bottom: 8px;
  color: inherit;
}

.course-card p {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 16px;
}

.course-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 8px;
}

.course-badge.unlock {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.course-badge.locked-badge {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-muted);
}

/* ===== TABLES ===== */
.table-container {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

thead {
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}

th, td {
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
}

th {
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

td {
  color: var(--text-muted);
  border-top: 1px solid #f3f4f6;
}

tr:hover td {
  background: #f9fafb;
}

/* Tablet - Increase padding for better readability */
@media (min-width: 768px) {
  th, td {
    padding: 16px 18px;
    font-size: 14px;
  }
}

/* Desktop - Further increase padding */
@media (min-width: 1024px) {
  th, td {
    padding: 18px 20px;
    font-size: 15px;
  }
}

/* ===== AVATARS ===== */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.avatar-lg {
  width: 60px;
  height: 60px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

.w-100 { width: 100%; }

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f4f6;
  border-top-color: var(--coaching-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== ALERTS ===== */
.alert {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background: var(--success-green-light);
  color: #166534;
  border-left: 4px solid var(--success-green);
}

.alert-danger {
  background: var(--danger-red-light);
  color: #991b1b;
  border-left: 4px solid var(--danger-red);
}

.alert-warning {
  background: var(--warning-amber-light);
  color: #92400e;
  border-left: 4px solid var(--warning-amber);
}

.alert-info {
  background: #e5ebff;
  color: var(--coaching-blue);
  border-left: 4px solid var(--coaching-blue);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 767px) {
  .app-container {
    padding: 12px;
  }
  
  .card {
    padding: 18px;
    margin-bottom: 16px;
  }
  
  .attendance-circle {
    width: 100px;
    height: 100px;
    border-width: 10px;
  }
  
  .attendance-circle .percentage {
    font-size: 28px;
  }
  
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 18px; }
  h4 { font-size: 16px; }
}

/* Tablet responsive adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
  .card {
    padding: 22px;
    margin-bottom: 20px;
  }
  
  .attendance-circle {
    width: 130px;
    height: 130px;
    border-width: 12px;
  }
  
  .attendance-circle .percentage {
    font-size: 36px;
  }
  
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  h4 { font-size: 18px; }
}

/* Desktop responsive adjustments */
@media (min-width: 1024px) {
  .card {
    padding: 28px;
    margin-bottom: 24px;
    border-radius: 24px;
  }
  
  .card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
  }
  
  .attendance-circle {
    width: 150px;
    height: 150px;
    border-width: 14px;
  }
  
  .attendance-circle .percentage {
    font-size: 42px;
  }
  
  h1 { font-size: 32px; }
  h2 { font-size: 28px; }
  h3 { font-size: 24px; }
  h4 { font-size: 20px; }
}

/* ===== PRINT STYLES ===== */
@media print {
  .bottom-nav,
  .btn,
  .nav-item {
    display: none !important;
  }
  
  body {
    background: #ffffff;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }
}

/* ===== COMPREHENSIVE RESPONSIVE ENHANCEMENTS ===== */

/* Mobile-First: Default base styles already account for mobile */

/* Tablet Specific Enhancements (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Wider cards for tablet */
  .card {
    max-width: 100%;
  }
  
  /* Two-column grid for lists/assignments */
  .list-container,
  .assignment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  /* Button groups should spread better */
  .btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }
  
  /* Make icons slightly larger for tablet */
  .card-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
  
  /* Spacious form layouts */
  .form-group {
    margin-bottom: 24px;
  }
}

/* Desktop Enhancements (1024px+) */
@media (min-width: 1024px) {
  /* Smart grid for dashboard cards - auto-fit approach */
  .dashboard-grid,
  .stats-grid,
  .action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    width: 100%;
  }
  
  /* Override forced 2-column tablets grids to 4-column on desktop */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .action-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* List/Assignment items in 2-3 columns */
  .list-container,
  .assignment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
  }
  
  /* Full-width containers within max-width parent */
  .card {
    width: 100%;
    max-width: 100%;
  }
  
  /* Larger interactive elements */
  .btn {
    padding: 14px 28px;
    font-size: 16px;
  }
  
  .btn-sm {
    padding: 10px 18px;
    font-size: 14px;
  }
  
  /* Better spacing for forms */
  .form-group {
    margin-bottom: 28px;
  }
  
  .form-label {
    font-size: 15px;
  }
  
  .form-control {
    padding: 14px 18px;
    font-size: 16px;
  }
  
  /* Icon sizing for desktop */
  .card-icon {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }
  
  /* Larger avatar on desktop */
  .avatar-lg {
    width: 72px;
    height: 72px;
  }
  
  /* Better text hierarchy */
  .text-muted {
    font-size: 15px;
  }
  
  .text-small {
    font-size: 13px;
  }
  
  /* Improved button spacing in groups */
  .btn-group {
    display: flex;
    gap: 16px;
    align-items: center;
  }
  
  /* Prevent card stretching - use centered layout */
  .card-list {
    max-width: 800px;
    margin: 0 auto;
  }
}

/* Extra Large Desktop (1440px+) */
@media (min-width: 1440px) {
  .app-container {
    max-width: 1400px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
  }
  
  .action-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
  }
  
  .card {
    padding: 32px;
  }
}

