/* ===================================
   CURRICULUM DASHBOARD - STYLES.CSS
   Minimalistisch & Clean Design
   =================================== */

/* === CSS Variables === */
:root {
  --color-bg: #FFFFFF;
  --color-text: #1A1A1A;
  --color-text-light: #6B7280;
  --color-accent: #3B82F6;
  --color-border: #E5E7EB;
  --color-hover: #F3F4F6;
  --color-success: #10B981;
  --color-danger: #EF4444;
  --color-warning: #F59E0B;
}

/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* === Typography === */
h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

p {
  margin-bottom: 8px;
}

/* === Navigation === */
.main-nav {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-link {
  padding: 6px 12px;
  text-decoration: none;
  color: var(--color-text);
  border-radius: 6px;
  transition: background 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 15px;
  font-family: inherit;
}

.nav-link:hover {
  background: var(--color-hover);
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 200px;
  margin-top: 8px;
  z-index: 101;
  max-height: 400px;
  overflow-y: auto;
}

.dropdown-item {
  display: block;
  padding: 12px 16px;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--color-hover);
}

/* === Container === */
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px;
}

/* === Search Bar === */
.search-bar {
  margin-bottom: 24px;
}

.search-input {
  width: 100%;
  max-width: 500px;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* === Filter Tags === */
.filter-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--color-accent);
  color: white;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
}

.filter-tag button {
  color: white;
  font-size: 18px;
  font-weight: bold;
  padding: 0;
  margin: 0;
}

/* === Cards Grid === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.card h3 {
  margin-bottom: 8px;
  color: var(--color-text);
}

.card .docent {
  color: var(--color-text-light);
  font-size: 14px;
  margin-bottom: 12px;
}

.card .stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--color-text-light);
}

/* === Buttons === */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background: #2563EB;
}

.btn-secondary {
  background: var(--color-hover);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: var(--color-border);
}

.btn-danger {
  background: var(--color-danger);
  color: white;
}

.btn-danger:hover {
  background: #DC2626;
}

.btn-success {
  background: var(--color-success);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

/* === Forms === */
.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--color-text);
  font-size: 14px;
}

.form-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* === Checkbox List === */
.checkbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.checkbox-item:hover {
  background: var(--color-hover);
}

.checkbox-item input[type="checkbox"] {
  margin-top: 4px;
  cursor: pointer;
}

.checkbox-item label {
  cursor: pointer;
  flex: 1;
  font-size: 14px;
}

/* === List Items (for selection) === */
.list-item {
  padding: 10px;
  border-bottom: 1px solid var(--color-border);
  transition: all 0.2s;
  font-size: 14px;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background: var(--color-hover);
}

.list-item-selected {
  padding: 10px;
  border-bottom: 1px solid var(--color-border);
  background: #10B981 !important;
  font-size: 14px;
  transition: all 0.2s;
  color: white !important;
  font-weight: 500;
}

.list-item-selected:last-child {
  border-bottom: none;
}

.list-item-selected:hover {
  background: #059669 !important;
}

.list-item-selected span {
  color: white !important;
}

/* === Tables === */
.table-container {
  overflow-x: auto;
  margin-bottom: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}

th, td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

th {
  background: var(--color-hover);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background: var(--color-hover);
}

/* === Gap Highlight === */
.gap-highlight {
  background-color: #FEE2E2 !important;
}

.gap-highlight:hover {
  background-color: #FECACA !important;
}

/* === Stats Cards === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 6px;
}

.stat-label {
  color: var(--color-text-light);
  font-size: 13px;
}

/* === Charts === */
.chart-container {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chart-container h3 {
  margin-bottom: 12px;
}

/* === Matrix View === */
.matrix-container {
  overflow: auto;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  max-height: 70vh;
}

.matrix-table {
  min-width: 800px;
}

.matrix-table th {
  min-width: 120px;
  white-space: nowrap;
}

.matrix-table td {
  text-align: center;
}

.matrix-check {
  color: var(--color-success);
  font-size: 18px;
  font-weight: bold;
}

/* === Toggle Switch === */
.toggle-container {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.toggle-label {
  font-weight: 500;
}

/* === Detail Page === */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.detail-actions {
  display: flex;
  gap: 8px;
}

.detail-section {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.detail-section h2 {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-list-item {
  padding: 8px 12px;
  background: var(--color-hover);
  border-radius: 4px;
  font-size: 14px;
}

/* === Notification === */
.notification {
  position: fixed;
  top: 80px;
  right: -300px;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  transition: right 0.3s ease;
}

.notification.show {
  right: 24px;
}

.notification.fade-out {
  opacity: 0;
}

.notification-success {
  background: var(--color-success);
  color: white;
}

.notification-error {
  background: var(--color-danger);
  color: white;
}

.notification-warning {
  background: var(--color-warning);
  color: white;
}

/* === Responsive === */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

  .main-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .checkbox-list {
    grid-template-columns: 1fr;
  }

  .detail-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .detail-actions {
    flex-direction: column;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }
}

