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

:root {
  --primary-color: #4a90d9;
  --primary-hover: #357abd;
  --secondary-color: #6c757d;
  --background-color: #f5f7fa;
  --panel-background: #ffffff;
  --border-color: #e1e5eb;
  --text-color: #333333;
  --text-muted: #6c757d;
  --success-color: #28a745;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  min-height: 100vh;
}

header {
  background: linear-gradient(135deg, var(--primary-color), #6366f1);
  color: white;
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow);
}

header h1 {
  font-size: 1.75rem;
  font-weight: 600;
}

.container {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 80px);
}

.panel {
  background: var(--panel-background);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel h2 {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 1.25rem;
  background: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}

/* Grades Panel (Left) */
.grades-panel {
  width: 250px;
  flex-shrink: 0;
}

.panel-list {
  list-style: none;
}

.panel-list li {
  padding: 1rem 1.25rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.panel-list li:last-child {
  border-bottom: none;
}

.panel-list li:hover {
  background-color: var(--background-color);
}

.panel-list li.active {
  background-color: var(--primary-color);
  color: white;
}

.panel-list li.disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.panel-list li.disabled:hover {
  background-color: transparent;
}

.grade-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.panel-list li.active .grade-icon {
  background: rgba(255, 255, 255, 0.2);
}

.panel-list li.disabled .grade-icon {
  background: var(--secondary-color);
}

/* Calculations Panel (Right) */
.calculations-panel {
  flex: 1;
}

.calculations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
}

.calculation-card {
  background: var(--background-color);
  border-radius: 10px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.calculation-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 144, 217, 0.15);
}

.calculation-card.selected {
  border-color: var(--primary-color);
  background: rgba(74, 144, 217, 0.1);
}

.calculation-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.calculation-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    padding: 1rem;
  }
  
  .grades-panel {
    width: 100%;
  }
  
  .panel-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .panel-list li {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
  }
  
  .calculations-grid {
    grid-template-columns: 1fr;
  }
}
