/* =====================================================
   Faculty left sidebar nav & course tree layout
   ===================================================== */
body.course-shell, body.faculty-shell {
  background: #f4f7fb !important;
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
}
body.course-shell .sidenav, body.course-shell #sidenav-main,
body.faculty-shell .sidenav, body.faculty-shell #sidenav-main {
  display: none !important;
}
body.course-shell .main-content, body.faculty-shell .main-content {
  margin-left: 0 !important;
  padding-top: 0 !important;
  width: 100% !important;
  flex: 1 !important;
}
.faculty-shell {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}
.faculty-sidebar {
  width: 280px;
  min-width: 280px;
  height: 100vh;
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: #e2e8f0;
  border-right: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  flex-direction: column;
  box-shadow: 16px 0 40px rgba(15, 23, 42, 0.08);
  overflow-y: auto;
}
.faculty-sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.faculty-sidebar-header img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.faculty-sidebar-header span {
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #f8fafc;
}
.faculty-sidebar-body {
  padding: 14px 12px 18px;
  overflow-y: auto;
}
.faculty-user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 12px;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
  margin-bottom: 14px;
}
.faculty-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e11d8f, #2563eb);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}
.faculty-user-name {
  font-size: .78rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}
.faculty-user-role {
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #94a3b8;
}
.faculty-section-label {
  margin: 14px 10px 8px;
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 800;
}
.faculty-course-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faculty-nav-status {
  padding: 10px 12px;
  color: #94a3b8;
  font-size: .72rem;
  line-height: 1.45;
}
.faculty-course-item {
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.26);
  border-radius: 12px;
  overflow: hidden;
  transition: all .2s ease;
}
.faculty-course-item.active {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(96, 165, 250, 0.42);
}
.faculty-course-item.active > .faculty-course-main {
  background: rgba(96, 165, 250, 0.12);
}
.faculty-course-main {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  color: #e2e8f0;
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.faculty-course-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e11d8f, #2563eb);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.06);
  flex: 0 0 auto;
}
.faculty-course-title {
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.3;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.faculty-course-submenu {
  display: none;
  padding: 0 10px 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.16);
}
.faculty-course-item.active .faculty-course-submenu {
  display: block;
}
.faculty-subnav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  margin-top: 8px;
  border-radius: 10px;
  color: #dfe8f5;
  background: rgba(255,255,255,0.02);
  text-decoration: none;
  font-size: .73rem;
  font-weight: 600;
  transition: background .2s ease, color .2s ease;
}
.faculty-subnav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.faculty-subnav-link.is-current {
  background: rgba(96, 165, 250, 0.18);
  color: #ffffff;
  border: 1px solid rgba(147, 197, 253, 0.4);
}
.faculty-subnav-link.is-current i {
  color: #dbeafe;
}
.faculty-subnav-link i {
  font-size: 17px;
  color: #93c5fd;
}
.faculty-logout {
  margin-top: auto;
  padding: 12px 12px 18px;
}
.faculty-add-course-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 1px dashed rgba(147, 197, 253, 0.3);
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: .76rem;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}
.faculty-add-course-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  color: #fff;
  border-style: solid;
}
.faculty-add-course-btn i {
  font-size: 16px;
}
.faculty-logout button {
  width: 100%;
  border: 1px solid rgba(248, 113, 113, 0.25);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
}
.faculty-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 22px 26px 32px;
}
.faculty-main-card {
  max-width: 1250px;
  margin: 0 auto;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
  min-height: calc(100vh - 48px);
  overflow: hidden;
}
.faculty-main-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid #edf2f7;
  background: rgba(248, 250, 252, 0.9);
}
.faculty-main-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}
.faculty-main-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: #2563eb;
  border: 1px solid #c7d2fe;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
}
.faculty-content-inner {
  padding: 24px 22px 32px;
}
.faculty-empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: #f8fafc;
  color: #475569;
  text-align: center;
  padding: 24px;
}
.faculty-empty-state h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 1.2rem;
}
.faculty-empty-state p {
  margin: 0;
  max-width: 440px;
  color: #64748b;
}

/* -----------------------------------------------
   Shared main content canvas (used by all faculty pages)
   ----------------------------------------------- */
.faculty-main-canvas {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 22px 26px 32px;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Ensure .container-fluid inside canvas doesn't overflow */
.faculty-main-canvas > .container-fluid,
.faculty-main-canvas > main > .container-fluid {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 980px) {
  .faculty-shell {
    flex-direction: column;
  }
  .faculty-sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    min-height: 0;
    position: static; /* not sticky when stacked */
    border-right: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    overflow-y: visible;
  }
  .faculty-main-canvas,
  .faculty-main {
    padding: 18px 14px 26px;
  }
}
/* --- Shared Studio Hero Banner --- */
.studio-hero {
  background: linear-gradient(135deg, #0b1220 0%, #2563eb 100%);
  border-radius: 30px;
  color: #fff;
  overflow: hidden;
  position: relative;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.18);
}
.studio-hero::after {
  content: "";
  position: absolute;
  inset: auto -100px -120px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.02) 55%, transparent 70%);
  pointer-events: none;
}
.studio-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Faculty brand colors follow the student dashboard palette. */
:root {
  --brand-primary: #2563eb;
  --brand-primary-hover: #1d4ed8;
  --brand-accent: #e11d8f;
  --brand-background: #f6f8fb;
  --brand-surface: #ffffff;
  --brand-border: #e2e8f0;
  --brand-text: #0f172a;
  --brand-muted: #64748b;
  --faculty-card-radius: 22px;
  --faculty-control-radius: 12px;
  --faculty-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

body.course-shell,
body.faculty-shell {
  background: var(--brand-background) !important;
  color: var(--brand-text);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
}

.faculty-main-canvas > .container-fluid,
body.faculty-shell > .main-content > .container-fluid {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
}

.faculty-sidebar {
  background: #0b1220;
  color: #ffffff;
}

.faculty-main-card,
.studio-card {
  background-color: var(--brand-surface);
  border-color: var(--brand-border);
  color: var(--brand-text);
  border-radius: var(--faculty-card-radius);
  box-shadow: var(--faculty-shadow);
}

.faculty-main-title,
.faculty-empty-state h3 {
  color: var(--brand-text);
}

.faculty-main-meta {
  background: #eff6ff;
  color: var(--brand-primary);
  border-color: #bfdbfe;
}

.studio-hero {
  background: linear-gradient(135deg, #0b1220 0%, var(--brand-primary) 100%);
  color: #ffffff;
  border-radius: 24px;
}

.faculty-main-canvas .btn-primary,
.faculty-main-canvas .bg-gradient-primary,
.faculty-main-canvas .btn.bg-gradient-primary,
.faculty-main-canvas .pagination .page-item.active .page-link {
  background-color: var(--brand-primary) !important;
  background-image: none !important;
  border-color: var(--brand-primary) !important;
  color: #ffffff !important;
}

.faculty-main-canvas .btn-primary:hover,
.faculty-main-canvas .bg-gradient-primary:hover {
  background-color: var(--brand-primary-hover) !important;
  border-color: var(--brand-primary-hover) !important;
}

.faculty-main-canvas .text-primary,
.faculty-main-canvas a:not(.btn) {
  color: var(--brand-primary);
}

.faculty-main-canvas .form-control,
.faculty-main-canvas .form-select,
.faculty-main-canvas .clean-input {
  color: var(--brand-text);
  border-color: var(--brand-border);
  border-radius: var(--faculty-control-radius);
}

.faculty-main-canvas .form-control:focus,
.faculty-main-canvas .form-select:focus,
.faculty-main-canvas .clean-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.16);
}

.faculty-main-canvas .btn,
body.faculty-shell > .main-content .btn {
  border-radius: 10px;
  font-weight: 700;
}

.faculty-main-canvas h1,
.faculty-main-canvas h2,
.faculty-main-canvas h3,
.faculty-main-canvas h4,
.faculty-main-canvas h5,
.faculty-main-canvas h6,
body.faculty-shell > .main-content h1,
body.faculty-shell > .main-content h2,
body.faculty-shell > .main-content h3,
body.faculty-shell > .main-content h4,
body.faculty-shell > .main-content h5,
body.faculty-shell > .main-content h6 {
  color: var(--brand-text);
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

@media (max-width: 767.98px) {
  .faculty-main-canvas {
    padding: 14px 10px 22px;
  }

  .studio-hero {
    border-radius: 18px;
  }
}
.metric-chip {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  height: 100%;
}
.metric-chip .metric-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}
.metric-chip .metric-label {
  color: #64748b;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-top: 0.4rem;
}
