/* ========================================
   MICHAEL CHILUFYA SATA GIRLS STEM SCHOOL
   School Management System - Modern Design
   ======================================== */

/* ========== ROOT VARIABLES ========== */
:root {
  --primary-color: #1e3a5f;      /* Navy Blue */
  --secondary-color: #0891b2;     /* Teal */
  --accent-color: #10b981;        /* Green */
  --warning-color: #f59e0b;       /* Amber */
  --danger-color: #ef4444;        /* Red */
  --light-bg: #f8fafc;            /* Light gray */
  --card-bg: #ffffff;             /* White */
  --text-primary: #1e293b;        /* Dark slate */
  --text-secondary: #64748b;      /* Slate */
  --border-color: #e2e8f0;        /* Light border */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

/* ========== RESET & BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--light-bg);
  min-height: 100vh;
}

/* ========== NAVIGATION ========== */
.nav {
  background: linear-gradient(135deg, var(--primary-color) 0%, #2c5282 100%);
  color: white;
  padding: 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-top {
  background: rgba(0,0,0,0.1);
  padding: 0.5rem 2rem;
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-top a {
  color: white;
  text-decoration: none;
  margin-left: 1rem;
}

.nav-main {
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.brand-text h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.brand-text p {
  font-size: 0.875rem;
  opacity: 0.9;
  margin: 0;
}

.nav nav {
  display: flex;
  gap: 0.5rem;
}

.nav a.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a.nav-link:hover {
  background: rgba(255,255,255,0.15);
}

.nav a.nav-link.active {
  background: rgba(255,255,255,0.2);
}

/* ========== HERO SECTION ========== */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== CONTAINER ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ========== CARDS ========== */
.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--secondary-color);
}

.card h3 {
  color: var(--text-primary);
  margin: 1.5rem 0 1rem;
  font-size: 1.25rem;
}

.card p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* ========== GRID LAYOUTS ========== */
.grid {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: var(--secondary-color);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity: 0.95;
}

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

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

.btn-success {
  background: var(--accent-color);
}

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

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

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

/* ========== FORMS ========== */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.input-field,
select,
textarea {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.input-field:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

select {
  cursor: pointer;
  background: white;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* ========== TABLES ========== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
  background: #f8fafc;
}

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

/* ========== BADGES ========== */
.badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--secondary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-primary { background: var(--primary-color); }
.badge-success { background: var(--accent-color); }
.badge-warning { background: var(--warning-color); }
.badge-danger { background: var(--danger-color); }
.badge-info { background: var(--secondary-color); }

/* ========== ALERTS ========== */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin: 1rem 0;
  border-left: 4px solid;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border-color: var(--accent-color);
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: var(--danger-color);
}

.alert-info {
  background: #ecfeff;
  color: #155e75;
  border-color: var(--secondary-color);
}

.alert-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: var(--warning-color);
}

/* ========== STATS CARDS ========== */
.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--secondary-color);
  transition: all 0.3s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.stat-card h3 {
  font-size: 2rem;
  color: var(--primary-color);
  margin: 0;
}

.stat-card p {
  color: var(--text-secondary);
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
}

/* ========== FOOTER ========== */
.footer {
  background: var(--primary-color);
  color: white;
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  display: block;
  margin: 0.5rem 0;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  color: rgba(255,255,255,0.7);
}

/* ========== DASHBOARD ========== */
.dashboard-header {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.dashboard-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.dashboard-nav a {
  padding: 0.75rem 1.5rem;
  background: var(--light-bg);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
  background: var(--secondary-color);
  color: white;
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--accent-color); }
.text-danger { color: var(--danger-color); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-main {
    flex-direction: column;
    gap: 1rem;
  }

  .nav nav {
    flex-direction: column;
    width: 100%;
  }

  .nav a.nav-link {
    text-align: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .container {
    padding: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  table {
    font-size: 0.875rem;
  }

  th, td {
    padding: 0.75rem 0.5rem;
  }
}

@media print {
  .nav, .footer, .btn, .dashboard-nav {
    display: none;
  }

  body {
    background: white;
  }

  .card {
    box-shadow: none;
    page-break-inside: avoid;
  }
}
