:root {
  --bg-color: #ffffff;
  --white: #ffffff;
  --dark: #000000;
  --accent: #e52e2e; /* Red accent for indicators */
  --text-main: #000000;
  --text-muted: #999999;
  --border-radius: 24px;
  --card-radius: 12px;
  --font-family: "Inter", "Outfit", sans-serif;
}

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden; /* App-like feel */
}

/* 3-Column Layout */
/* Base Layout Grid */
.app-container {
  display: grid;
  grid-template-columns: var(--sidebar-width, 240px) 1fr;
  height: 100vh;
  width: 100%;
  transition: grid-template-columns 0.3s ease;
}

.app-container.layout-3-col {
  grid-template-columns: var(--sidebar-width, 240px) 1fr 320px;
}

.minimal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.minimal-table thead th {
  background: #f8f9fa;
  color: #888;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 20px;
  text-align: left;
}

.minimal-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
}

.minimal-table tbody td {
  padding: 24px 20px;
  vertical-align: middle;
}

.minimal-table .class-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #000;
}

.minimal-table .actions {
  text-align: right;
}

.minimal-table .action-link {
  color: #ccc;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  margin-left: 20px;
}

.minimal-table .action-link:hover {
  color: var(--dark);
}

.app-container.sidebar-collapsed {
  --sidebar-width: 80px;
}

/* 1. Left Sidebar */
.sidebar {
  background-color: #ffffff;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid #f0f0f0;
  overflow-x: hidden;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 10px;
  text-decoration: none;
  color: #888888;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
  position: relative;
  white-space: nowrap;
}

.sidebar-collapsed .nav-label,
.sidebar-collapsed .logo-label {
  display: none;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 12px 0;
}

.sidebar-collapsed .logo-text {
  justify-content: center;
}

.nav-item:hover {
  color: #333333;
}

.nav-item.active {
  background-color: transparent;
  color: var(--dark);
  box-shadow: none;
}

.nav-item.active::before {
  content: "→";
  position: absolute;
  left: -25px;
  color: var(--accent);
  font-weight: 800;
}

/* 2. Main Content (Center) */
.main-content {
  padding: 1.5rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

.search-bar {
  background: var(--white);
  border-radius: 16px;
  padding: 12px 20px;
  width: 100%;
  max-width: 400px;
  border: none;
  margin-bottom: 2rem;
  font-family: inherit;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Course Cards */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 3rem;
}

.course-card {
  background-color: var(--dark);
  color: var(--white);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
  text-decoration: none;
}

.course-card:hover {
  transform: translateY(-5px);
}

/* Decorative shapes for cards */
.course-card::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  z-index: 0;
}

.course-card.variant-1::after {
  border: 2px solid var(--lime);
}
.course-card.variant-2::after {
  background: var(--purple);
  opacity: 0.2;
}
.course-card.variant-3::after {
  border: 2px solid var(--white);
  opacity: 0.3;
}

/* Compact Card Variant (List-like) */
.course-card.compact {
  min-height: 100px;
  padding: 1rem;
  flex-direction: row;
  align-items: center;
  gap: 15px;
}

.course-card.compact .course-content {
  flex: 1;
}

.course-card.compact .course-title {
  font-size: 1rem;
  margin-bottom: 0;
}

.course-card.compact .course-tag {
  font-size: 0.7rem;
  margin-bottom: 2px;
}

.course-card.compact .progress-container {
  width: 50px;
  margin-top: 0 !important; /* Override auto margin */
}

.course-card.compact::after {
  width: 40px;
  height: 40px;
  top: -10px;
  right: -10px;
}

.course-content {
  position: relative;
  z-index: 1;
}

.course-tag {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
  display: block;
}

.course-title {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}

/* 3. Right Sidebar (Widgets) */
.right-sidebar {
  background-color: var(--white);
  margin: 1rem;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border: 1px solid #f0f0f0;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.avatar {
  width: 40px;
  height: 40px;
  background-color: var(--purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--dark);
}

/* Calendar Widget */
.calendar-widget {
  background: transparent;
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-weight: 600;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  text-align: center;
  font-size: 0.8rem;
}
.cal-day {
  padding: 8px 0;
  border-radius: 8px;
  color: var(--text-muted);
}
.cal-day.active {
  background-color: var(--lime);
  color: var(--dark);
  font-weight: 700;
}

/* Charts Area Overrides */
.chart-container {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  height: 300px; /* Enforce height */
}

/* Filter Override */
/* Filter Override */
.filter-dropdown {
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid #eee;
  background: var(--white);
  font-family: inherit;
  font-size: 0.9rem;
  width: auto;
  min-width: 150px;
  cursor: pointer;
}

/* Forms (Create, etc) */
.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--white);
  border-radius: 20px;
}
input,
textarea,
select {
  background: #f9f9f9;
  border: none;
  padding: 15px;
  border-radius: 12px;
  width: 100%;
  margin-bottom: 15px;
}
button {
  background: var(--dark);
  color: var(--white);
  border-radius: 12px;
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 500px;
  border-radius: var(--card-radius);
  animation: slideDown 0.3s;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
