:root {
  --teal: #1D9E75;
  --teal-light: #E1F5EE;
  --teal-dark: #0F6E56;
  --amber: #BA7517;
  --amber-light: #FAEEDA;
  --green: #639922;
  --green-light: #EAF3DE;
  --blue: #378ADD;
  --blue-light: #E6F1FB;
  --coral: #D85A30;
  --coral-light: #FAECE7;
  --purple: #7F77DD;
  --purple-light: #EEEDFE;
  --bg: #F1EFE8;
  --border: #D3D1C7;
  --text: #2C2C2A;
  --muted: #888780;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

/* Layout */
.app-wrap { display: flex; min-height: 100vh; }
.app-sidebar {
  width: 220px;
  background: #fff;
  border-right: 0.5px solid var(--border);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.app-main { flex: 1; padding: 24px; overflow-y: auto; }

/* Sidebar */
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px 20px;
  border-bottom: 0.5px solid var(--bg);
}
.brand-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--teal);
  display: flex; align-items: center; justify-content: center;
}
.brand-icon span {
  width: 14px; height: 14px;
  border: 2px solid #fff; border-radius: 3px; display: block;
}
.brand-name { font-size: 14px; font-weight: 500; color: var(--text); }
.brand-sub { font-size: 10px; color: var(--muted); }

.sidebar-nav { padding: 12px; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 2px;
  transition: all 0.15s;
}
.nav-link:hover { background: var(--bg); color: var(--text); }
.nav-link.active {
  background: var(--teal-light);
  color: var(--teal-dark);
  font-weight: 500;
}
.nav-ico { font-size: 14px; }

.sidebar-user {
  padding: 12px 16px;
  border-top: 0.5px solid var(--bg);
  display: flex; align-items: center; gap: 8px;
}
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--amber-light); color: var(--amber);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500;
}
.user-name { font-size: 12px; font-weight: 500; }
.user-role { font-size: 10px; color: var(--muted); }

/* Headings */
.page-title { font-size: 20px; font-weight: 500; margin: 0 0 4px; color: var(--text); }
.page-sub { font-size: 13px; color: var(--muted); margin: 0 0 20px; }

/* Cards */
.card-soft {
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.card-title { font-size: 13px; font-weight: 500; margin-bottom: 12px; }

/* Stat cards */
.stat-card {
  border-radius: 12px;
  padding: 14px 16px;
  flex: 1;
  min-width: 140px;
  background: var(--bg);
}
.stat-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.stat-value { font-size: 26px; font-weight: 500; color: var(--text); }
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.stat-teal   { background: var(--teal-light); }
.stat-teal   .stat-value { color: var(--teal-dark); }
.stat-amber  { background: var(--amber-light); }
.stat-amber  .stat-value { color: var(--amber); }
.stat-purple { background: var(--purple-light); }
.stat-purple .stat-value { color: var(--purple); }
.stat-green  { background: var(--green-light); }
.stat-green  .stat-value { color: var(--green); }

/* Badges */
.badge-soft {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-teal   { background: var(--teal-light);   color: var(--teal-dark); }
.badge-amber  { background: var(--amber-light);  color: var(--amber); }
.badge-purple { background: var(--purple-light); color: var(--purple); }
.badge-blue   { background: var(--blue-light);   color: var(--blue); }
.badge-coral  { background: var(--coral-light);  color: var(--coral); }
.badge-white-teal { background: #fff; color: var(--teal); }
.badge-white-purple { background: #fff; color: var(--purple); }
.badge-white-amber { background: #fff; color: var(--amber); }

/* Progress */
.prog-wrap {
  background: var(--bg);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
  width: 100%;
}
.prog-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}
.bg-teal   { background: var(--teal)   !important; }
.bg-amber  { background: var(--amber)  !important; }
.bg-purple { background: var(--purple) !important; }
.bg-coral  { background: var(--coral)  !important; }
.bg-blue   { background: var(--blue)   !important; }

.text-teal   { color: var(--teal)   !important; }
.text-amber  { color: var(--amber)  !important; }
.text-purple { color: var(--purple) !important; }
.text-coral  { color: var(--coral)  !important; }
.text-muted  { color: var(--muted)  !important; }
.text-muted-soft { color: var(--muted) !important; }
.badge-muted { background: var(--bg); color: var(--muted); }

/* Avatar circle */
.avatar {
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--teal-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 500;
  flex-shrink: 0;
}
.avatar.size-sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.size-md { width: 40px; height: 40px; font-size: 14px; }
.avatar.size-lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.size-xl { width: 56px; height: 56px; font-size: 18px; }

.avatar.c-teal   { background: var(--teal);   color: #fff; }
.avatar.c-amber  { background: var(--amber);  color: #fff; }
.avatar.c-purple { background: var(--purple); color: #fff; }
.avatar.c-green  { background: var(--green);  color: #fff; }

/* Score circle */
.score-circle { display: inline-block; }
.score-circle text { font-size: 11px; font-weight: 500; }

/* Table-like lists */
.data-head {
  display: grid;
  padding: 10px 16px;
  background: var(--bg);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  gap: 8px;
}
.data-row {
  display: grid;
  padding: 12px 16px;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  border-top: 0.5px solid var(--bg);
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}
.data-row:first-child { border-top: none; }
.data-row:hover { background: var(--bg); color: inherit; }

.cols-6 { grid-template-columns: 2fr 1fr 1fr 1fr 1fr 60px; }
.cols-7 { grid-template-columns: 2fr 1fr 1fr 1fr 1fr 60px 80px; }

.row-act {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 0.5px solid var(--border);
  background: #fff;
  color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.15s;
}
.row-act:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-light); }
.row-act-del:hover { border-color: var(--coral); color: var(--coral); background: var(--coral-light); }

/* Buttons */
.btn-teal {
  background: var(--teal); color: #fff; border: none;
  padding: 8px 16px; font-size: 13px; font-weight: 500;
  border-radius: 8px; cursor: pointer;
}
.btn-teal:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--muted);
  border: 0.5px solid var(--border);
  padding: 8px 16px; font-size: 13px;
  border-radius: 8px; cursor: pointer;
}
.btn-chip {
  font-size: 12px; padding: 7px 12px; border-radius: 8px;
  background: transparent; color: var(--muted);
  border: 0.5px solid var(--border); cursor: pointer;
}
.btn-chip.active {
  background: var(--teal); color: #fff; border-color: var(--teal);
}
.btn-back {
  background: none; border: none;
  color: var(--teal); cursor: pointer;
  font-size: 13px; padding: 0; margin-bottom: 16px;
  text-decoration: none;
}
.btn-back:hover { color: var(--teal-dark); }

/* Form inputs */
.inp {
  width: 100%;
  font-size: 13px;
  padding: 8px 10px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: #fff;
}
.inp:focus { border-color: var(--teal); }
.inp-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }

/* Activity card */
.activity-row {
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
}
.activity-ico {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.activity-ico .dot { width: 18px; height: 18px; border-radius: 50%; }
.bg-teal-light   { background: var(--teal-light); }
.bg-amber-light  { background: var(--amber-light); }
.bg-purple-light { background: var(--purple-light); }
.bg-blue-light   { background: var(--blue-light); }

/* Recent list */
.recent-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--bg);
}
.recent-row:last-child { border-bottom: none; }
.recent-name { font-size: 13px; font-weight: 500; }
.recent-meta { font-size: 11px; color: var(--muted); }

/* Top student card */
.top-card {
  background: var(--bg); border-radius: 10px; padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  transition: transform 0.1s, background 0.15s;
}
.top-card:hover { background: var(--teal-light); transform: translateY(-1px); }
.top-card .top-rank {
  width: 22px; height: 22px;
  background: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}
.top-card .name {
  font-size: 12px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.top-card .meta { font-size: 11px; color: var(--muted); }

/* ========= Dashboard: Hero greeting ========= */
.hero-greet {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: #fff;
  padding: 24px 28px;
  border-radius: 16px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 4px 14px rgba(29,158,117,0.22);
  position: relative;
  overflow: hidden;
}
.hero-greet::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-text { flex: 1; min-width: 260px; position: relative; z-index: 1; }
.hero-time {
  font-size: 11px;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 500;
}
.hero-title { font-size: 24px; font-weight: 600; margin: 6px 0 6px; color: #fff; }
.hero-sub { font-size: 13px; opacity: 0.9; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-btn {
  background: rgba(255,255,255,0.18);
  border: 0.5px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.hero-btn:hover {
  background: rgba(255,255,255,0.28);
  color: #fff;
  transform: translateY(-1px);
}
.hero-btn span { margin-right: 6px; font-weight: 700; }

/* ========= Dashboard: Smart alerts ========= */
.alert-stripe {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s, box-shadow 0.15s;
}
.alert-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  color: inherit;
}
.alert-pending {
  background: linear-gradient(135deg, var(--amber-light) 0%, #fff 100%);
  border-left: 3px solid var(--amber);
}
.alert-upcoming {
  background: linear-gradient(135deg, var(--blue-light) 0%, #fff 100%);
  border-left: 3px solid var(--blue);
}
.alert-ico { font-size: 22px; flex-shrink: 0; }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-size: 13px; font-weight: 600; color: var(--text); }
.alert-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.alert-arrow { font-size: 18px; color: var(--muted); font-weight: 700; }

/* ========= Dashboard: Class breakdown ========= */
.class-breakdown { display: flex; flex-direction: column; gap: 4px; }
.class-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 8px;
  margin-bottom: 4px;
  border-bottom: 0.5px dashed var(--border);
}
.dot-lgd {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dot-lgd i {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.class-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}
.class-row + .class-row { border-top: 0.5px solid var(--bg); }
.class-label {
  width: 110px;
  font-size: 13px;
  flex-shrink: 0;
}
.class-metrics {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.class-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}
.class-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.class-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.class-bar-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  width: 26px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .class-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .class-metrics { width: 100%; }
}

/* ========= Dashboard: Activity type rings ========= */
.type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.type-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 8px;
  background: var(--bg);
  border-radius: 10px;
  transition: transform 0.1s;
}
.type-tile:hover { transform: translateY(-1px); }
.type-ring {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color, var(--teal)) 0 var(--ring-pct, 0%), var(--border) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.type-ring-inner {
  width: 50px; height: 50px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--ring-color, var(--teal));
}
.type-name { font-size: 12px; font-weight: 500; }
.type-pct { font-size: 10px; color: var(--muted); }

/* ========= Dashboard: Upcoming activities ========= */
.upcoming-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  text-decoration: none;
  color: inherit;
  transition: padding 0.12s;
}
.upcoming-row:hover { padding-left: 4px; color: inherit; }
.upcoming-row + .upcoming-row { border-top: 0.5px solid var(--bg); }
.upcoming-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.upcoming-ico .dot { width: 14px; height: 14px; border-radius: 50%; }
.upcoming-meta { flex: 1; min-width: 0; }
.upcoming-name {
  font-size: 13px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.upcoming-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.countdown-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.countdown-pill.urgent {
  background: var(--coral-light);
  color: var(--coral);
  font-weight: 600;
}

/* ========= Login sahifa ========= */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--teal-light) 0%, var(--bg) 100%);
  padding: 20px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.login-wrap { width: 100%; max-width: 380px; }
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 22px;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: 0 10px 40px rgba(29, 158, 117, 0.12);
}
.login-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.login-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}
.login-footer {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 0.5px dashed var(--border);
}

/* Sidebar logout link + user box */
.sidebar-user-wrap {
  margin-top: auto;
}
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin: 4px 12px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--coral);
  font-size: 12px;
  font-weight: 500;
  transition: background 0.15s;
}
.sidebar-logout:hover { background: var(--coral-light); color: var(--coral); }

/* ========= Student profile ========= */
.st-hero {
  background: linear-gradient(135deg, #fff 0%, var(--teal-light) 180%);
  border: 0.5px solid var(--border);
  padding: 20px 22px;
  border-radius: 14px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.st-hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.st-hero-ava {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(29,158,117,0.25);
  flex-shrink: 0;
}
.st-hero-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.st-hero-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.st-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFF4D2, #FFD66B);
  color: #7A5A00;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.st-rank-badge.is-plain {
  background: var(--bg);
  color: var(--muted);
  box-shadow: none;
  font-weight: 500;
}
.st-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* 3 rings row */
.st-rings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.st-ring-card {
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 18px 12px;
  text-align: center;
  transition: transform 0.1s, box-shadow 0.15s;
}
.st-ring-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}
.st-ring {
  width: 96px; height: 96px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: conic-gradient(var(--rc, var(--teal)) 0 var(--rp, 0%), var(--bg) 0);
  display: flex;
  align-items: center;
  justify-content: center;
}
.st-ring-val {
  width: 76px; height: 76px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--rc, var(--teal));
  font-variant-numeric: tabular-nums;
}
.st-ring-lbl { font-size: 13px; font-weight: 500; color: var(--text); }
.st-ring-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Stats strip (4 boxes) */
.st-stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.st-stat {
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.st-stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.st-stat-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.st-stat-value .unit {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

/* Class comparison bars */
.cmp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.cmp-row + .cmp-row { border-top: 0.5px solid var(--bg); }
.cmp-lbl {
  width: 110px;
  font-size: 12px;
  flex-shrink: 0;
}
.cmp-track {
  flex: 1;
  height: 14px;
  background: var(--bg);
  border-radius: 7px;
  position: relative;
  overflow: visible;
}
.cmp-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 0.35s;
}
.cmp-avg {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  background: #333;
  border-radius: 2px;
  transform: translateX(-50%);
  pointer-events: none;
}
.cmp-val {
  width: 74px;
  text-align: right;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  align-items: baseline;
}
.cmp-diff {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.cmp-diff.up { background: var(--teal-light); color: var(--teal-dark); }
.cmp-diff.dn { background: var(--coral-light); color: var(--coral); }

/* Activity type mini cards */
.type-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.type-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border-radius: 10px;
}
.type-mini-ico {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.type-mini-ico .dot { width: 14px; height: 14px; border-radius: 50%; }
.type-mini-meta { flex: 1; min-width: 0; }
.type-mini-name { font-size: 12px; font-weight: 500; }
.type-mini-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* Score timeline (vertical bars) */
.score-timeline {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 10px 4px 0;
  min-height: 160px;
}
.tl-item {
  flex: 1;
  min-width: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.tl-bar-wrap {
  width: 100%;
  height: 120px;
  background: var(--bg);
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  overflow: hidden;
}
.tl-bar {
  width: 70%;
  min-height: 3px;
  border-radius: 4px;
  transition: height 0.35s;
}
.tl-val {
  position: absolute;
  top: 4px;
  left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  z-index: 1;
}
.tl-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.tl-date {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Student profile — activity row */
.st-act-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s, background 0.15s;
}
.st-act-row:hover {
  background: var(--teal-light);
  transform: translateX(2px);
  color: inherit;
}
.st-act-meta { flex: 1; min-width: 0; }
.st-act-name {
  font-size: 13px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.st-act-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ========= Dashboard: Attention needed ========= */
.attention-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  text-decoration: none;
  color: inherit;
  transition: padding 0.12s;
}
.attention-row:hover { padding-left: 4px; color: inherit; }
.attention-row + .attention-row { border-top: 0.5px solid var(--bg); }
.attention-meta { flex: 1; min-width: 0; }
.attention-name {
  font-size: 13px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.attention-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Alerts */
.alert-soft {
  background: var(--teal-light);
  color: var(--teal-dark);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* Reports table */
.reports-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.reports-table thead tr { background: var(--bg); }
.reports-table th {
  padding: 8px 12px; text-align: left;
  font-weight: 500; font-size: 11px; color: var(--muted);
}
.reports-table td { padding: 10px 12px; border-top: 0.5px solid var(--bg); }

/* Parent detail */
.parent-note {
  background: var(--teal-light);
  color: var(--teal-dark);
  border-radius: 10px;
  padding: 14px;
  line-height: 1.6;
}

/* Program editor rows */
.program-row {
  display: grid;
  grid-template-columns: 100px 1fr 120px 32px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
@media (max-width: 576px) {
  .program-row { grid-template-columns: 1fr 32px; grid-auto-rows: auto; }
}

/* Program view list */
.program-list { display: flex; flex-direction: column; gap: 6px; }
.program-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
  align-items: center;
}
.program-time {
  font-size: 12px;
  font-weight: 500;
  color: var(--teal-dark);
  background: var(--teal-light);
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
}

/* Materials list */
.mat-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: #444;
  line-height: 1.7;
}
.mat-list li { margin-bottom: 2px; }

/* Participants: summary bar */
.part-search-wrap {
  position: relative;
}
.part-search-wrap .inp { padding-left: 30px; width: 220px; }
.part-search-ico {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}
.part-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 20px;
  background: var(--teal-light);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 500;
}
.part-summary-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal);
}

.part-bulk-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 0.5px dashed var(--border);
}

/* Participant groups */
.part-group {
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 0.5px solid transparent;
  transition: border-color 0.15s;
}
.part-group-primary {
  background: linear-gradient(0deg, var(--bg), var(--teal-light) 250%);
  border-color: var(--teal);
}
.part-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.part-group-body {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Class chip */
.part-class-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #fff;
  border: 0.5px solid var(--border);
  font-size: 12px;
  font-weight: 500;
}
.part-class-chip.is-primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.primary-dot { font-size: 10px; color: #FFD66B; }

/* Participant chip (student) */
.part-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 4px;
  font-size: 12px;
  border: 0.5px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  background: #fff;
  user-select: none;
  transition: all 0.12s;
  position: relative;
}
.part-chip:hover { border-color: var(--teal); transform: translateY(-1px); }
.part-chip input { display: none; }
.part-chip.hidden { display: none; }

.part-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 500;
  flex-shrink: 0;
  transition: all 0.12s;
}
.part-name { line-height: 1.2; }
.part-score {
  font-size: 10px;
  font-weight: 500;
  margin-left: 2px;
  opacity: 0.7;
}

.part-chip.checked {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(29,158,117,0.25);
}
.part-chip.checked .part-avatar {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.part-chip.checked .part-score { color: #fff !important; opacity: 0.9; }
.part-chip.checked::after {
  content: "✓";
  position: absolute;
  top: -4px; right: -2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.btn-tiny { font-size: 11px; padding: 4px 10px; }

/* ========= Baholash sahifasi (grade table) ========= */
.grade-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.grade-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.grade-progress-bar {
  width: 160px;
  height: 6px;
  background: rgba(29,158,117,0.15);
  border-radius: 3px;
  overflow: hidden;
}
.grade-progress-bar > span {
  display: block;
  height: 100%;
  background: var(--teal);
  width: 0%;
  border-radius: 3px;
  transition: width 0.25s ease;
}

.grade-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.grade-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 10px 12px;
  border-bottom: 0.5px solid var(--border);
  background: var(--bg);
}
.grade-table tbody tr {
  transition: background 0.1s;
}
.grade-table tbody tr:hover { background: rgba(29,158,117,0.04); }
.grade-table tbody tr + tr td { border-top: 0.5px solid var(--border); }
.grade-table td { padding: 10px 12px; vertical-align: middle; }
.grade-table td.g-num { color: var(--muted); width: 36px; text-align: center; }
.grade-table td.g-st { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.grade-table td.g-cls { width: 70px; color: var(--muted); font-size: 12px; }
.grade-table td.g-avg { width: 80px; }
.grade-table td.g-inp { width: 150px; text-align: right; }

.grade-inp {
  width: 90px;
  padding: 8px 10px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: all 0.15s;
  -moz-appearance: textfield;
}
.grade-inp::-webkit-outer-spin-button,
.grade-inp::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.grade-inp:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.18);
}
.grade-inp.sc-high { color: var(--teal-dark); border-color: var(--teal); background: var(--teal-light); }
.grade-inp.sc-mid  { color: var(--amber); border-color: var(--amber); background: var(--amber-light); }
.grade-inp.sc-low  { color: var(--coral); border-color: var(--coral); background: var(--coral-light); }

.grade-save-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 0.5px solid var(--border);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 16px -16px -16px;
  border-radius: 0 0 16px 16px;
  z-index: 5;
}

/* ========= Ishtirokchilar sahifasi ========= */
.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
.student-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 0.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.1s;
}
.student-item:hover { border-color: var(--teal); transform: translateY(-1px); }
.student-item-meta { flex: 1; min-width: 0; }
.student-item-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.student-item-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Jadvalli biriktirish (sel-table, rasmdagi ko'rinish) */
.sel-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--border);
  background: var(--bg);
}
.sel-filter-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.sel-filter-chips .btn-chip.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.sel-table-wrap { overflow-x: auto; }
.sel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}
.sel-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 12px;
  border-bottom: 0.5px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 2;
}
.sel-table tbody tr { transition: background 0.1s; }
.sel-table tbody tr + tr td { border-top: 0.5px solid var(--border); }
.sel-table tbody tr.is-attached {
  background: var(--teal-light);
}
.sel-table tbody tr.is-attached:hover { background: #d0ede1; }
.sel-table tbody tr:hover { background: rgba(29,158,117,0.04); }
.sel-table td { padding: 10px 12px; vertical-align: middle; }
.sel-table td.sel-num { color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.sel-table td.sel-name { font-weight: 500; }
.sel-table tr.is-same-class td.sel-name::after {
  content: " \2605";
  color: var(--teal);
  font-size: 11px;
}

.sel-dropdown {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border: 0.5px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: all 0.12s;
}
.sel-dropdown:focus { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(29,158,117,0.2); }
.sel-row.is-attached .sel-dropdown {
  border-color: var(--teal);
  color: var(--teal-dark);
  font-weight: 500;
  background: #fff;
}

.sel-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
}
.sel-pill.done { background: var(--teal-light); color: var(--teal-dark); }
.sel-pill.plan { background: var(--amber-light); color: var(--amber); }

.sel-save-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 0.5px solid var(--border);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  z-index: 5;
}

/* Tadbirlar ro'yxati — o'quvchiga biriktirish */
.act-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.act-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all 0.12s;
}
.act-row:hover { border-color: var(--teal); background: rgba(29,158,117,0.03); }
.act-row input { display: none; }
.act-row.hidden { display: none; }
.act-row.checked {
  background: var(--teal-light);
  border-color: var(--teal);
}
.act-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.act-ico .dot { width: 16px; height: 16px; border-radius: 50%; }
.act-meta { flex: 1; min-width: 0; }
.act-name { font-size: 13px; font-weight: 500; }
.act-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.act-row.checked::after {
  content: "\2713";
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Activity picker cards for baholash.php list mode */
.grade-card {
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.15s, transform 0.1s;
  margin-bottom: 10px;
}
.grade-card:hover { border-color: var(--teal); transform: translateY(-1px); }
.grade-card-meta { flex: 1; min-width: 0; }
.grade-card-name { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.grade-card-sub { font-size: 12px; color: var(--muted); }
.grade-card-pill {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 500;
}
.grade-card-pill.pending { background: var(--coral-light); color: var(--coral); }
.grade-card-pill.partial { background: var(--amber-light); color: var(--amber); }
.grade-card-pill.done { background: var(--teal-light); color: var(--teal-dark); }

/* Video cards */
.video-card {
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
}
.video-card:hover { border-color: var(--teal); }

.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--bg);
  overflow: hidden;
  text-decoration: none;
}
.video-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.video-thumb:hover img { transform: scale(1.03); }

.video-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.video-play-circle {
  width: 56px; height: 56px; border-radius: 50%;
  color: #fff; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  padding-left: 4px;
}
.video-play-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.video-thumb:hover .video-play-overlay { opacity: 1; }
.play-btn {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; padding-left: 4px;
}
.video-duration {
  position: absolute;
  right: 8px; bottom: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.video-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; }
.video-title {
  font-size: 13px; font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.video-desc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}
.video-del {
  background: transparent; border: none;
  color: var(--muted); cursor: pointer;
  font-size: 12px; line-height: 1;
  padding: 2px 6px; border-radius: 4px;
  flex-shrink: 0;
}
.video-del:hover { background: var(--coral-light); color: var(--coral); }

/* Video player */
.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}
.video-player iframe,
.video-player video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .app-sidebar { width: 64px; }
  .app-sidebar .brand-name,
  .app-sidebar .brand-sub,
  .app-sidebar .nav-link span:not(.nav-ico),
  .app-sidebar .user-name,
  .app-sidebar .user-role { display: none; }
  .nav-link { justify-content: center; padding: 10px; }
  .sidebar-brand { justify-content: center; padding: 0 0 20px; }
  .sidebar-user { justify-content: center; padding: 12px 0; }
  .app-main { padding: 16px; }
  .cols-6 { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .cols-6 .hide-sm { display: none; }
  .cols-7 { grid-template-columns: 1.6fr 1fr 1fr 60px 70px; }
  .cols-7 .hide-sm { display: none; }
}
