/* Telegram Mini App — Stylesheet (VOID Style) */

:root {
  --bg-primary: #0b0b0e;
  --bg-secondary: #151518;
  --bg-tertiary: #1c1c21;
  --bg-card: #151518;
  --bg-card-hover: #1e1e24;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(158, 254, 0, 0.4);

  --text-primary: #ffffff;
  --text-secondary: #8e8e93;
  --text-muted: #636366;

  /* Неоновый акцент */
  --accent-neon: #9efe00;
  --accent-neon-hover: #b2ff00;
  --accent-neon-dark: #0a2002;
  --accent-neon-dim: rgba(158, 254, 0, 0.15);

  --status-green: #22c55e;
  --status-gray: #3a3a3c;
  --status-gray-text: #98989d;
  
  --dock-bg: rgba(26, 26, 30, 0.85);
  --dock-border: rgba(255, 255, 255, 0.1);
  --dock-active-bg: #ffffff;
  --dock-active-text: #000000;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;
  
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 16px);
}

/* Светлая тема */
body.theme-light {
  --bg-primary: #f2f2f7;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e5e5ea;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f4;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(120, 200, 0, 0.5);

  --text-primary: #000000;
  --text-secondary: #6e6e73;
  --text-muted: #8e8e93;

  --accent-neon: #8beb00;
  --accent-neon-hover: #7cd500;
  --accent-neon-dark: #071900;
  --accent-neon-dim: rgba(139, 235, 0, 0.2);

  --status-green: #16a34a;
  --status-gray: #e5e5ea;
  --status-gray-text: #636366;

  --dock-bg: rgba(255, 255, 255, 0.9);
  --dock-border: rgba(0, 0, 0, 0.1);
  --dock-active-bg: #000000;
  --dock-active-text: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.4;
  padding-bottom: calc(90px + var(--safe-area-bottom));
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Контейнер приложения */
.app-container {
  max-width: 540px;
  margin: 0 auto;
  padding: 12px 16px;
  position: relative;
}

/* ==========================================================================
   ВЕРХНЯЯ ПАНЕЛЬ (TOP BAR)
   ========================================================================== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0 12px;
  gap: 10px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.pill-btn:active {
  transform: scale(0.96);
}

.group-pill {
  background: var(--bg-secondary);
  font-weight: 700;
}

.group-pill .chevron-icon {
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.table-pill {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.table-pill .table-icon {
  color: var(--accent-neon);
}

/* ==========================================================================
   ВКЛАДКИ И ПЕРЕКЛЮЧЕНИЕ
   ========================================================================== */
.tab-content {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tab-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   ЭКРАН 1: РАСПИСАНИЕ (СЕГОДНЯ)
   ========================================================================== */
.day-header-section {
  margin-top: 4px;
  margin-bottom: 12px;
}

.day-large-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 8vw, 42px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.day-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  margin-top: 4px;
}

/* Горизонтальная лента недели */
.week-strip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
}

.week-strip::-webkit-scrollbar {
  display: none;
}

.day-chip {
  flex: 1;
  min-width: 48px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.day-chip .chip-dow {
  font-size: 12px;
  font-weight: 600;
  text-transform: lowercase;
  color: var(--text-secondary);
}

.day-chip .chip-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.day-chip.active {
  background: #ffffff;
  color: #000000;
}

.day-chip.active .chip-dow,
.day-chip.active .chip-num {
  color: #000000;
}

body.theme-light .day-chip.active {
  background: #000000;
}
body.theme-light .day-chip.active .chip-dow,
body.theme-light .day-chip.active .chip-num {
  color: #ffffff;
}

/* ==========================================================================
   HERO-КАРТОЧКА (АКТИВНАЯ / СЛЕДУЮЩАЯ ПАРА)
   ========================================================================== */
.hero-card {
  position: relative;
  border-radius: 28px;
  padding: 22px 20px 20px;
  margin-bottom: 24px;
  background: var(--accent-neon);
  color: var(--accent-neon-dark);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(158, 254, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-card.white-card {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 12px 36px rgba(255, 255, 255, 0.12);
}

.hero-card.dark-card {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.hero-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  opacity: 0.9;
}

.hero-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: pulse-dot 1.8s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-subject {
  font-family: var(--font-display);
  font-size: clamp(22px, 5.5vw, 28px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.hero-timer-box {
  margin: 14px 0 16px;
}

.hero-timer {
  font-family: var(--font-display);
  font-size: clamp(38px, 10vw, 50px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.hero-timer-desc {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.8;
  margin-top: 4px;
}

.hero-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 14px;
  margin-top: 8px;
}

.hero-room {
  font-weight: 800;
  font-size: 18px;
}

.hero-subinfo {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
  text-align: right;
}

/* Прогресс-бар пары */
.hero-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
  margin-top: 14px;
  overflow: hidden;
}

.hero-card.dark-card .hero-progress-track {
  background: rgba(255, 255, 255, 0.1);
}

.hero-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: #000000;
  width: 0%;
  transition: width 0.3s ease;
}

.hero-card.dark-card .hero-progress-bar {
  background: var(--accent-neon);
}

/* Карточка дня без пар */
.empty-day-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 32px 20px;
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.empty-day-card .empty-emoji {
  font-size: 38px;
  margin-bottom: 8px;
}

.empty-day-card h3 {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

/* ==========================================================================
   СПИСОК «ДАЛЕЕ» (UPCOMING LESSONS)
   ========================================================================== */
.section-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lesson-row {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 16px;
  border: 1px solid var(--border-color);
  gap: 14px;
  transition: background 0.15s ease;
}

.lesson-time-col {
  min-width: 62px;
  display: flex;
  flex-direction: column;
}

.time-start {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.time-start.active-neon {
  color: var(--accent-neon);
}

.time-end {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.lesson-content-col {
  flex: 1;
}

.lesson-subject-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 4px;
}

.lesson-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.campus-tag {
  color: #38bdf8;
  font-weight: 600;
}

.lesson-room-col {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  text-align: right;
  min-width: 44px;
}

/* ==========================================================================
   ЭКРАН 2: ПРЕПОДАВАТЕЛИ
   ========================================================================== */
.page-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 7vw, 36px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.teachers-live-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-bottom: 14px;
}

.highlight-val {
  color: var(--text-primary);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  margin-bottom: 14px;
}

.search-icon {
  color: var(--text-secondary);
  margin-right: 10px;
}

.search-box input {
  flex: 1;
  height: 48px;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.clear-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  display: none;
}

/* Баннер избранного */
.banner-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-secondary);
  border: 1px solid rgba(158, 254, 0, 0.2);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 18px;
}

.banner-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-neon-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.banner-text h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.banner-text p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Список преподавателей */
.teachers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.teacher-row {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  gap: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.teacher-row:active {
  transform: scale(0.98);
}

.teacher-avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.teacher-info-col {
  flex: 1;
  overflow: hidden;
}

.teacher-name {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teacher-subject {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.status-badge.busy {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge.free {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   СУБ-ЭКРАН: ДЕТАЛИ ПРЕПОДАВАТЕЛЯ
   ========================================================================== */
.sub-screen {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  min-height: 100vh;
  background: var(--bg-primary);
  padding: 12px 16px calc(90px + var(--safe-area-bottom));
  z-index: 20;
}

.sub-screen.active {
  display: block;
}

.sub-screen-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.nav-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.fav-pill {
  background: var(--bg-secondary);
}

.teacher-big-surname {
  font-family: var(--font-display);
  font-size: clamp(32px, 8vw, 44px);
  font-weight: 900;
  line-height: 1.05;
}

.teacher-sub-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

.teacher-sub-subject {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ==========================================================================
   ЭКРАН 3: ПРОФИЛЬ
   ========================================================================== */
.profile-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.user-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.icon-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profile-hero-card {
  border-radius: 28px;
  padding: 22px 20px;
  margin-bottom: 14px;
  background: var(--accent-neon);
  color: var(--accent-neon-dark);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.profile-hero-card:active {
  transform: scale(0.98);
}

.profile-hero-card .hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.arrow-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-group-name {
  font-family: var(--font-display);
  font-size: clamp(28px, 7.5vw, 36px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.profile-college-name {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.85;
  margin-top: 4px;
}

/* Карточка Excel */
.action-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.action-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.excel-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-card-left h3 {
  font-size: 15px;
  font-weight: 700;
}

.action-card-left p {
  font-size: 12px;
  color: var(--text-secondary);
}

.mini-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Карусель групп друзей */
.friend-groups-section {
  margin-bottom: 24px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.carousel-nav-arrows {
  display: flex;
  gap: 6px;
}

.nav-arrow-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.friend-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 6px;
}

.friend-carousel::-webkit-scrollbar {
  display: none;
}

.friend-card {
  min-width: 170px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.friend-card:active {
  transform: scale(0.97);
}

.friend-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-neon);
  margin-bottom: 6px;
}

.friend-group-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.friend-college-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.add-friend-card {
  min-width: 140px;
  border: 2px dashed rgba(158, 254, 0, 0.4);
  background: rgba(158, 254, 0, 0.04);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--accent-neon);
  font-weight: 700;
  font-size: 14px;
}

.add-circle-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-neon);
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}

/* Блок настроек */
.settings-section {
  margin-bottom: 24px;
}

.settings-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  padding: 6px 16px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.setting-row:last-child {
  border-bottom: none;
}

/* Тумблер (Switch) */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 30px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 34px;
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: .3s;
}

input:checked + .slider {
  background-color: var(--accent-neon);
  border-color: var(--accent-neon);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: #000000;
}

/* Переключатель темы */
.theme-switch-pill {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.theme-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn.active {
  background: #ffffff;
  color: #000000;
}

/* Режим преподавателя */
.teacher-mode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.teacher-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(96, 165, 250, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.teacher-mode-text {
  flex: 1;
}

.teacher-mode-text h3 {
  font-size: 15px;
  font-weight: 700;
}

.teacher-mode-text p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================================================
   МОДАЛЬНОЕ ОКНО (BOTTOM SHEET)
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 100;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-bottom-sheet {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  background: var(--bg-primary);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--border-color);
  padding: 12px 18px calc(24px + var(--safe-area-bottom));
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-bottom-sheet {
  transform: translateY(0);
}

.modal-drag-handle {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: var(--text-muted);
  opacity: 0.5;
  margin: 0 auto 12px;
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Переключатель Себе / Другу */
.target-switch-pill {
  display: flex;
  background: var(--bg-secondary);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
}

.target-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.target-btn.active {
  background: #ffffff;
  color: #000000;
}

/* Карусель колледжей в модалке */
.college-select-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.active-college-tag {
  color: var(--accent-neon);
}

.colleges-scroll-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 12px;
}

.colleges-scroll-row::-webkit-scrollbar {
  display: none;
}

.college-card-item {
  min-width: 140px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.college-card-item.selected {
  border-color: var(--accent-neon);
  box-shadow: 0 0 0 1px var(--accent-neon);
}

.college-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
  color: #ffffff;
}

.college-card-name {
  font-size: 14px;
  font-weight: 800;
  margin-top: 4px;
}

.college-card-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

.selected-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-neon);
  color: #000000;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Сетка групп по курсам */
.modal-groups-container {
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
  margin-bottom: 16px;
}

.course-group-block {
  margin-bottom: 16px;
}

.course-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: 8px;
}

.group-chip-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.group-chip-btn:active {
  transform: scale(0.96);
}

.group-chip-btn.selected {
  background: var(--accent-neon);
  color: var(--accent-neon-dark);
  border-color: var(--accent-neon);
}

.submit-action-btn {
  width: 100%;
  padding: 16px;
  border-radius: 999px;
  background: var(--accent-neon);
  color: var(--accent-neon-dark);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-action-btn.disabled {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ==========================================================================
   СПЛЭШ-ЭКРАНЫ И ОВЕРЛЕИ (АНИМАЦИИ ИЗ ВИДЕО)
   ========================================================================== */
.splash-screen {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #080718;
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-align: center;
  padding: 24px;
}

.splash-screen.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.splash-icon-box {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.splash-content h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
}

.splash-content p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
}

/* Радар студента */
.radar-screen {
  background: #061102;
}

.radar-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid rgba(158, 254, 0, 0.3);
  position: relative;
  margin-bottom: 24px;
}

.radar-circle::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px dashed rgba(158, 254, 0, 0.5);
}

.radar-sweep {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border-top: 3px solid var(--accent-neon);
  animation: spin 1.2s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Оверлей открытия таблицы */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 150;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.loading-overlay.active {
  display: flex;
}

.spinner-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(158, 254, 0, 0.2);
  border-top-color: var(--accent-neon);
  animation: spin 0.8s linear infinite;
}

.opening-text {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

/* Тост */
.toast-box {
  position: fixed;
  bottom: calc(90px + var(--safe-area-bottom));
  left: 20px;
  background: #18181c;
  color: #ffffff;
  border: 1px solid rgba(158, 254, 0, 0.4);
  border-radius: 999px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transform: translateY(40px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 120;
  pointer-events: none;
}

.toast-box.active {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  color: var(--accent-neon);
  font-weight: 900;
}

/* ==========================================================================
   НИЖНИЙ ДОК (DOCK / TAB BAR)
   ========================================================================== */
.bottom-dock {
  position: fixed;
  bottom: calc(14px + var(--safe-area-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  background: var(--dock-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--dock-border);
  border-radius: 999px;
  padding: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  z-index: 90;
}

.dock-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-btn.active {
  background: var(--dock-active-bg);
  color: var(--dock-active-text);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.dock-btn:active {
  transform: scale(0.96);
}

/* Модальные окна кнопок действий */
.modal-actions-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.modal-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.primary-btn {
  flex: 1;
  padding: 14px;
  border-radius: 999px;
  background: var(--accent-neon);
  color: var(--accent-neon-dark);
  font-weight: 800;
  border: none;
  cursor: pointer;
}

.danger-btn {
  width: 100%;
  padding: 14px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-weight: 800;
  border: none;
  cursor: pointer;
}

.cancel-btn {
  width: 100%;
  padding: 14px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.center-text {
  text-align: center;
}
