/* ==========================================================================
   Darb (درب) - Teacher Dashboard Stylesheet (Compact, Dense, Product-grade)
   ========================================================================== */

.dash-layout {
  display: flex;
  min-height: 100vh;
  background: var(--app-bg);
}

.dash-sidebar {
  width: 260px;
  background: var(--primary);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width var(--tr-base);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
}

.dash-sidebar-brand {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dash-sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #C6C4DA;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all var(--tr-fast);
}

.dash-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.dash-nav-item.active {
  background: var(--butter);
  color: var(--ink);
  font-weight: 700;
}

.dash-nav-item i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.dash-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash-topbar {
  height: 64px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.dash-content {
  padding: 28px;
  flex: 1;
}

.dash-module {
  display: none;
}

.dash-module.active {
  display: block;
}

/* Dashboard Cards & Grid */
.dash-grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.dash-kpi-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.dash-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-kpi-info h4 {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.dash-kpi-info span {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  font-family: var(--font-heading);
}

/* Data Tables */
.dash-table-wrap {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.dash-table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.92rem;
}

.dash-table th {
  background: var(--bg-soft);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}

.dash-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  vertical-align: middle;
}

.dash-table tr:hover td {
  background: var(--surface-hover);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}
.badge-ok { background: var(--ok-light); color: var(--ok); }
.badge-warn { background: var(--warn-light); color: var(--warn); }
.badge-error { background: var(--error-light); color: var(--error); }
.badge-info { background: var(--info-light); color: var(--info); }

/* Bottom Mobile Nav */
.dash-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #FFFFFF;
  border-top: 1px solid var(--line);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
}

.dash-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--muted);
}

.dash-bottom-item.active {
  color: var(--primary);
  font-weight: 700;
}

@media (max-width: 1024px) {
  .dash-sidebar {
    display: none;
  }
  .dash-bottom-nav {
    display: flex;
  }
  .dash-content {
    padding: 16px;
    padding-bottom: 80px;
  }
}
