:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #8b5cf6;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f97316;
  --info-color: #0ea5e9;
  --light-color: #f8fafc;
  --dark-color: #0f172a;
  --text-color: #334155;
  --text-light: #64748b;
  --border-color: #e2e8f0;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 8px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --max-width: 1200px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-color);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.text-center { text-align: center; }
.text-light { color: var(--text-light); }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-error { color: var(--error-color); }

/* Layout */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.flex {
  display: flex;
}

.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }

/* Navigation */
.navbar {
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  padding: var(--spacing-sm) 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
}

.nav-item a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: var(--transition);
}

.nav-item a:hover {
  color: var(--primary-color);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-color);
  margin: 3px 0;
  transition: var(--transition);
}

/* Cards */
.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: var(--spacing-md);
}

.card-title {
  margin-bottom: var(--spacing-xs);
}

.card-text {
  color: var(--text-light);
  margin-bottom: var(--spacing-sm);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
}

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

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

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

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

.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; }
.btn-lg { padding: 1rem 2rem; }
.btn-block { width: 100%; }

/* Forms */
.form-container {
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-text {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: var(--spacing-xs);
}

.form-check {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.form-check input {
  margin-right: var(--spacing-sm);
}

/* Tables */
.table-container {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background: #f1f5f9;
  font-weight: 600;
}

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

.table tr:hover {
  background: #f8fafc;
}

.table-actions {
  display: flex;
  gap: var(--spacing-sm);
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-md);
}

.alert-success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

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

.alert-warning {
  background: #ffedd5;
  border: 1px solid #fed7aa;
  color: #c2410c;
}

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

/* Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: var(--spacing-lg);
}

.sidebar {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: var(--spacing-md);
  height: fit-content;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-item {
  margin-bottom: var(--spacing-sm);
}

.sidebar-item a {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  text-decoration: none;
  color: var(--text-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.sidebar-item a:hover,
.sidebar-item a.active {
  background: #dbeafe;
  color: var(--primary-color);
}

.sidebar-item i {
  margin-right: var(--spacing-sm);
}

.main-content {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: var(--spacing-lg);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.stat-card {
  background: white;
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  text-align: center;
  box-shadow: var(--card-shadow);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: var(--spacing-sm) 0;
}

.stat-label {
  color: var(--text-light);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.gallery-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover .gallery-img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: var(--spacing-sm);
  transform: translateY(100%);
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

/* Schedule */
.schedule-container {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.schedule-header {
  display: grid;
  grid-template-columns: 150px repeat(5, 1fr);
  background: #f1f5f9;
  font-weight: 600;
  text-align: center;
}

.schedule-row {
  display: grid;
  grid-template-columns: 150px repeat(5, 1fr);
  border-bottom: 1px solid var(--border-color);
}

.schedule-time {
  padding: 1rem;
  background: #f8fafc;
  font-weight: 500;
}

.schedule-cell {
  padding: 1rem;
  border-left: 1px solid var(--border-color);
  text-align: center;
}

.schedule-class {
  background: #dbeafe;
  border-radius: var(--border-radius);
  padding: var(--spacing-xs);
  margin: var(--spacing-xs) 0;
}

/* Footer */
.footer {
  background: var(--dark-color);
  color: white;
  padding: var(--spacing-xl) 0;
  margin-top: var(--spacing-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
  margin-bottom: var(--spacing-sm);
  display: inline-block;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--spacing-xs);
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: var(--transition);
}

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

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-lg);
  margin-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

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

  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .schedule-header,
  .schedule-row {
    grid-template-columns: 100px repeat(3, 1fr);
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-xs);
  }

  .form-container {
    padding: var(--spacing-md);
  }

  .schedule-header,
  .schedule-row {
    grid-template-columns: 80px 1fr 1fr;
  }

  .schedule-time {
    font-size: 0.75rem;
  }

  .schedule-cell {
    padding: 0.5rem;
    font-size: 0.75rem;
  }
}