/* ============================
   Teacher Layout
   ============================ */

.teacher-body {
  display: flex;
  min-height: 100vh;
  background: #f7f3ef;
  margin: 0;
}

/* ============================
   Sidebar
   ============================ */

.sidebar {
  width: 260px;
  min-height: 100vh;
  background: linear-gradient(180deg, #5c2d10 0%, #4a2008 100%);
  border-right: 1px solid rgba(212, 146, 42, 0.2);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  overflow: hidden;
}

/* --- Logo --- */
.sidebar__logo {
  height: 81px;
  display: flex;
  align-items: center;
  padding-left: 20px;
  border-bottom: 1px solid rgba(212, 146, 42, 0.15);
  flex-shrink: 0;
}

.sidebar__logo-img {
  height: 48px;
  width: auto;
}

/* --- Nav --- */
.sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px 0;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 41px;
  padding: 0 16px;
  border-radius: 10px;
  text-decoration: none;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 21px;
  color: #a78d7c;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar__link:hover {
  background: rgba(212, 146, 42, 0.12);
  color: #d4922a;
}

.sidebar__link--active {
  background: rgba(212, 146, 42, 0.25);
  color: #fff;
}

.sidebar__link-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar__link-chevron {
  margin-left: auto;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: none;
}

.sidebar__link--active .sidebar__link-chevron {
  display: block;
}

/* --- User section --- */
.sidebar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 21px;
  border-top: 1px solid rgba(212, 146, 42, 0.15);
  flex-shrink: 0;
}

.sidebar__avatar {
  width: 36px;
  height: 36px;
  border-radius: 20px;
  background: linear-gradient(135deg, #e07b20 0%, #d4922a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar__avatar span {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  font-size: 14px;
  line-height: 12px;
  color: #fff;
}

.sidebar__user-info {
  flex: 1;
  min-width: 0;
}

.sidebar__user-name {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 21px;
  color: #f5f0e8;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__user-meta {
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  font-size: 11px;
  line-height: 16.5px;
  color: rgba(245, 240, 232, 0.5);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__user-chevron {
  flex-shrink: 0;
  cursor: pointer;
}

/* --- Version --- */
.sidebar__version {
  text-align: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  font-size: 10px;
  line-height: 15px;
  letter-spacing: 0.5px;
  color: rgba(245, 240, 232, 0.2);
  padding: 6px 0 16px;
  flex-shrink: 0;
}

/* ============================
   Main Content
   ============================ */

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 35px 40px 60px;
  min-height: 100vh;
}

/* ============================
   Page Entrance Animations
   ============================ */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.main-content > * {
  animation: fadeInUp 0.45s ease-out both;
}

.main-content > * > *:nth-child(1) { animation: fadeInUp 0.4s ease-out 0.00s both; }
.main-content > * > *:nth-child(2) { animation: fadeInUp 0.4s ease-out 0.06s both; }
.main-content > * > *:nth-child(3) { animation: fadeInUp 0.4s ease-out 0.12s both; }
.main-content > * > *:nth-child(4) { animation: fadeInUp 0.4s ease-out 0.18s both; }
.main-content > * > *:nth-child(5) { animation: fadeInUp 0.4s ease-out 0.24s both; }
.main-content > * > *:nth-child(6) { animation: fadeInUp 0.4s ease-out 0.30s both; }
.main-content > * > *:nth-child(7) { animation: fadeInUp 0.4s ease-out 0.36s both; }
.main-content > * > *:nth-child(8) { animation: fadeInUp 0.4s ease-out 0.42s both; }

@media (prefers-reduced-motion: reduce) {
  .main-content > *,
  .main-content > * > * {
    animation: none !important;
  }
}

/* ============================
   Sidebar Toggle (hidden on desktop)
   ============================ */

.sidebar-toggle {
  display: none;
}

.sidebar-overlay {
  display: none;
}

/* ============================
   Mobile Responsive
   ============================ */

@media (max-width: 768px) {
  /* --- Hamburger button --- */
  .sidebar-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 200;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: #fff;
    border: 1px solid #ebdac4;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: background 0.2s ease;
  }

  .sidebar-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #5c2d10;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .sidebar-toggle--active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .sidebar-toggle--active span:nth-child(2) {
    opacity: 0;
  }

  .sidebar-toggle--active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* --- Overlay --- */
  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .sidebar-overlay--visible {
    opacity: 1;
    visibility: visible;
  }

  /* --- Sidebar slide --- */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar--open {
    transform: translateX(0);
  }

  /* --- Main content full width --- */
  .main-content {
    margin-left: 0;
    padding: 70px 16px 40px;
    width: 100%;
  }
}
