/* Alohida sahifalarga tegishli uslublar. */
.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.nav a {
  position: relative;
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 14px;
  font-weight: 500;
}

/* ---- Bosh sahifa ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 18px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.stat:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-arrow {
  position: absolute;
  top: 20px;
  right: 16px;
  color: var(--faint);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s;
}

.stat:hover .stat-arrow {
  opacity: 1;
  transform: none;
}

.stat.tone-blue .stat-icon {
  background: var(--blue-soft);
  color: var(--blue);
}

.stat.tone-amber .stat-icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.stat.tone-red .stat-icon {
  background: var(--red-soft);
  color: var(--red);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.stat-value {
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.stat-label {
  color: var(--muted);
  font-size: 13.5px;
}

.lesson-time {
  display: grid;
  width: 56px;
  flex: none;
  line-height: 1.25;
}

.lesson-time strong {
  font-size: 16px;
  font-weight: 650;
}

.lesson-time span {
  color: var(--muted);
  font-size: 12px;
}

/* ---- O'quvchilar ---- */
.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.student-grid > .empty {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.student-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.student-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.student-card.inactive {
  opacity: 0.6;
}

.student-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-card-tags,
.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.student-card-balance {
  display: grid;
  gap: 6px;
}

.student-card .avatar {
  width: 44px;
  height: 44px;
  font-size: 15px;
}

.student-card-next {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.cred-box {
  display: grid;
  gap: 2px;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.cred {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
}

.cred + .cred {
  border-top: 1px solid var(--line);
}

.cred strong {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-align: right;
}

.profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px;
  flex-wrap: wrap;
  overflow: hidden;
  border: 0;
  background: #062a21;
  box-shadow: 0 18px 40px -18px rgba(6, 42, 33, 0.55);
  color: #eafff6;
}

.profile::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(45% 130% at 100% 0%, rgba(52, 211, 153, 0.34), transparent 70%),
    radial-gradient(35% 90% at 0% 100%, rgba(250, 204, 21, 0.1), transparent 70%);
  pointer-events: none;
}

.profile > * {
  position: relative;
}

.profile .avatar {
  box-shadow: 0 0 0 4px rgba(234, 255, 246, 0.14);
}

.profile .badge {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

.profile .muted {
  color: rgba(234, 255, 246, 0.74);
}

.profile-notes {
  margin-top: 10px;
  font-size: 14px;
}

.profile-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-stats div {
  display: grid;
  min-width: 104px;
  padding: 12px 14px;
  border: 1px solid rgba(234, 255, 246, 0.12);
  border-radius: 14px;
  background: rgba(234, 255, 246, 0.07);
}

.profile-stats strong {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.profile-stats span {
  color: rgba(234, 255, 246, 0.66);
  font-size: 12.5px;
}

.danger-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  flex-wrap: wrap;
}

/* ---- Materiallar ---- */
.material-row {
  padding: 4px;
}

.material-open {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.material-open:hover {
  background: var(--surface-2);
}

.material-open .row-main,
.material-open .row-title,
.material-open .row-meta {
  display: block;
}

.reading {
  font-size: 15.5px;
  line-height: 1.65;
}

@media (max-width: 860px) {
  .profile {
    padding: 20px;
  }

  .profile-stats {
    width: 100%;
  }

  .profile-stats div {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
  }
}
