:root {
  color-scheme: dark;
  --bg: #070a13;
  --bg-gradient: radial-gradient(circle at 20% 12%, rgba(0, 242, 254, 0.08) 0%, transparent 45%),
                 radial-gradient(circle at 85% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 40%),
                 radial-gradient(circle at 50% 85%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
                 #070a13;
  --panel: rgba(11, 18, 34, 0.48);
  --panel-2: rgba(15, 24, 44, 0.55);
  --panel-hover: rgba(22, 34, 60, 0.72);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #00f2fe;
  --accent-secondary: #10b981;
  --accent-hover: #38bdf8;
  --accent-glow: rgba(0, 242, 254, 0.35);
  --accent-ink: #04101e;
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --warning: #f59e0b;
  --info: #38bdf8;
  --cyber-cyan: #00f2fe;
  --cyber-emerald: #10b981;
  --cyber-amber: #f59e0b;
  --cyber-violet: #8b5cf6;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 35px -5px rgba(0, 0, 0, 0.5), 0 0 30px -10px var(--accent-glow);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-main: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Unbounded", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-script: "Marck Script", cursive, Georgia, serif;
  --font-mono: "JetBrains Mono", monospace;
  font-family: var(--font-main);
  line-height: 1.5;
}



* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  font-size: 0.94rem;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   ЧУВАШСКИЙ НАЦИОНАЛЬНЫЙ СОЛЯРНЫЙ ФОН (ДРЕВО ЖИЗНИ И ЭТНО-СЕТКА)
   ========================================================================== */
.chuvash-bg-ambient {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  user-select: none;
}

.chuvash-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: url("/static/chuvash-pattern.svg");
  background-size: 80px 80px;
  background-repeat: repeat;
  opacity: 0.22;
  mask-image: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0.45) 100%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0.45) 100%);
}

.chuvash-bg-watermark {
  position: absolute;
  top: 42%;
  left: 54%;
  transform: translate(-50%, -50%);
  width: min(1150px, 115vw);
  height: min(1150px, 115vh);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.36;
  filter: drop-shadow(0 0 45px rgba(0, 242, 254, 0.9)) drop-shadow(0 0 90px rgba(16, 185, 129, 0.6));
  transition: opacity 0.4s ease;
  animation: chuvash-tree-pulse 12s ease-in-out infinite alternate;
}

@keyframes chuvash-tree-pulse {
  0% {
    opacity: 0.30;
    transform: translate(-50%, -50%) scale(0.98);
  }
  50% {
    opacity: 0.48;
    transform: translate(-50%, -50%) scale(1.02);
  }
  100% {
    opacity: 0.30;
    transform: translate(-50%, -50%) scale(0.98);
  }
}

.chuvash-tree-watermark-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

@media (max-width: 860px) {
  .chuvash-bg-watermark {
    width: min(250px, 65vw) !important;
    height: min(250px, 65vw) !important;
    top: 20% !important;
    left: auto !important;
    right: -15px !important;
    transform: none !important;
    opacity: 0.12 !important;
    filter: drop-shadow(0 0 16px rgba(0, 242, 254, 0.35)) !important;
    pointer-events: none !important;
  }
  .chuvash-bg-pattern {
    background-size: 40px 40px !important;
    opacity: 0.06 !important;
  }
}

[data-theme="light"] .chuvash-bg-watermark {
  opacity: 0.20;
  filter: drop-shadow(0 0 30px rgba(162, 38, 11, 0.45));
}

button, textarea, input, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.hidden,
.view.hidden,
.nav-btn.hidden,
.sidebar-nav .nav-btn.hidden,
.sidebar-nav .nav-btn[hidden],
#view-start.hidden,
#view-plan.hidden,
#view-analytics.hidden,
#view-students.hidden,
#view-feed.hidden,
#view-chat.hidden,
#view-settings.hidden,
#view-admin.hidden {
  display: none !important;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.script-sub,
.script-accent {
  font-family: var(--font-script) !important;
  font-size: 1.12rem !important;
  color: #ff9500 !important;
  letter-spacing: 0.02em;
  font-weight: 400;
  font-style: normal;
}

.chat-model-info strong,
.prompts-panel-title,
.btn-chunrun-gradient,
.side-persona-btn strong,
.prompts-field-label,
.eyebrow {
  font-family: var(--font-display);
}

.sidebar-nav .nav-btn .nav-label {
  font-family: var(--font-display);
  font-size: 0.6rem !important;
  font-weight: 600;
  letter-spacing: 0.03em;
}
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

.muted { color: var(--text-muted); }
.small { font-size: 0.82rem; }
.error { color: var(--danger); font-size: 0.85rem; min-height: 1.2rem; margin-top: 0.4rem; }

.eyebrow {
  margin: 0 0 0.25rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

/* Кнопки */
button {
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
button:active { transform: scale(0.98); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.65rem 1.2rem;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 6px 16px var(--accent-glow);
}

.btn-secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line-strong);
  padding: 0.65rem 1.1rem;
}
.btn-secondary:hover:not(:disabled) {
  background: var(--panel-hover);
  border-color: var(--text-muted);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.65rem 1.1rem;
}
.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
}

.btn-link {
  background: transparent;
  color: var(--accent);
  padding: 0.5rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-link:hover { color: var(--accent-hover); }

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.icon-btn {
  background: var(--panel-2);
  color: var(--text-muted);
  border: 1px solid var(--line);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.icon-btn:hover {
  background: var(--panel-hover);
  border-color: var(--line-strong);
  color: var(--text);
  transform: translateY(-1px);
}
.icon-btn svg,
.icon-svg-wrap svg {
  width: 15px !important;
  height: 15px !important;
  stroke-width: 1.8;
  display: block;
}

/* Поля ввода */
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  text-align: left;
}
.field-group label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Экран входа и Главный Лендинг платформы CHUNRUN */
.gate {
  min-height: 100vh;
  display: block;
  padding: 0;
  background: transparent;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

.ecg-pulse-wrapper {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
  overflow: visible;
  display: flex;
  align-items: center;
  opacity: 0.85;
}

.ecg-pulse-svg {
  width: 100%;
  height: 120px;
  overflow: visible;
  display: block;
}

.ecg-pulse-track {
  stroke: #ff3b30;
  stroke-width: 2.5;
  fill: none;
  filter: drop-shadow(0 0 10px rgba(255, 59, 48, 0.7));
  animation: ecgGlowPulse 3s ease-in-out infinite alternate;
}

@keyframes ecgGlowPulse {
  0% { opacity: 0.75; filter: drop-shadow(0 0 6px rgba(255, 59, 48, 0.5)); }
  100% { opacity: 1; filter: drop-shadow(0 0 14px rgba(255, 59, 48, 0.9)); }
}

.gate-wrapper-modern {
  width: min(440px, 100%);
  position: relative;
  z-index: 2;
  margin: 0 auto;
}

.gate-card-modern {
  width: 100%;
  background: rgba(10, 20, 36, 0.82);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1.5px solid rgba(255, 59, 48, 0.35);
  border-radius: 28px;
  padding: 2.25rem 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 50px rgba(255, 59, 48, 0.18);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-brand-block {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.auth-brand-logo-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.auth-running-icon {
  font-size: 2.1rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(255, 59, 48, 0.85));
}

.auth-brand-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #ff3b30;
  letter-spacing: -0.02em;
  text-shadow: 0 0 25px rgba(255, 59, 48, 0.5);
}

.auth-brand-tagline {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
  text-align: center;
}

.auth-role-segmented {
  display: flex;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.role-seg-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-seg-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.role-seg-btn.active {
  background: rgba(255, 59, 48, 0.12);
  border-color: #ff3b30;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 59, 48, 0.35);
}

.auth-fields-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.auth-inputs-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.modern-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 59, 48, 0.25);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.modern-input::placeholder {
  color: #64748b;
}

.modern-input:focus {
  border-color: #ff3b30;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.25), 0 0 20px rgba(255, 59, 48, 0.25);
}

.code-input {
  letter-spacing: 0.4em;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.btn-cyan-gradient {
  width: 100%;
  padding: 0.95rem 1.5rem;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #ff9500 0%, #ff2d55 100%);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(255, 59, 48, 0.45);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.btn-cyan-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 35px rgba(255, 59, 48, 0.7);
  filter: brightness(1.08);
}

.btn-cyan-gradient:active {
  transform: translateY(1px);
}

.auth-footer-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.btn-link-cyan {
  background: transparent;
  border: none;
  color: #ff3b30;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
}

.btn-link-cyan:hover {
  color: #70f9ff;
  text-decoration: underline;
}

.btn-link-subtle {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
}

.btn-link-subtle:hover {
  color: #94a3b8;
  text-decoration: underline;
}

/* Каркас приложения с фиксированным левым сайдбаром */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
}

/* Глобальное строгое ограничение размеров для всех встроенных SVG-иконок приложения */
.nav-icon-svg,
.action-icon-svg,
.btn-inline-svg,
.subnav-svg {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  stroke-width: 1.8 !important;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Фиксированное левое меню в стиле AmoCRM (узкое, с круглыми иконками-бейждами) */
.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 82px;
  background: #111a28;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  padding: 0.9rem 0.35rem 0.75rem;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.45);
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 0.75rem;
  width: 100%;
}

.sidebar-top .brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.brand-title-chunrun {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ff9500;
  text-shadow: 0 0 10px rgba(255, 59, 48, 0.5);
  text-transform: uppercase;
  margin-top: 0.15rem;
  display: block;
}

.brand-logo-glow {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #ff9500 0%, #ff2d55 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 0 22px rgba(255, 59, 48, 0.5);
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-logo-glow:hover {
  transform: scale(1.05);
  box-shadow: 0 0 28px rgba(255, 59, 48, 0.7);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  width: 100%;
  background: transparent;
  padding: 0;
  border: none;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Пункт меню в стиле AmoCRM: круглая плашка с иконкой сверху, компактный текст снизу */
.sidebar-nav .nav-btn {
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.45rem 0.2rem;
  border-radius: 12px;
  background: transparent;
  color: #8da2bb;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

/* Круглый контейнер иконки (как в AmoCRM) */
.sidebar-nav .nav-btn .nav-icon-svg {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  padding: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  stroke: #8da2bb !important;
  box-sizing: border-box !important;
  transition: all 0.18s;
}

.sidebar-nav .nav-btn .nav-label {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.15;
  color: inherit;
  display: block;
  letter-spacing: -0.01em;
}

.nav-text-mobile {
  display: none;
}

.sidebar-nav .nav-btn:hover {
  color: #ffffff;
}

.sidebar-nav .nav-btn:hover .nav-icon-svg {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  stroke: #ffffff !important;
  transform: translateY(-1px);
}

/* Активный пункт — неоновый градиент для круглой иконки */
.sidebar-nav .nav-btn.active {
  color: #ffffff;
  font-weight: 700;
}

.sidebar-nav .nav-btn.active .nav-icon-svg {
  background: linear-gradient(135deg, #00f2fe 0%, #10b981 100%);
  border-color: rgba(255, 255, 255, 0.85);
  stroke: #03101e !important;
  box-shadow: 0 0 18px rgba(0, 242, 254, 0.65), 0 0 8px rgba(16, 185, 129, 0.5);
}

.sidebar-bottom {
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.sidebar-device-row {
  display: none;
}

.sidebar-user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
}

.sidebar-user-avatar .user-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.25), rgba(255, 45, 85, 0.25));
  border: 1px solid rgba(255, 59, 48, 0.4);
  color: #ff3b30;
}

.sidebar-user-avatar .user-avatar-circle svg {
  width: 13px !important;
  height: 13px !important;
}

.sidebar-user-meta {
  display: none;
}

.sidebar-logout-btn {
  background: transparent;
  border: none;
  color: #8da2bb;
  padding: 0.35rem;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}

.sidebar-logout-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.sidebar-logout-btn svg {
  width: 15px !important;
  height: 15px !important;
}

/* Рабочая область контента справа от сайдбара */
.app-main-viewport {
  margin-left: 82px;
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mobile-topbar {
  display: none;
  height: 56px;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

@media (max-width: 768px) {
  .app-sidebar {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: calc(56px + max(env(safe-area-inset-bottom, 0px), 18px)) !important;
    min-height: calc(56px + max(env(safe-area-inset-bottom, 0px), 18px)) !important;
    max-height: calc(56px + max(env(safe-area-inset-bottom, 0px), 18px)) !important;
    flex-direction: row !important;
    padding: 5px 4px calc(max(env(safe-area-inset-bottom, 0px), 18px) + 2px) !important;
    box-sizing: border-box !important;
    border-right: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(10, 16, 28, 0.96) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    z-index: 1000 !important;
  }
  .sidebar-top,
  .sidebar-bottom {
    display: none !important;
  }
  .sidebar-nav {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
  }
  .sidebar-nav .nav-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 3px 0 !important;
    border-radius: 8px !important;
    gap: 2px !important;
    background: transparent !important;
    overflow: hidden !important;
  }
  .sidebar-nav .nav-btn.hidden,
  .sidebar-nav .nav-btn[hidden] {
    display: none !important;
  }
  .sidebar-nav .nav-btn .nav-icon-svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    padding: 1px !important;
    border-radius: 6px !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .sidebar-nav .nav-btn.active .nav-icon-svg {
    background: transparent !important;
    border: none !important;
    stroke: #00f2fe !important;
    color: #00f2fe !important;
    box-shadow: none !important;
    filter: drop-shadow(0 0 6px rgba(0, 242, 254, 0.7)) !important;
  }
  .sidebar-nav .nav-btn .nav-label {
    display: block !important;
    font-size: 8.5px !important;
    font-weight: 600 !important;
    line-height: 1.1 !important;
    color: #8da2bb !important;
    white-space: nowrap !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    letter-spacing: -0.3px !important;
    margin: 0 !important;
    padding: 0 1px !important;
  }
  .sidebar-nav .nav-btn.active .nav-label {
    color: #00f2fe !important;
    font-weight: 700 !important;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.45);
  }
  .nav-text-desktop {
    display: none !important;
  }
  .nav-text-mobile {
    display: inline !important;
  }
  .app-main-viewport {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding-bottom: 0 !important;
    overflow-x: hidden !important;
  }
  .mobile-topbar {
    display: flex !important;
    height: calc(54px + env(safe-area-inset-top, 0px)) !important;
    padding: env(safe-area-inset-top, 0px) 0.85rem 0 0.85rem !important;
    background: rgba(10, 16, 28, 0.94) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }
}

.user-avatar-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 59, 48, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.35);
}
.user-avatar-circle svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.header-token-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.8rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(255, 59, 48, 0.12));
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}
.header-token-pill:hover {
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}
.token-bolt {
  font-size: 0.95rem;
  animation: pulseBolt 2s infinite ease-in-out;
}
@keyframes pulseBolt {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px #f59e0b); }
  50% { transform: scale(1.2); filter: drop-shadow(0 0 6px #f59e0b); }
}
.token-val {
  color: #f59e0b;
  font-family: var(--font-mono);
  font-weight: 800;
}
.token-text {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.notif-btn {
  position: relative;
}
.notif-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 6px #ff3b30;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--panel-2);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.status-pill:hover {
  border-color: var(--line-strong);
  background: var(--panel-hover);
}
.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}
.status-pill.connected .dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.status-pill.disconnected .dot {
  background: var(--danger);
}

/* Представления (Views) - полная взаимная изоляция */
.view {
  flex: 1;
  min-height: auto;
  padding: 1.25rem 1.5rem 3rem;
  overflow-y: visible;
  display: block;
}

#view-plan:not(.hidden),
#view-analytics:not(.hidden),
#view-feed:not(.hidden),
#view-students:not(.hidden),
#view-admin:not(.hidden) {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.panel:hover {
  border-color: rgba(0, 242, 254, 0.22);
  box-shadow: 0 8px 30px -2px rgba(0, 0, 0, 0.5), 0 0 20px -6px rgba(0, 242, 254, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Спортивный Дашборд «ИИ · ИМПУЛЬС» — Командный центр
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 1.25rem;
  height: auto;
  min-height: 100%;
  padding-bottom: 2.5rem;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    display: flex;
    flex-direction: column;
    overflow-y: visible;
    gap: 1.25rem;
  }
  .col-performance-center {
    order: 1;
  }
  .col-recent-activities {
    order: 2;
    max-height: 440px;
  }
}

/* КОЛОНКА 1: Recent Activities */
.col-recent-activities {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.25rem;
  min-height: 0;
  overflow: hidden;
}

.panel-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.dash-col-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-col-icon {
  font-size: 1.2rem;
}

.recent-activities-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-y: auto;
  flex: 1;
  padding-right: 2px;
}

.recent-act-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.recent-act-item:hover {
  border-color: #ff3b30;
  background: var(--panel-hover);
  transform: translateX(2px);
}

.recent-act-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.25);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.recent-act-content {
  flex: 1;
  min-width: 0;
}

.recent-act-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.recent-act-title {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  margin: 1px 0;
}

.recent-act-stats {
  font-size: 0.76rem;
  color: #38bdf8;
  font-family: var(--font-mono);
}

/* КОЛОНКА 2: Performance Center */
.col-performance-center {
  display: flex;
  flex-direction: column;
  min-height: auto;
  gap: 1.25rem;
}

.col-performance-center > * {
  flex-shrink: 0;
  min-height: auto;
}

/* Hero-карточка: Live ECG и динамика пульса */
.hero-performance-card {
  display: block;
  background: linear-gradient(135deg, rgba(16, 26, 46, 0.48) 0%, rgba(9, 14, 26, 0.65) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 242, 254, 0.22);
  border-radius: 20px;
  padding: 1.35rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 242, 254, 0.1);
  min-height: auto;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.hero-performance-card::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 15px;
  width: 220px;
  height: 240px;
  background-image: url("/static/chuvash-tree.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.20;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(0, 242, 254, 0.5));
  z-index: 0;
  transition: opacity 0.3s ease;
}

.hero-performance-card:hover::after {
  opacity: 0.35;
}

.hero-performance-card > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 860px) {
  .hero-performance-card {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
}

.dash-card-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
}

.hero-left-section {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.75rem;
  min-height: 0;
}

.card-eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #ff3b30;
}

.pulse-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  background: rgba(255, 59, 48, 0.15);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.35);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-weight: 700;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 8px #ff3b30;
  animation: pulseDot 1.2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Блок заголовков и бейджей для Hero-карточки */
.dash-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dash-subheading {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.dash-badge-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn-compact {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn-compact:hover {
  background: rgba(255, 59, 48, 0.18);
  border-color: #ff3b30;
}

/* Верхняя полоса ключевых метрик пульса и объёма */
.hero-metrics-strip {
  display: flex;
  gap: 1.5rem;
  margin: 0.65rem 0 0.85rem 0;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.hero-metric-tile {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-metric-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  font-weight: 600;
}

.hero-metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.hr-number {
  font-size: 1.85rem;
  font-weight: 800;
  color: #ff3b30;
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
  text-shadow: 0 0 12px rgba(255, 59, 48, 0.4);
}

.hr-unit {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
}

.heart-pulse-icon {
  font-size: 1.1rem;
  animation: heartBeat 1.2s infinite;
  margin-left: 0.15rem;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22); }
}

.tag-badge-cyan {
  background: rgba(255, 59, 48, 0.12);
  color: #ff3b30;
  border: 1px solid rgba(255, 59, 48, 0.3);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.tag-badge-green {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.tag-badge-gray {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.35);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.tag-badge-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.tag-badge-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.tag-badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

/* Интерактивный координатный график пульса и темпа */
.dash-chart-frame {
  display: flex;
  gap: 0.5rem;
  height: 130px;
  position: relative;
  width: 100%;
  background: rgba(7, 19, 37, 0.65);
  border: 1px solid rgba(255, 59, 48, 0.22);
  border-radius: 12px;
  padding: 0.5rem 0.6rem 0.3rem 0.4rem;
  box-shadow: inset 0 0 15px rgba(255, 59, 48, 0.05);
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
  flex-shrink: 0;
}

.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.64rem;
  color: #64748b;
  font-family: var(--font-mono);
  line-height: 1;
  padding-bottom: 2px;
  width: 26px;
  text-align: right;
  user-select: none;
}

.chart-canvas-area {
  flex: 1;
  position: relative;
  height: 100%;
  overflow: visible;
}

.interactive-chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-dot {
  cursor: pointer;
  transition: r 0.2s cubic-bezier(0.4, 0, 0.2, 1), stroke-width 0.2s;
}

.chart-dot:hover {
  r: 6 !important;
  stroke: #ffffff !important;
  stroke-width: 2.5 !important;
}

.chart-x-labels {
  display: flex;
  justify-content: space-between;
  padding-left: 32px;
  font-size: 0.68rem;
  color: #94a3b8;
  font-family: var(--font-mono);
  margin-top: 0.35rem;
  user-select: none;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 100;
  background: rgba(11, 20, 38, 0.96);
  border: 1px solid #ff3b30;
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  font-size: 0.72rem;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  transform: translate(-50%, -120%);
  transition: opacity 0.15s ease;
  line-height: 1.35;
}

.chart-tooltip.hidden {
  display: none;
}

/* AI Insights subcard */
.hero-ai-insights {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 59, 48, 0.2);
  border-radius: 16px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
}

.ai-insights-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-insights-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ff3b30;
  margin: 0 0 0.2rem;
}

.ai-insights-body {
  font-size: 0.86rem;
  line-height: 1.45;
  color: #e2e8f0;
  margin: 0;
}

.ai-kpi-metrics-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-kpi-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* Ряд из 3 KPI карточек */
.dash-kpi-trio-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.dash-kpi-pair-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .dash-kpi-trio-row,
  .dash-kpi-pair-row {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

.kpi-tile-card {
  background: linear-gradient(145deg, rgba(16, 26, 46, 0.46), rgba(9, 14, 26, 0.62));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-tile-card:hover {
  border-color: rgba(0, 242, 254, 0.25);
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.5), 0 0 20px -4px rgba(0, 242, 254, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.kpi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.kpi-tile-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.info-badge {
  font-size: 0.75rem;
  cursor: help;
  opacity: 0.75;
}

/* Круговой датчик нагрузки */
.circular-gauge-wrapper {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0.2rem 0;
}

.circular-gauge {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke: #00f2fe;
  stroke-width: 8;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.65));
  transition: stroke-dashoffset 0.6s ease;
}

.gauge-inner-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-pct {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.gauge-status {
  font-size: 0.7rem;
  color: #10b981;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.kpi-metric-subrow {
  display: flex;
  justify-content: space-around;
  width: 100%;
  font-size: 0.75rem;
  margin: 0.2rem 0;
}

.acwr-zone-label {
  font-size: 0.68rem;
  color: #10b981;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Пульсовые зоны распределения */
.zones-distribution-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.zones-stacked-bar {
  display: flex;
  width: 100%;
  height: 16px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  gap: 2px;
}

.zone-bar-segment {
  height: 100%;
  transition: width 0.4s ease;
  border-radius: 2px;
}

.zone-bar-segment.z1 { background: #38bdf8; }
.zone-bar-segment.z2 { background: #10b981; }
.zone-bar-segment.z3 { background: #eab308; }
.zone-bar-segment.z4 { background: #f97316; }
.zone-bar-segment.z5 { background: #ef4444; }

.zones-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.6rem;
  font-size: 0.7rem;
  text-align: left;
  width: 100%;
}

.zone-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
}

.zone-legend-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #94a3b8;
}

.zone-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.zone-dot.z1 { background: #38bdf8; box-shadow: 0 0 5px #38bdf8; }
.zone-dot.z2 { background: #10b981; box-shadow: 0 0 5px #10b981; }
.zone-dot.z3 { background: #eab308; box-shadow: 0 0 5px #eab308; }
.zone-dot.z4 { background: #f97316; box-shadow: 0 0 5px #f97316; }
.zone-dot.z5 { background: #ef4444; box-shadow: 0 0 5px #ef4444; }

.zone-time-stat {
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-mono);
}

/* VO2 Max & Race Predictor */
.vo2-score-box {
  margin: 0.15rem 0 0.35rem 0;
}

.vo2-number-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
}

.vo2-val {
  font-size: 2.2rem;
  font-weight: 800;
  color: #00f2fe;
  background: linear-gradient(135deg, #00f2fe 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  filter: drop-shadow(0 0 16px rgba(0, 242, 254, 0.4));
}

.vo2-unit {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
}

.race-predictor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.35rem;
}

.race-pred-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  transition: all 0.2s ease;
}

.race-pred-item:hover {
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateY(-1px);
}

.race-dist {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.race-time {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-mono);
}

.race-pace {
  font-size: 0.65rem;
  color: #ff3b30;
  font-family: var(--font-mono);
}

/* Upcoming AI Coaching Plan */
.upcoming-plan-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.4rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-cyan-outline {
  background: transparent;
  border: 1.5px solid #ff3b30;
  color: #ff3b30;
  border-radius: 8px;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cyan-outline:hover {
  background: rgba(255, 59, 48, 0.15);
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.35);
}

.plan-header-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.upcoming-workouts-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

/* Week Navigation Bar in Training Plan */
.plan-week-bar {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.5rem 0.85rem;
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.week-nav-btn {
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.25);
  color: #ff3b30;
  padding: 0.38rem 0.85rem;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.week-nav-btn:hover {
  background: rgba(255, 59, 48, 0.2);
  border-color: #ff3b30;
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.35);
  color: #fff;
}

.week-current-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.35rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.week-cal-icon {
  font-size: 1rem;
}

.week-label-text {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
}

.week-badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.week-badge-tag.tag-current {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.week-badge-tag.tag-future {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.week-badge-tag.tag-past {
  background: rgba(148, 163, 184, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #94a3b8;
}

.week-today-btn {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #10b981;
  padding: 0.35rem 0.75rem;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.week-today-btn:hover {
  background: #10b981;
  color: #041424;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.upcoming-workouts-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

/* Rich Workout Card in AI Plan */
.upcoming-workout-card {
  background: linear-gradient(145deg, rgba(16, 26, 46, 0.42), rgba(9, 14, 26, 0.58));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 0.95rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.upcoming-workout-card:hover {
  border-color: rgba(0, 242, 254, 0.3);
  background: linear-gradient(145deg, rgba(20, 32, 56, 0.6), rgba(12, 18, 34, 0.75));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 15px rgba(0, 242, 254, 0.1);
  transform: translateY(-1px);
}

.upcoming-workout-card.is-today {
  border: 1.5px solid #00f2fe;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%), rgba(16, 26, 46, 0.55);
  box-shadow: 0 0 24px rgba(0, 242, 254, 0.25), 0 4px 18px rgba(0, 0, 0, 0.4);
}

.upcoming-workout-card.is-done {
  border-left: 3.5px solid #10b981;
}

.upcoming-workout-card.is-extra {
  border-left: 3.5px solid #a855f7;
}

.upcoming-workout-card.is-race {
  border: 1.5px solid rgba(245, 158, 11, 0.6) !important;
  border-left: 5px solid #f59e0b !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(239, 68, 68, 0.06), var(--panel-2)) !important;
  box-shadow: 0 4px 24px rgba(245, 158, 11, 0.18);
}

.upcoming-workout-card.is-race:hover {
  border-color: #f59e0b !important;
  box-shadow: 0 6px 28px rgba(245, 158, 11, 0.3);
}

.workout-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.workout-card-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  flex: 1;
}

.workout-day-pill {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.1);
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  min-width: 44px;
  text-align: center;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.workout-title-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.workout-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.workout-status-badge.done {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #10b981;
}

.workout-status-badge.planned {
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: #ff3b30;
}

.workout-status-badge.race-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

.workout-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-toggle-telemetry {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.8rem;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 59, 48, 0.12);
  border: 1px solid rgba(255, 59, 48, 0.4);
  color: #ff3b30;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle-telemetry:hover,
.btn-toggle-telemetry.active {
  background: #ff3b30;
  color: #041424;
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.4);
}

.btn-start-workout {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.8rem;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-start-workout:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.btn-ai-workout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.55rem;
  border-radius: 9px;
  font-size: 0.85rem;
  background: rgba(255, 59, 48, 0.12);
  border: 1px solid rgba(255, 59, 48, 0.35);
  color: #ff3b30;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ai-workout:hover {
  background: rgba(255, 59, 48, 0.25);
  border-color: #ff3b30;
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.35);
}

/* Badges Row in Workout Card */
.workout-badges-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.workout-zone-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  letter-spacing: 0.01em;
}

.workout-zone-badge.aerobic {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.workout-zone-badge.tempo {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.workout-zone-badge.speed {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
}

.workout-zone-badge.race {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(239, 68, 68, 0.25));
  border: 1px solid rgba(245, 158, 11, 0.55);
  color: #fbbf24;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.workout-pace-badge {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: 7px;
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.25);
  color: #ff3b30;
}

.workout-fact-badge {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.workout-phases-text {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
}

.workout-tip-text {
  font-size: 0.78rem;
  color: #38bdf8;
  line-height: 1.4;
  background: rgba(56, 189, 248, 0.06);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border-left: 2px solid #38bdf8;
}

/* Collapsible Telemetry & Map Drawer */
.workout-telemetry-drawer {
  background: rgba(7, 11, 20, 0.9);
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 12px;
  padding: 0.85rem;
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: fadeInDrawer 0.25s ease-out;
}

@keyframes fadeInDrawer {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 960px) {
  .drawer-grid {
    grid-template-columns: 1fr;
  }
}

.drawer-map-box {
  height: 220px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  background: #070b14;
}

.drawer-telemetry-box {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  justify-content: space-between;
}

.drawer-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #94a3b8;
}

.drawer-chart-legend {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.drawer-canvas-wrap {
  position: relative;
  width: 100%;
  height: 110px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.drawer-canvas {
  width: 100%;
  height: 110px;
  display: block;
}

.drawer-zones-bar {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  gap: 2px;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
}

.drawer-zones-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: #94a3b8;
}

.drawer-zone-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.drawer-zone-pill .zone-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* КОЛОНКА 3: Records, Injury Score, Weather */
.col-records-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 0;
}

.records-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.25rem;
}

.records-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.record-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.record-medal {
  font-size: 1.3rem;
}

.record-info {
  flex: 1;
}

.record-dist {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
}

.record-pb-label {
  font-size: 0.7rem;
  color: #64748b;
}

.record-time {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-mono);
}

.injury-score-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.25rem;
}

.injury-score-display {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin: 0.35rem 0 0.5rem;
}

.score-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ff3b30;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  text-shadow: 0 0 15px rgba(255, 59, 48, 0.4);
}

.score-max {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}

.score-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff9500 0%, #ff2d55 100%);
  border-radius: 999px;
  box-shadow: 0 0 8px #ff3b30;
}



.badge {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line-strong);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.plan-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-right: 0.25rem;
}
.session-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.2s;
}
.session-card.done {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.06), transparent);
}
.session-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.session-title {
  font-weight: 700;
  font-size: 0.95rem;
}
.session-status {
  font-size: 0.8rem;
  font-weight: 600;
}
.session-status.done { color: var(--accent); }
.session-status.pending { color: var(--text-dim); }
.session-phases {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.plan-side-panel {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.side-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.side-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.side-icon { font-size: 1.25rem; }
.potential-text { font-size: 0.88rem; line-height: 1.45; }

.balance-bars {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}
.balance-item .balance-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Лента тренировок */
.feed-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1rem;
}

/* Мобильный переключатель вкладок Ленты (скрыт на десктопе) */
.feed-mobile-tabs {
  display: none;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  background: rgba(11, 18, 34, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 20;
}

.feed-mobile-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.feed-mobile-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.feed-mobile-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.18) 0%, rgba(16, 185, 129, 0.18) 100%);
  border-color: rgba(0, 242, 254, 0.45);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.22);
}

.feed-mobile-back-row {
  display: none;
  margin-bottom: 0.85rem;
}

.btn-back-to-feed-list {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: 10px;
  color: #00f2fe;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-back-to-feed-list:hover,
.btn-back-to-feed-list:active {
  background: rgba(0, 242, 254, 0.18);
  border-color: #00f2fe;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.3);
}

@media (max-width: 860px) {
  .feed-mobile-tabs {
    display: flex !important;
  }

  .feed-mobile-back-row {
    display: flex !important;
  }

  .feed-grid.mobile-show-list .feed-list-panel {
    display: flex !important;
  }

  .feed-grid.mobile-show-list .detail-panel {
    display: none !important;
  }

  .feed-grid.mobile-show-detail .feed-list-panel {
    display: none !important;
  }

  .feed-grid.mobile-show-detail .detail-panel {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
}
/* =========================================
   CALENDAR VIEW
   ========================================= */
.calendar-wrapper {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.calendar-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  text-transform: capitalize;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}

.calendar-day-header {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  padding-bottom: 0.5rem;
}

.calendar-day {
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.35rem 0.25rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.calendar-day .cal-day-num {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.calendar-day:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.calendar-day.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.calendar-day.has-activity {
  background: rgba(255, 59, 48, 0.1);
  color: var(--accent);
  border: 1px solid rgba(255, 59, 48, 0.28);
}

.calendar-day.has-activity .cal-day-num {
  color: #ff3b30;
}

.calendar-day.has-activity:hover, .calendar-day.selected {
  background: rgba(255, 59, 48, 0.22);
  box-shadow: 0 0 14px rgba(255, 59, 48, 0.35);
  border-color: #ff3b30;
}

.calendar-day.selected .cal-day-num {
  color: #ffffff;
}

.calendar-day-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  width: 100%;
  pointer-events: none;
}

.cal-km-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: #ff3b30;
  font-family: var(--font-mono);
  background: rgba(255, 59, 48, 0.15);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  line-height: 1.1;
  white-space: nowrap;
}

.cal-metrics-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  line-height: 1;
}

.cal-pace-text {
  font-size: 0.65rem;
  color: #94a3b8;
  font-family: var(--font-mono);
  line-height: 1;
  white-space: nowrap;
}

.cal-hr-text {
  font-size: 0.63rem;
  color: #f43f5e;
  font-family: var(--font-mono);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.cal-plan-badge {
  font-size: 0.62rem;
  font-weight: 700;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  border: 1px dashed rgba(167, 139, 250, 0.4);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  margin-top: 0.15rem;
  white-space: nowrap;
  max-width: 95%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-day .activity-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  margin-top: 0.2rem;
}

.feed-controls {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.search-box {
  position: relative;
}
.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.9rem;
}
.search-box input {
  padding-left: 2.3rem;
}

.filter-chips {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.chip {
  background: var(--panel-2);
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.activities-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-right: 0.25rem;
}
.activity-card {
  text-align: left;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.activity-card:hover {
  background: var(--panel-hover);
  border-color: var(--line-strong);
}
.activity-card.active {
  border-color: var(--accent);
  background: var(--panel-hover);
  box-shadow: 0 0 0 1px var(--accent);
}
.activity-card .meta {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

/* Детальный инспектор тренировки */
.detail-panel {
  overflow-y: auto;
  gap: 1rem;
}
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.metric-tile {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
}
.metric-tile-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.metric-tile-val {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.extra-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-title-sm {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.45rem;
}

/* Графики */
.chart-wrapper {
  margin-bottom: 0.85rem;
}
.chart-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.chart { min-height: 80px; }
.bars { height: 110px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.45rem; align-items: end; }
.bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0.35rem; }
.bar i { width: 100%; max-width: 24px; min-height: 4px; border-radius: 6px 6px 2px 2px; background: var(--accent); display: block; }
.bar em { font-style: normal; color: var(--text-muted); font-size: 0.75rem; }

.zone { height: 18px; border-radius: 999px; overflow: hidden; display: flex; background: var(--panel-2); }
.zone span { display: block; height: 100%; }
.zone-legend { display: flex; gap: 0.6rem; color: var(--text-muted); font-size: 0.78rem; font-family: var(--font-mono); margin-top: 0.45rem; flex-wrap: wrap; }

/* Таблица сплитов (Laps) */
.laps-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.laps-split-selector {
  display: inline-flex;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}
.lap-split-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lap-split-btn:hover {
  color: var(--text);
  background: var(--panel-hover);
}
.lap-split-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 2px 8px var(--accent-glow);
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.laps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  text-align: left;
}
.laps-table th {
  background: var(--panel-2);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
}
.laps-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
}
.laps-table tr:last-child td { border-bottom: none; }
.laps-table tr:hover { background: var(--panel-hover); }

/* Чат с ИИ */
#view-chat:not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  padding: 0.75rem 1.25rem !important;
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}
.chat-header-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  width: 100%;
}
.chat-model-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.bot-icon { font-size: 1.5rem; }
.messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-right: 0.5rem;
  width: 100%;
}
.bubble {
  max-width: 820px;
  padding: 0.95rem 1.25rem;
  border-radius: var(--radius-lg);
  line-height: 1.55;
  overflow-wrap: anywhere;
  color: var(--text);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}
.bubble.user {
  margin-left: auto;
  background: var(--accent);
  color: var(--accent-ink);
  border-bottom-right-radius: 4px;
  font-weight: 500;
  white-space: pre-wrap;
  max-width: min(720px, 85%);
}
.bubble.assistant {
  margin-right: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  color: var(--text);
  width: 100%;
  max-width: 100%;
}
.bubble.assistant:hover {
  border-color: rgba(255, 59, 48, 0.35);
}
.bubble.error {
  border-color: var(--danger);
  color: var(--danger);
}

/* Строка анализа ИИ и форматированный ответ */
.analysis-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.28);
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #ff3b30;
  margin-bottom: 0.65rem;
  animation: analysisBarPulse 2s infinite ease-in-out;
}
.analysis-status-bar.completed {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.28);
  color: #10b981;
  animation: none;
}
.analysis-status-bar.error {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.35);
  color: #f43f5e;
  animation: none;
}
.analysis-bar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.analysis-brain-icon {
  font-size: 1.1rem;
  animation: brainShake 1.5s infinite;
}
@keyframes brainShake {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.12) rotate(-4deg); }
  75% { transform: scale(1.12) rotate(4deg); }
}
@keyframes analysisBarPulse {
  0%, 100% { border-color: rgba(255, 59, 48, 0.25); box-shadow: 0 0 10px rgba(255, 59, 48, 0.05); }
  50% { border-color: rgba(255, 59, 48, 0.6); box-shadow: 0 0 16px rgba(255, 59, 48, 0.15); }
}
.analysis-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 59, 48, 0.25);
  border-top-color: #ff3b30;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.analysis-body {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
  overflow-wrap: anywhere;
}
.analysis-body h3, .analysis-body h4 {
  color: #ff3b30;
  margin: 0.85rem 0 0.35rem 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.analysis-body strong {
  color: var(--text);
  font-weight: 700;
}
.analysis-body ul, .analysis-body ol {
  margin: 0.4rem 0 0.65rem 1.25rem;
  padding: 0;
}
.analysis-body li {
  margin-bottom: 0.3rem;
}
.analysis-body blockquote {
  border-left: 3px solid #ff3b30;
  padding: 0.4rem 0.75rem;
  margin: 0.5rem 0;
  background: var(--panel-2);
  border-radius: 0 8px 8px 0;
}
.analysis-error-card {
  padding: 0.75rem 0.95rem;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.35);
  border-radius: 12px;
  color: var(--text);
  margin-top: 0.35rem;
}
.analysis-error-card .error-title {
  color: #f43f5e;
  font-weight: 700;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.analysis-error-card .error-tip {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.4;
}

.prompts-scroll {
  flex-shrink: 0;
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.prompt-chip {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  white-space: nowrap;
}
.prompt-chip:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--panel-hover);
}
.prompt-chip-tg {
  background: rgba(255, 59, 48, 0.12);
  border-color: rgba(255, 59, 48, 0.5);
  color: #ff3b30;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.prompt-chip-tg:hover {
  background: rgba(255, 59, 48, 0.22);
  border-color: #ff3b30;
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.35);
}

.chat-composer {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 0.5rem 0.65rem;
}
.chat-composer textarea {
  border: none;
  background: transparent;
  padding: 0.5rem 0.6rem;
  resize: none;
  min-height: 44px;
  max-height: 160px;
}
.chat-composer textarea:focus { box-shadow: none; }
.btn-send {
  background: var(--accent);
  color: var(--accent-ink);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: 0 0 auto;
}
.btn-send:hover { background: var(--accent-hover); }

/* Настройки и Профиль - современный 2026 UI */
#view-settings {
  overflow-y: auto;
  padding: 1.5rem 1.5rem 4rem;
  height: 100%;
}
#view-settings:not(.hidden) {
  display: block;
}

.settings-stack {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 3rem;
}

/* Навигационная панель подразделов настроек (Современные табы) */
.settings-subnav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--panel);
  padding: 6px;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.25);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.settings-subnav::-webkit-scrollbar {
  display: none;
}

.settings-subnav-btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  border-radius: 13px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.settings-subnav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.settings-subnav-btn.active {
  background: rgba(255, 59, 48, 0.12);
  color: #ff3b30;
  border-color: rgba(255, 59, 48, 0.35);
  box-shadow: 0 0 16px rgba(255, 59, 48, 0.18), inset 0 0 10px rgba(255, 59, 48, 0.05);
}

.settings-subnav-btn .subnav-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.settings-subnav-btn .subnav-title {
  letter-spacing: -0.01em;
}

/* Контейнеры подразделов настроек */
.settings-subpane {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeInSubpane 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-subpane.hidden {
  display: none !important;
}

@keyframes fadeInSubpane {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 680px) {
  .settings-subnav {
    padding: 4px;
    gap: 0.35rem;
  }
  .settings-subnav-btn {
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
  }
}

.settings-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px !important;
  padding: 1.75rem 2rem !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
  flex-shrink: 0 !important;
  min-height: auto !important;
  height: auto !important;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}

.settings-card:hover {
  border-color: var(--line-strong);
}

.settings-card .panel-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

.settings-card .panel-header-row h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0.2rem 0 0.35rem;
  letter-spacing: -0.02em;
}

/* Единый блок спортивных часов */
.watch-tabs-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  background: var(--panel-2);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--line);
  margin: 1.25rem 0 1.25rem;
}

.watch-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 0.6rem;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.watch-tab-btn:hover {
  color: var(--text);
  background: var(--panel-hover);
}

.watch-tab-btn.active {
  background: var(--panel);
  color: var(--text);
  border-color: #ff3b30;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 59, 48, 0.2);
}

.watch-tab-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.watch-tab-label {
  font-weight: 700;
}

.watch-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  display: inline-block;
  transition: background 0.2s, box-shadow 0.2s;
}

.watch-tab-dot.active {
  background: #ff3b30;
  box-shadow: 0 0 8px #ff3b30;
}

.tag-badge {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-dim);
  font-weight: 600;
}

.watch-panes-wrapper {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem;
  margin-top: 0.5rem;
}

.watch-tab-pane {
  animation: fadeInPane 0.2s ease;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.watch-status-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1rem;
  background: var(--panel);
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

.empty-state-box {
  text-align: center;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.empty-state-box .empty-icon {
  font-size: 2.4rem;
  opacity: 0.8;
}

.empty-state-box h4 {
  font-size: 1.15rem;
  color: var(--text);
  margin: 0;
}

.two-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

@media (max-width: 768px) {
  .watch-tabs-bar {
    grid-template-columns: 1fr 1fr;
  }
  .two-fields-row {
    grid-template-columns: 1fr;
  }
}
.status-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--panel-2);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  margin: 0.5rem 0 1rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}
.status-dot.active { background: var(--accent); }

.sport-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin: 0.85rem 0 1.25rem;
}
.sport-card {
  text-align: left;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
}
.sport-card:hover { border-color: var(--line-strong); }
.sport-card.active {
  border-color: var(--accent);
  background: var(--panel-hover);
  box-shadow: 0 0 0 1px var(--accent);
}
.sport-icon { font-size: 1.8rem; margin-bottom: 0.35rem; }
.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.4rem 0 1rem;
}
.choice {
  background: var(--panel-2);
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.95rem;
}
.choice:hover { color: var(--text); }
.choice.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.key-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
}

/* Плавающий тост (Toast) */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line-strong);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 960px) {
  body { overflow-y: auto; }
  .shell { height: auto; min-height: 100vh; overflow-x: hidden; }
  .app-header {
    height: auto;
    padding: 0.65rem 1rem;
    flex-wrap: wrap;
    gap: 0.65rem;
  }
  .app-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 4px;
    gap: 0.3rem;
    justify-content: flex-start;
  }
  .app-nav::-webkit-scrollbar { display: none; }
  .nav-btn {
    white-space: nowrap;
    padding: 0.45rem 0.8rem;
    font-size: 0.84rem;
    flex-shrink: 0;
  }
  .header-search-box {
    display: none;
  }
  .header-actions {
    gap: 0.4rem;
    margin-left: auto;
  }
  .status-pill .pill-text {
    display: none;
  }
  .status-pill {
    padding: 0.35rem 0.55rem;
  }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .plan-layout, .feed-grid, .settings-grid, .students-layout { grid-template-columns: 1fr; height: auto; }
  .view { overflow: visible; height: auto; padding: 1rem 0.85rem; }
}

@media (max-width: 600px) {
  .brand-sub { display: none; }
  .user-pill-name { display: none; }
  .hero-metrics-strip {
    flex-wrap: wrap;
    gap: 0.85rem;
  }
  .hero-metric-tile {
    min-width: 95px;
  }
  .kpi-strip { grid-template-columns: 1fr; }
}

/* --- Новые стили: роли, верификация, кабинет тренера --- */

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.role-card {
  cursor: pointer;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all var(--transition-fast);
}

.role-card:hover { border-color: var(--line-strong); }

.role-card.active {
  border-color: var(--accent);
  background: var(--panel-hover);
  box-shadow: 0 0 0 1px var(--accent);
}

.role-card .role-icon { font-size: 1.4rem; margin-bottom: 0.2rem; }
.role-card strong { font-size: 0.95rem; color: var(--text); }
.role-card small { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem; }
.hidden-radio { display: none; }

.code-input {
  letter-spacing: 8px;
  font-size: 1.6rem !important;
  text-align: center;
  font-weight: 700;
  font-family: var(--font-mono) !important;
  padding: 0.6rem !important;
}

.resend-block {
  text-align: center;
  margin: 0.5rem 0;
}

.sport-badge-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}
.sport-badge-icon { font-size: 2rem; }

.section-tag-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.badge.coach-tag {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge.ai-tag {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.coach-plan-panel {
  margin-bottom: 1.25rem;
  border-color: rgba(245, 158, 11, 0.25);
}

.coach-plan-empty {
  background: var(--panel-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.coach-plan-empty h4 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--text);
}

.coach-invite-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.coach-invite-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.invite-icon { font-size: 1.6rem; }

.invite-code-pill {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 2px;
  background: var(--panel-2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-left: 0.45rem;
  user-select: all;
}

/* Кабинет тренера */
.students-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
  height: calc(100vh - 170px);
}

.students-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.students-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-right: 0.25rem;
}

.student-card {
  cursor: pointer;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.student-card:hover {
  border-color: var(--line-strong);
  background: var(--panel-hover);
}

.student-card.active {
  border-color: var(--accent);
  background: var(--panel-hover);
  box-shadow: 0 0 0 1px var(--accent);
}

.student-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.student-email {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}

.student-card-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.student-workspace {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 1.25rem;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

.empty-icon { font-size: 3.5rem; margin-bottom: 0.75rem; opacity: 0.6; }

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.student-header-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.workspace-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.week-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.2rem 0.4rem;
}

.week-nav-title {
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 0 0.4rem;
}

.icon-btn-sm {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.icon-btn-sm:hover { color: var(--text); background: var(--panel-hover); }

.student-week-kpi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.student-kpi-item {
  display: flex;
  flex-direction: column;
}

.student-kpi-item strong {
  font-size: 1.15rem;
  font-family: var(--font-mono);
  color: var(--text);
}

.student-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 1200px) {
  .student-week-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .student-week-grid { grid-template-columns: 1fr; }
}

.student-day-col {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.student-day-col.today {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.04);
}

.day-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.day-col-header strong { color: var(--text); }
.day-col-header span { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.75rem; }

.day-workouts-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.student-workout-card {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
}

.student-workout-card.done {
  border-color: var(--accent);
  border-left: 3px solid var(--accent);
}

.student-workout-card .sw-title {
  font-weight: 600;
  color: var(--text);
}

.student-workout-card .sw-targets {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.sw-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.day-fact-box {
  margin-top: 0.45rem;
  padding: 0.35rem 0.45rem;
  background: rgba(56, 189, 248, 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text);
  font-family: var(--font-mono);
}

.add-day-workout-btn {
  margin-top: 0.5rem;
  width: 100%;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--text-muted);
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
}
.add-day-workout-btn:hover { border-color: var(--accent); color: var(--text); }

.mini-activities-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.mini-activity-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
}

.mini-activity-title { font-weight: 600; color: var(--text); }
.mini-activity-meta { color: var(--text-muted); font-size: 0.78rem; font-family: var(--font-mono); }

/* Модальное окно */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.modal-card {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.modal-header h3 { margin: 0; font-size: 1.15rem; color: var(--text); }

.modal-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.two-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .two-fields-row {
    grid-template-columns: 1fr;
  }
}

.spacer { flex: 1; }

.modal-lg {
  max-width: 760px;
}
.modal-scroll-body {
  max-height: 80vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Интерактивная карта GPS (Strava / Dark CartoDB style) */
.activity-map-wrapper {
  margin: 1rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 59, 48, 0.25);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 59, 48, 0.1);
  background: #090e1a;
  position: relative;
}
.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.map-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.route-map {
  width: 100%;
  height: 380px;
  background: var(--bg);
  z-index: 1;
}

/* Стилизация тайлов */
.dark-tiles-layer {
  filter: brightness(0.6) invert(1) contrast(2.2) hue-rotate(200deg) saturate(0.2) brightness(0.7) !important;
}
.light-tiles-layer {
  /* В светлой теме чистая естественная OSM карта с легким повышением контраста дорог */
  filter: contrast(1.05) saturate(1.1) brightness(0.98) !important;
}
.satellite-tiles-layer {
  filter: brightness(0.95) contrast(1.1) !important;
}

/* Leaflet container customizer */
.leaflet-container {
  font-family: inherit;
  background: var(--bg) !important;
}
.leaflet-bar {
  border: 1px solid var(--line-strong) !important;
  box-shadow: var(--shadow-sm) !important;
  border-radius: 8px !important;
  overflow: hidden;
}
.leaflet-bar a {
  background-color: var(--panel) !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--line) !important;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}
.leaflet-bar a:hover {
  background-color: var(--panel-hover) !important;
  color: var(--accent) !important;
}
.leaflet-control-layers {
  background: var(--panel) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-sm) !important;
  backdrop-filter: blur(8px);
  padding: 6px 10px !important;
  font-size: 0.78rem !important;
}
.leaflet-control-layers-toggle {
  background-color: var(--panel) !important;
  border-radius: 6px !important;
}

/* Маркеры Старт и Финиш */
.pulse-marker-start, .pulse-marker-finish {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-marker-core {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
  z-index: 2;
  position: absolute;
}
.map-marker-core.green {
  background: #10b981;
}
.map-marker-core.red {
  background: #ef4444;
}
.map-marker-pulse {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  z-index: 1;
  animation: map-pulse 2s infinite ease-out;
}
.map-marker-pulse.green {
  background: rgba(16, 185, 129, 0.45);
}
.map-marker-pulse.red {
  background: rgba(239, 68, 68, 0.45);
}
@keyframes map-pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Телеметрия: Профиль высоты и ЧСС */
.telemetry-wrapper {
  margin: 1rem 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.9rem;
}
.telemetry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.telemetry-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}
.telemetry-legend {
  display: flex;
  gap: 0.8rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.hr-dot { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.alt-dot { background: #ff3b30; box-shadow: 0 0 6px #ff3b30; }

.canvas-container {
  width: 100%;
  height: 130px;
  position: relative;
}
.canvas-container canvas {
  width: 100% !important;
  height: 130px !important;
  display: block;
}

.effort-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-weight: 700;
}

/* Центр подключения часов */
.connectors-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  height: 100%;
}
.connectors-header-panel {
  padding: 1.5rem;
}
.connectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.connector-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.connector-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 59, 48, 0.35);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 59, 48, 0.1);
}
.connector-card.coming-soon {
  opacity: 0.75;
}
.connector-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.connector-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}
.garmin-wrap {
  background: rgba(0, 122, 255, 0.15);
  border: 1px solid rgba(0, 122, 255, 0.3);
}
.coros-wrap {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.suunto-wrap {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.polar-wrap {
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.connector-status-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
}
.connector-status-badge.connected {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.connector-status-badge.disconnected {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-dim);
  border: 1px solid var(--line);
}
.connector-status-badge.coming-soon-badge {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.connector-info h3 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
}
.connector-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.feat-tag {
  font-size: 0.72rem;
  background: var(--panel-2);
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.btn-connector-action {
  width: 100%;
}

/* Панель администратора */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  height: 100%;
}
.admin-header-panel {
  padding: 1.5rem;
}
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.admin-stat-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.admin-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: #ff3b30;
}
.admin-table-panel {
  padding: 1.25rem;
}
.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}
.admin-users-table th {
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--line);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-users-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.admin-users-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.masked-email {
  font-family: var(--font-mono);
  color: #38bdf8;
  letter-spacing: 0.03em;
}
.role-badge-athlete {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  font-weight: 600;
}
.role-badge-coach {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  font-weight: 600;
}
.super-badge {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  font-weight: 700;
  margin-left: 0.35rem;
}

/* --- Карточка целевого старта и периодизации (Дашборд) --- */
.target-race-card {
  background: linear-gradient(135deg, rgba(16, 27, 48, 0.95) 0%, rgba(10, 18, 32, 0.9) 100%);
  border: 1.5px solid rgba(255, 59, 48, 0.28);
  border-radius: 20px;
  padding: 1.15rem 1.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 20px rgba(255, 59, 48, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.25rem;
  flex-shrink: 0;
}

@media (max-width: 680px) {
  .target-race-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }
  .target-race-card button {
    width: 100%;
  }
}

.target-race-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.target-race-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 59, 48, 0.12);
  border: 1px solid rgba(255, 59, 48, 0.3);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.target-race-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.target-race-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.target-race-heading {
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
}

.target-race-meta-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.86rem;
  color: #94a3b8;
  flex-wrap: wrap;
}

.target-race-countdown-highlight {
  color: #ff3b30;
}

.target-race-countdown-highlight strong {
  color: #38bdf8;
  font-size: 0.96rem;
  font-family: var(--font-mono);
}

.target-race-desc {
  font-size: 0.8rem;
  color: #cbd5e1;
  margin: 0.15rem 0 0 0;
}

/* --- Сводка спортивного профиля (вместо пустой заглушки) --- */
.profile-summary-box {
  background: var(--panel-2, #131c2e);
  border: 1px solid var(--line, #1e293b);
  border-radius: var(--radius-md, 12px);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}

.profile-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem 1.25rem;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.summary-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text, #f8fafc);
}

/* --- Личный кабинет токенов ИИ --- */
.token-balance-hero {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 0.5rem 1rem;
}

.token-hero-val {
  font-size: 1.8rem;
  font-weight: 900;
  color: #fbbf24;
  font-family: var(--font-mono, monospace);
  line-height: 1;
}

.token-hero-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tokens-status-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--panel-2, #131c2e);
  border: 1px solid var(--line, #1e293b);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--text, #e2e8f0);
}

.tokens-status-banner.unlimited {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
  color: #34d399;
}

.tokens-status-banner.tokens-active {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
}

.token-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.pricing-card {
  background: var(--panel-2, #131c2e);
  border: 1px solid var(--line, #1e293b);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pricing-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 59, 48, 0.3);
}

.pricing-card.featured-free {
  border: 1px solid rgba(16, 185, 129, 0.4);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.08) 0%, rgba(13, 22, 38, 0.7) 100%);
}

.pricing-icon {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}

.pricing-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text, #f1f5f9);
}

.pricing-cost {
  font-size: 1rem;
  font-weight: 800;
  color: #fbbf24;
  font-family: var(--font-mono, monospace);
}

.pricing-sub {
  font-size: 0.76rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.35;
}

.tokens-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.token-history-wrap {
  margin-top: 1.25rem;
  border-top: 1px solid var(--line, #1e293b);
  padding-top: 1rem;
}

.token-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.token-history-table th {
  text-align: left;
  padding: 0.45rem 0.65rem;
  color: var(--text-muted, #94a3b8);
  border-bottom: 1px solid var(--line, #1e293b);
  font-weight: 600;
}

.token-history-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.token-tx-plus {
  color: #34d399;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
}

.token-tx-minus {
  color: #f87171;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
}

/* --- Управление токенами в админке суперпользователем --- */
.admin-token-ctrls {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.admin-token-quick-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.btn-token-add {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-token-add:hover {
  background: rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.btn-token-sub {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-token-sub:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.btn-token-zero {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-token-zero:hover {
  background: #ef4444;
  color: #ffffff;
}

.admin-token-custom-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.15rem;
}

.admin-token-num-input {
  width: 58px;
  padding: 0.2rem 0.35rem;
  font-size: 0.76rem;
  font-family: var(--font-mono, monospace);
  background: var(--bg-dark, #0b1120);
  border: 1px solid var(--line, #1e293b);
  border-radius: 5px;
  color: #ffffff;
  text-align: center;
}

.btn-token-action {
  font-size: 0.72rem;
  padding: 0.2rem 0.4rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
  border: 1px solid var(--line, #1e293b);
  background: var(--panel-2, #131c2e);
  color: var(--text, #f1f5f9);
  transition: all 0.15s ease;
}
.btn-token-action:hover {
  border-color: #ff3b30;
  color: #ff3b30;
}

/* ==========================================================================
   Telegram Assistant & Notifications Card
   ========================================================================== */
#profile-telegram-card {
  position: relative;
  overflow: hidden;
}

.tg-connect-box {
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.08) 0%, rgba(255, 59, 48, 0.03) 100%);
  border: 1px solid rgba(0, 136, 204, 0.25);
  border-radius: 18px;
  padding: 1.4rem;
  margin-top: 0.5rem;
}

.tg-connect-content {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.tg-icon-large {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.25) 0%, rgba(255, 59, 48, 0.15) 100%);
  border: 1px solid rgba(0, 136, 204, 0.4);
  box-shadow: 0 4px 16px rgba(0, 136, 204, 0.2);
  flex-shrink: 0;
}

.tg-connect-info h4 {
  margin: 0 0 0.35rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text, #f1f5f9);
}

.tg-features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tg-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(0, 136, 204, 0.12);
  border: 1px solid rgba(0, 136, 204, 0.25);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  color: #7dd3fc;
  font-weight: 500;
}

.tg-user-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(255, 59, 48, 0.05) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 14px;
  margin-bottom: 0.5rem;
}

.tg-check-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #10b981;
  color: #0b1120;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.tg-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.tg-toggle-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  background: var(--panel-2, #131c2e);
  border: 1px solid var(--line, #1e293b);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.tg-toggle-item:hover {
  border-color: rgba(0, 136, 204, 0.5);
  background: var(--panel-hover, #18233a);
  transform: translateY(-1px);
}

.tg-toggle-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #0088cc;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.tg-toggle-text strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text, #f1f5f9);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.tg-bot-actions-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line, #1e293b);
}

.btn-danger-outline {
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #f87171;
  background: transparent;
  border-radius: 10px;
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ffffff;
}

@media (max-width: 640px) {
  .tg-connect-content {
    flex-direction: column;
    gap: 0.85rem;
  }
  .tg-toggle-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   НЕДЕЛЬНЫЙ ОБЪЁМ И ДИНАМИКА (ТЕКУЩАЯ НЕДЕЛЯ + ПРОШЛЫЕ + СРАВНЕНИЕ ДЕНЬ-В-ДЕНЬ)
   ========================================================================== */

.weekly-mileage-card {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--panel, #0f172a);
  border: 1px solid var(--line, #1e293b);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.weekly-mode-toggle-group {
  display: flex;
  background: var(--panel-2, #1e293b);
  border: 1px solid var(--line, #334155);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.weekly-mode-btn {
  background: transparent;
  border: none;
  color: var(--muted, #94a3b8);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.weekly-mode-btn:hover {
  color: #ffffff;
}

.weekly-mode-btn.active {
  background: rgba(255, 59, 48, 0.15);
  color: #ff3b30;
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.2);
}

.weekly-mileage-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

@media (max-width: 900px) {
  .weekly-mileage-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* Левая часть: Текущая неделя */
.weekly-current-section {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.weekly-current-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.weekly-current-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.weekly-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.25);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
}

.weekly-dates-pill {
  font-size: 0.8rem;
  color: var(--muted, #94a3b8);
  font-family: var(--font-mono, monospace);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.weekly-hero-metric-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.25rem;
}

.weekly-hero-val-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.weekly-hero-num {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.03em;
  text-shadow: 0 0 20px rgba(255, 59, 48, 0.25);
}

.weekly-hero-unit {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ff3b30;
}

.weekly-runs-badge {
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
}

/* Плашка сравнения с прошлой неделей */
.weekly-compare-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.weekly-compare-banner.ahead {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.weekly-compare-banner.behind {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.weekly-compare-banner.equal {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.weekly-compare-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.weekly-compare-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.weekly-compare-headline {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.3;
}

.weekly-compare-banner.ahead .weekly-compare-headline {
  color: #34d399;
}

.weekly-compare-banner.behind .weekly-compare-headline {
  color: #fbbf24;
}

.weekly-compare-subtext {
  font-size: 0.78rem;
  color: var(--muted, #94a3b8);
  line-height: 1.4;
}

/* 7-дневная полоска (Пн-Вс) */
.weekly-strip-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
}

.week-days-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.45rem;
}

.week-day-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.3rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
  min-height: 64px;
}

.week-day-pill .wd-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted, #94a3b8);
  text-transform: uppercase;
}

.week-day-pill .wd-date {
  font-size: 0.68rem;
  color: var(--muted, #64748b);
  margin-bottom: 0.25rem;
  font-family: var(--font-mono, monospace);
}

.week-day-pill .wd-km {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
}

.week-day-pill.has-km .wd-km {
  color: #ff3b30;
}

.week-day-pill.today {
  border-color: #ff3b30;
  background: rgba(255, 59, 48, 0.12);
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.2);
}

.week-day-pill.today .wd-name {
  color: #ff3b30;
}

.week-day-pill.today::after {
  content: "";
  position: absolute;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff3b30;
}

.week-day-pill.future {
  opacity: 0.55;
  border-style: dashed;
}

/* Правая часть: История прошлых недель */
.weekly-history-section {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.weekly-history-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.weekly-history-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.weekly-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
}

.weekly-avg-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

/* Визуальный чарт столбиков */
.weekly-bars-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.5rem 0;
}

.weekly-bar-row {
  display: grid;
  grid-template-columns: 135px 1fr 65px;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
}

.weekly-bar-label {
  color: var(--muted, #94a3b8);
  white-space: nowrap;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  overflow: visible;
}

.weekly-bar-row.current .weekly-bar-label {
  color: #ff3b30;
  font-weight: 700;
}

.weekly-bar-track {
  height: 22px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.weekly-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.4), #0284c7);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.weekly-bar-fill.current-fill {
  background: linear-gradient(90deg, #ff3b30, #4facfe);
  box-shadow: 0 0 10px rgba(255, 59, 48, 0.35);
}

.weekly-bar-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
  z-index: 2;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.weekly-bar-val {
  text-align: right;
  font-weight: 700;
  color: #f1f5f9;
  font-family: var(--font-mono, monospace);
}

.weekly-bar-row.current .weekly-bar-val {
  color: #ff3b30;
}

/* Список прошлых недель */
.weekly-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 160px;
  overflow-y: auto;
  padding-right: 4px;
}

.weekly-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 0.8rem;
  transition: background 0.15s ease;
}

.weekly-history-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.weekly-history-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.weekly-history-dates {
  font-weight: 600;
  color: #e2e8f0;
}

.weekly-history-runs-count {
  font-size: 0.72rem;
  color: var(--muted, #94a3b8);
}

.weekly-history-right {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.weekly-history-km {
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-mono, monospace);
}

.weekly-history-diff {
  font-size: 0.72rem;
  font-weight: 600;
}

.weekly-history-diff.ahead {
  color: #34d399;
}

.weekly-history-diff.behind {
  color: #fbbf24;
}

.hero-metric-subtext {
  font-size: 0.72rem;
  color: var(--muted, #94a3b8);
  margin-top: 0.25rem;
  line-height: 1.2;
}




/* ==========================================================================
   ЭКРАН «СЕГОДНЯ» (#view-today)
   ========================================================================== */
.today-screen-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 1024px) {
  .today-screen-grid {
    grid-template-columns: 1fr;
  }
}

.today-hero-card {
  background: linear-gradient(145deg, rgba(16, 26, 46, 0.48), rgba(9, 14, 26, 0.62));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 242, 254, 0.25);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5), 0 0 35px -10px rgba(0, 242, 254, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 1.85rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.today-hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3.5px;
  background: linear-gradient(90deg, #00f2fe 0%, #10b981 40%, #8b5cf6 80%, #f59e0b 100%);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.6);
  z-index: 2;
}

.today-hero-card::after {
  content: "";
  position: absolute;
  top: 15px;
  right: 15px;
  width: 250px;
  height: 270px;
  background-image: url("/static/chuvash-tree.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.26;
  pointer-events: none;
  filter: drop-shadow(0 0 20px rgba(0, 242, 254, 0.6));
  z-index: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.today-hero-card:hover::after {
  opacity: 0.40;
  transform: scale(1.04);
}

.today-hero-card > * {
  position: relative;
  z-index: 1;
}

.today-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.today-hero-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.today-date-pill {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.today-kind-badge {
  background: rgba(0, 242, 254, 0.12);
  color: #00f2fe;
  border: 1px solid rgba(0, 242, 254, 0.35);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

.today-spotlight-title {
  font-size: 1.95rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.today-spotlight-detail {
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 1.5rem 0;
}

.today-metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .today-metrics-strip {
    grid-template-columns: 1fr;
  }
}

.today-metric-tile {
  background: rgba(13, 20, 36, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.1rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.today-metric-tile:hover {
  background: rgba(18, 28, 48, 0.8);
  border-color: rgba(0, 242, 254, 0.25);
  transform: translateY(-1px);
}

.today-metric-tile .metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.today-metric-tile .metric-big-num {
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
}

.today-metric-tile .metric-unit {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.today-metric-tile .metric-sub-badge {
  display: inline-block;
  font-size: 0.75rem;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  margin-left: 0.5rem;
  vertical-align: middle;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.today-phases-box {
  background: rgba(10, 16, 30, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 0.95rem 1.15rem;
  margin-bottom: 1.35rem;
}

.phases-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.phases-content {
  font-size: 0.92rem;
  color: #f1f5f9;
  line-height: 1.5;
}

.today-ai-rationale-box {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(0, 242, 254, 0.04) 100%);
  border-left: 3.5px solid #8b5cf6;
  border-top: 1px solid rgba(139, 92, 246, 0.15);
  border-right: 1px solid rgba(139, 92, 246, 0.1);
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: 0 14px 14px 0;
  padding: 1.1rem 1.35rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.08);
}

.ai-rationale-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #a78bfa;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  letter-spacing: 0.02em;
}

.ai-rationale-body {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

.today-action-buttons {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.today-action-buttons button {
  flex: 1;
  min-width: 140px;
}

/* Карточка завершённой тренировки дня */
.today-done-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 14px;
  flex-wrap: wrap;
}

[data-theme="light"] .today-done-box {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.today-done-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.today-done-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.today-done-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.today-done-text strong {
  color: #10b981;
  font-size: 0.98rem;
}

[data-theme="light"] .today-done-text strong {
  color: #15803d;
}

/* Карточки правой колонки */
.today-side-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.today-readiness-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 1.4rem;
}

.readiness-gauge-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 1rem 0;
}

.readiness-circle-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.gauge-huge-num {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: #ffffff;
}

.gauge-pct-sign {
  font-size: 0.9rem;
  color: #ff3b30;
}

.readiness-headline {
  display: block;
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.readiness-factors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.factor-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
}

.factor-icon {
  font-size: 1.25rem;
}

/* Утренний чекин */
.feel-emoji-group {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.feel-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.5rem 0.25rem;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feel-btn:hover, .feel-btn.active {
  background: rgba(255, 59, 48, 0.15);
  border-color: #ff3b30;
  transform: translateY(-2px);
}

.pain-tags-select {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.tag-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tag-chip:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tag-chip.active {
  background: rgba(255, 59, 48, 0.2);
  border-color: #ff3b30;
  color: #ff3b30;
  font-weight: 600;
}

/* ==========================================================================
   ОНБОРДИНГ (#view-onboarding)
   ========================================================================== */
.onboarding-container {
  max-width: 800px;
  margin: 1.5rem auto;
}

.onboarding-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 2.25rem;
}

.onboarding-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.5rem 0 2rem 0;
  position: relative;
}

.step-dot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  z-index: 2;
  cursor: pointer;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.25s ease;
}

.step-name {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.step-dot-wrap.active .step-num {
  background: #ff3b30;
  color: #080e1a;
  border-color: #ff3b30;
  box-shadow: 0 0 15px rgba(255, 59, 48, 0.5);
}

.step-dot-wrap.active .step-name {
  color: #ff3b30;
  font-weight: 600;
}

.step-connector {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 0.5rem;
  margin-top: -16px;
}

.ob-step-pane {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.ob-step-pane.active {
  display: block;
}

.ob-pane-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.onboarding-nav-bar {
  display: flex;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   МОДАЛКА АДАПТАЦИИ (#adaptation-modal)
   ========================================================================== */
.adapt-reason-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 1rem;
}

.adapt-reason-icon {
  font-size: 1.75rem;
}

.adaptation-options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.adapt-option-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.adapt-option-card:hover {
  border-color: rgba(255, 59, 48, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.adapt-option-card.selected {
  border-color: #ff3b30;
  background: rgba(255, 59, 48, 0.08);
  box-shadow: 0 0 15px rgba(255, 59, 48, 0.15);
}

.adapt-diff-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
}

.diff-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.diff-col {
  padding: 0.75rem;
  border-radius: 8px;
}

.diff-col.before {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.diff-col.after {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.diff-col-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
}

.diff-col.before .diff-col-tag { color: #f87171; }
.diff-col.after .diff-col-tag { color: #34d399; }

/* Разбор пробежки: Decoupling и выводы */
.decoupling-box {
  background: rgba(255, 59, 48, 0.05);
  border: 1px solid rgba(255, 59, 48, 0.2);
  border-radius: 10px;
  padding: 0.85rem;
  margin-top: 0.5rem;
}

.conclusions-list {
  padding-left: 1.25rem;
  margin: 0.4rem 0;
  color: #e2e8f0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.conclusions-list li {
  margin-bottom: 0.35rem;
}

.recovery-action-box {
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid #10b981;
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #a7f3d0;
}


/* Фикс SVG и центрирования в круге готовности */
.readiness-circle-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.readiness-circle-wrap .circular-gauge {
  width: 100%;
  height: 100%;
}

.readiness-circle-wrap .gauge-inner-val {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: baseline;
  justify-content: center;
  pointer-events: none;
}

/* Фикс высоты и отступов чекина */
.today-checkin-card {
  overflow: visible !important;
  max-height: none !important;
}

.today-screen-grid {
  margin-bottom: 2.5rem;
}


/* Глобальное разрешение вертикального скролла на всех экранах */
html, body {
  height: auto !important;
  min-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.shell {
  height: auto !important;
  min-height: 100vh !important;
  overflow: visible !important;
}

.view {
  height: auto !important;
  overflow: visible !important;
  padding-bottom: 4rem !important;
}

/* Кнопка прокрутки вниз в чате (как в Telegram / WhatsApp) */
.chat-container-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.chat-scroll-down-btn {
  position: absolute;
  right: 1.5rem;
  bottom: 1.25rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 59, 48, 0.4);
  color: #ff3b30;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 12px rgba(255, 59, 48, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
}

.chat-scroll-down-btn:hover {
  background: rgba(255, 59, 48, 0.2);
  border-color: #ff3b30;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 24px rgba(255, 59, 48, 0.4);
}

.chat-scroll-down-btn.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.85);
}

/* ==========================================================================
   СТИЛИ: БЛОК НАСТРОЕК СИСТЕМНЫХ ПРОМПТОВ ИИ-ТРЕНЕРА
   ========================================================================== */
.system-prompts-card {
  border: 1px solid rgba(255, 59, 48, 0.25) !important;
  background: radial-gradient(circle at top right, rgba(255, 59, 48, 0.05), transparent 70%), var(--panel) !important;
}

.persona-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.persona-card-btn {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
}

.persona-card-btn:hover {
  border-color: rgba(255, 59, 48, 0.4);
  background: rgba(255, 59, 48, 0.04);
  transform: translateY(-1px);
}

.persona-card-btn.active {
  background: rgba(255, 59, 48, 0.08);
  border-color: #ff3b30;
  box-shadow: 0 0 16px rgba(255, 59, 48, 0.2);
}

.persona-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.persona-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.persona-card-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.persona-card-btn.active .persona-card-badge {
  background: rgba(255, 59, 48, 0.2);
  color: #ff3b30;
}

.persona-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.prompt-toggles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.prompt-toggle-box {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prompt-toggle-box:hover {
  border-color: rgba(255, 59, 48, 0.3);
}

.prompt-toggle-box input[type="checkbox"] {
  accent-color: #ff3b30;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.prompt-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.prompt-toggle-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.prompt-toggle-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.prompt-textarea-box {
  margin-top: 1rem;
}

.prompt-textarea {
  width: 100%;
  min-height: 110px;
  padding: 0.75rem 1rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.prompt-textarea:focus {
  border-color: #ff3b30;
  box-shadow: 0 0 14px rgba(255, 59, 48, 0.25);
}

/* ==========================================================================
   ЮРИДИЧЕСКИЙ БЛОК: Cookie-баннер и Медицинский дисклеймер
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 720px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 59, 48, 0.35);
  border-radius: 16px;
  padding: 1.1rem 1.5rem;
  z-index: 99999;
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 59, 48, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cookie-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.cookie-text {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
}

.cookie-link {
  color: #ff3b30;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-actions {
  flex-shrink: 0;
}

.btn-cookie-accept {
  background: linear-gradient(135deg, #ff3b30 0%, #4facfe 100%);
  color: #041424;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 1.2rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-cookie-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 59, 48, 0.4);
}

.legal-compliance-card {
  margin-top: 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.medical-disclaimer-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: #fca5a5;
  line-height: 1.45;
}

.legal-links-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.legal-doc-link {
  color: #ff3b30;
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: opacity 0.2s;
}

.legal-doc-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

@media (max-width: 640px) {
  .cookie-banner {
    bottom: 4.5rem; /* над нижней мобильной панелью */
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.75rem;
  }
  .cookie-actions {
    display: flex;
    justify-content: flex-end;
  }
  .btn-cookie-accept {
    width: 100%;
  }
}

/* Стили блока сравнения с похожими пробежками (Динамика формы) */
.similar-comparison-box {
  background: var(--bg-card, #0f172a);
  border: 1px solid rgba(255, 59, 48, 0.25);
  border-radius: 12px;
  padding: 1.1rem;
  margin-top: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.similar-comp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}

.similar-comp-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.similar-comp-icon {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 59, 48, 0.12);
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 8px;
}

.similar-comp-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  margin: 0;
}

.similar-comp-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted, #94a3b8);
}

.similar-comp-verdict-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #ff3b30;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.9rem;
}

.similar-comp-verdict-card.verdict-positive {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.07);
}

.similar-comp-verdict-card.verdict-fatigue {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.07);
}

.verdict-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  margin-bottom: 0.25rem;
}

.verdict-text {
  line-height: 1.45;
  color: var(--text-secondary, #cbd5e1);
}

.similar-comp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

@media (max-width: 640px) {
  .similar-comp-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

.similar-metric-col {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.similar-metric-col.current {
  border-color: rgba(255, 59, 48, 0.3);
  background: rgba(255, 59, 48, 0.04);
}

.similar-metric-col.delta {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.similar-metric-col .col-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 0.25rem;
}

.sim-metric-val {
  font-family: var(--font-mono, monospace);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
}

.sim-metric-sub {
  font-size: 0.78rem;
  color: var(--text-secondary, #cbd5e1);
  font-family: var(--font-mono, monospace);
  margin-top: 0.15rem;
}

.sim-delta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  margin-bottom: 0.15rem;
}

.sim-delta-lbl {
  color: var(--text-muted, #94a3b8);
}

.sim-delta-val {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
}

.sim-delta-val.good {
  color: #10b981;
}

.sim-delta-val.warn {
  color: #f59e0b;
}

.sim-delta-val.neutral {
  color: #94a3b8;
}

.similar-runs-history {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
}

.similar-history-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 0.45rem;
}

.similar-runs-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.similar-run-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.similar-run-item:hover {
  background: rgba(255, 59, 48, 0.08);
  border-color: rgba(255, 59, 48, 0.25);
}

.similar-run-item-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.similar-run-date {
  font-weight: 600;
  color: var(--text-primary, #ffffff);
}

.similar-run-dist {
  color: var(--text-muted, #94a3b8);
}

.similar-run-item-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.77rem;
}

.similar-run-pace {
  color: #ff3b30;
}

.similar-run-hr {
  color: #f43f5e;
}

/* ==========================================================================
   СВЕТЛАЯ ТЕМА: БЛОК СРАВНЕНИЯ И КАЛЕНДАРЬ
   ========================================================================== */

[data-theme="light"] .cal-km-badge {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

[data-theme="light"] .cal-pace-text {
  color: #475569;
}

[data-theme="light"] .cal-hr-text {
  color: #e11d48;
}

[data-theme="light"] .calendar-day.has-activity {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

[data-theme="light"] .calendar-day.has-activity .cal-day-num {
  color: #047857;
}

[data-theme="light"] .calendar-day.has-activity:hover,
[data-theme="light"] .calendar-day.selected {
  background: #dcfce7;
  border-color: #22c55e;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

[data-theme="light"] .calendar-day.selected .cal-day-num {
  color: #0f172a;
}

[data-theme="light"] .similar-comparison-box {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .similar-comp-title {
  color: #0f172a;
}

[data-theme="light"] .similar-comp-subtitle {
  color: #64748b;
}

[data-theme="light"] .similar-comp-icon {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}

[data-theme="light"] .similar-comp-verdict-card {
  background: #f8fafc;
  border-color: #e2e8f0;
  border-left-color: #0284c7;
}

[data-theme="light"] .similar-comp-verdict-card.verdict-positive {
  background: #f0fdf4;
  border-left-color: #10b981;
}

[data-theme="light"] .similar-comp-verdict-card.verdict-fatigue {
  background: #fffbeb;
  border-left-color: #f59e0b;
}

[data-theme="light"] .verdict-title {
  color: #0f172a;
}

[data-theme="light"] .verdict-text {
  color: #334155;
}

[data-theme="light"] .similar-metric-col {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .similar-metric-col.current {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

[data-theme="light"] .similar-metric-col.delta {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .similar-metric-col .col-tag {
  color: #64748b;
}

[data-theme="light"] .sim-metric-val {
  color: #0f172a;
}

[data-theme="light"] .sim-metric-sub {
  color: #475569;
}

[data-theme="light"] .sim-delta-lbl {
  color: #64748b;
}

[data-theme="light"] .sim-delta-val.neutral {
  color: #64748b;
}

[data-theme="light"] .sim-delta-val.good {
  color: #059669;
}

[data-theme="light"] .sim-delta-val.warn {
  color: #d97706;
}

[data-theme="light"] .similar-runs-history {
  border-top-color: #e2e8f0;
}

[data-theme="light"] .similar-history-title {
  color: #475569;
}

[data-theme="light"] .similar-run-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .similar-run-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="light"] .similar-run-date {
  color: #0f172a;
}

[data-theme="light"] .similar-run-dist {
  color: #64748b;
}

[data-theme="light"] .similar-run-pace {
  color: #0284c7;
}

[data-theme="light"] .similar-run-hr {
  color: #e11d48;
}

/* ==========================================================================
   КОМПЛЕКСНОЕ ТЁПЛОЕ ОФОРМЛЕНИЕ СВЕТЛОЙ ТЕМЫ ДЛЯ ВСЕХ ЭКРАНОВ
   Убирает резкий холодный свет, заменяет неон на спокойный благородный акцент
   ========================================================================== */

/* 1. Шапка и навигация */
[data-theme="light"] .app-header {
  background: #ffffff;
  border-bottom-color: #e9e4db;
  box-shadow: 0 1px 4px rgba(45, 38, 28, 0.04);
}

[data-theme="light"] .brand-title {
  color: #24211d;
}

[data-theme="light"] .brand-title-neon {
  color: #059669;
  text-shadow: none;
}

[data-theme="light"] .app-nav {
  background: #f7f4ef;
  border-color: #e9e4db;
}

[data-theme="light"] .nav-btn {
  color: #5e5950;
}

[data-theme="light"] .nav-btn:hover {
  color: #24211d;
}

[data-theme="light"] .nav-btn.active {
  background: #ffffff;
  color: #059669;
  border-color: #d1fae5;
  box-shadow: 0 2px 8px rgba(45, 38, 28, 0.06);
  text-shadow: none;
}

[data-theme="light"] .header-search-box input {
  background: #f7f4ef;
  border-color: #e9e4db;
  color: #24211d;
}

[data-theme="light"] .header-search-box input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
  background: #ffffff;
}

[data-theme="light"] .header-search-box .search-icon {
  color: #8c8477;
}

[data-theme="light"] .header-user-pill {
  background: #f7f4ef;
  border-color: #e9e4db;
  color: #24211d;
}

[data-theme="light"] .header-user-pill:hover {
  border-color: #059669;
}

[data-theme="light"] .header-role-pill {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}

[data-theme="light"] .user-avatar-circle {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}

[data-theme="light"] .header-token-pill {
  background: #fffbeb;
  border-color: #fde68a;
  box-shadow: none;
}

[data-theme="light"] .header-token-pill:hover {
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

[data-theme="light"] .notif-dot {
  background: #059669;
  box-shadow: 0 0 6px rgba(5, 150, 105, 0.5);
}

/* 2. Панели и карточки дашборда */
[data-theme="light"] .panel,
[data-theme="light"] .col-recent-activities,
[data-theme="light"] .upcoming-plan-card {
  background: #ffffff;
  border-color: #e9e4db;
  box-shadow: 0 4px 18px rgba(45, 38, 28, 0.05);
}

[data-theme="light"] .activity-item,
[data-theme="light"] .activity-card {
  background: #fcfbf9;
  border-color: #e9e4db;
}

[data-theme="light"] .activity-item:hover,
[data-theme="light"] .activity-card:hover {
  background: #f7f4ef;
  border-color: #d8d0c2;
}

[data-theme="light"] .activity-card.active {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.12) !important;
}

[data-theme="light"] .activity-name {
  color: #24211d;
}

[data-theme="light"] .activity-date {
  color: #8c8477;
}

[data-theme="light"] .activity-km {
  color: #059669;
}

/* 3. Кнопки и контролы в плане тренировок */
[data-theme="light"] .btn-cyan-outline {
  border-color: #059669;
  color: #059669;
  background: transparent;
}

[data-theme="light"] .btn-cyan-outline:hover {
  background: #ecfdf5;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15);
}

[data-theme="light"] .btn-cyan-gradient {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.25);
}

[data-theme="light"] .btn-cyan-gradient:hover {
  box-shadow: 0 6px 22px rgba(5, 150, 105, 0.35);
}

[data-theme="light"] .plan-week-bar {
  background: #f7f4ef;
  border-color: #e9e4db;
}

[data-theme="light"] .week-nav-btn {
  background: #ffffff;
  border-color: #d8d0c2;
  color: #24211d;
}

[data-theme="light"] .week-nav-btn:hover {
  background: #ede8e0;
  border-color: #c4baab;
  color: #059669;
  box-shadow: none;
}

[data-theme="light"] .week-current-pill {
  background: #ffffff;
  border-color: #e9e4db;
}

[data-theme="light"] .week-label-text {
  color: #24211d;
}

[data-theme="light"] .upcoming-workout-card {
  background: #fcfbf9;
  border-color: #e9e4db;
}

[data-theme="light"] .upcoming-workout-card:hover {
  background: #f7f4ef;
  border-color: #d8d0c2;
  box-shadow: 0 4px 16px rgba(45, 38, 28, 0.06);
}

[data-theme="light"] .workout-title-text {
  color: #24211d;
}

[data-theme="light"] .workout-day-pill {
  background: #ede8e0;
  color: #5e5950;
  border-color: #d8d0c2;
}

[data-theme="light"] .btn-start-workout {
  background: #ffffff;
  border-color: #d8d0c2;
  color: #24211d;
}

[data-theme="light"] .btn-start-workout:hover {
  background: #f7f4ef;
  border-color: #059669;
  color: #059669;
}

[data-theme="light"] .btn-ai-workout {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}

[data-theme="light"] .btn-ai-workout:hover {
  background: #d1fae5;
  box-shadow: none;
}

[data-theme="light"] .workout-pace-badge {
  background: #f7f4ef;
  border-color: #e9e4db;
  color: #5e5950;
}

[data-theme="light"] .workout-fact-badge {
  background: #f7f4ef;
  border-color: #e9e4db;
  color: #24211d;
}

[data-theme="light"] .workout-phases-text {
  color: #5e5950;
}

[data-theme="light"] .workout-tip-text {
  background: #fefce8;
  border-color: #fef08a;
  color: #854d0e;
}

/* 4. Карточка тренировки на сегодня (Today Workout) */
[data-theme="light"] .today-workout-hero-card {
  background: #ffffff;
  border-color: #e9e4db;
  box-shadow: 0 4px 20px rgba(45, 38, 28, 0.05);
}

[data-theme="light"] .readiness-gauge-box {
  background: #f7f4ef;
  border-color: #e9e4db;
}

[data-theme="light"] .today-workout-detail-box {
  background: #fcfbf9;
  border-color: #e9e4db;
}

[data-theme="light"] .today-workout-title {
  color: #24211d;
}

[data-theme="light"] .why-today-box {
  background: #f0fdf4;
  border-left-color: #059669;
  border-color: #bbf7d0;
}

[data-theme="light"] .why-today-text {
  color: #166534;
}

/* 5. Детали тренировки (Лента / Feed) */
[data-theme="light"] .detail-panel {
  background: #ffffff;
  border-color: #e9e4db;
}

[data-theme="light"] .calendar-wrapper {
  background: #ffffff;
  border-color: #e9e4db;
  box-shadow: 0 4px 18px rgba(45, 38, 28, 0.05);
}

[data-theme="light"] .calendar-header h3 {
  color: #24211d;
}

[data-theme="light"] .calendar-day-header {
  color: #8c8477;
}

[data-theme="light"] .calendar-day {
  background: #fcfbf9;
  border-color: #e9e4db;
}

[data-theme="light"] .calendar-day:hover {
  background: #f7f4ef;
  border-color: #d8d0c2;
}

[data-theme="light"] .metric-tile {
  background: #f7f4ef;
  border-color: #e9e4db;
}

[data-theme="light"] .metric-tile-label {
  color: #8c8477;
}

[data-theme="light"] .metric-tile-val {
  color: #24211d;
}

[data-theme="light"] .laps-table th {
  background: #f7f4ef;
  color: #5e5950;
  border-bottom-color: #e9e4db;
}

[data-theme="light"] .laps-table td {
  border-bottom-color: #f7f4ef;
  color: #24211d;
}

[data-theme="light"] .laps-table tr:hover td {
  background: #f7f4ef;
}

[data-theme="light"] .lap-split-btn {
  color: #5e5950;
}

[data-theme="light"] .lap-split-btn.active {
  background: #ffffff;
  color: #059669;
  box-shadow: 0 1px 3px rgba(45, 38, 28, 0.08);
}

[data-theme="light"] .laps-split-selector {
  background: #f7f4ef;
  border-color: #e9e4db;
}

/* 6. Чат с ИИ */
[data-theme="light"] .chat-header-bar {
  background: #ffffff;
  border-color: #e9e4db;
}

[data-theme="light"] .chat-header-bar strong {
  color: #24211d;
}

[data-theme="light"] .message.bot {
  background: #ffffff;
  border-color: #e9e4db;
  color: #24211d;
  box-shadow: 0 2px 10px rgba(45, 38, 28, 0.04);
}

[data-theme="light"] .message.user {
  background: #059669;
  color: #ffffff;
}

[data-theme="light"] .chat-composer {
  background: #ffffff;
  border-color: #d8d0c2;
  box-shadow: 0 4px 18px rgba(45, 38, 28, 0.06);
}

[data-theme="light"] .chat-composer textarea {
  color: #24211d;
}

[data-theme="light"] .prompt-chip {
  background: #ffffff;
  border-color: #e9e4db;
  color: #5e5950;
}

[data-theme="light"] .prompt-chip:hover {
  background: #f7f4ef;
  border-color: #d8d0c2;
  color: #24211d;
}

[data-theme="light"] .prompt-chip-tg {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}

[data-theme="light"] .prompt-chip-tg:hover {
  background: #d1fae5;
  box-shadow: none;
}

/* 7. Настройки и профиль */
[data-theme="light"] .settings-subnav {
  background: #ffffff;
  border-color: #e9e4db;
  box-shadow: 0 4px 16px rgba(45, 38, 28, 0.05);
}

[data-theme="light"] .settings-subnav-btn {
  color: #5e5950;
}

[data-theme="light"] .settings-subnav-btn:hover {
  color: #24211d;
}

[data-theme="light"] .settings-subnav-btn.active {
  background: #f7f4ef;
  color: #059669;
  border-color: #e9e4db;
}

[data-theme="light"] .settings-card,
[data-theme="light"] .watch-panes-wrapper {
  background: #ffffff;
  border-color: #e9e4db;
  box-shadow: 0 4px 18px rgba(45, 38, 28, 0.05);
}

[data-theme="light"] .modern-input,
[data-theme="light"] select,
[data-theme="light"] textarea,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="email"] {
  background: #fcfbf9;
  border-color: #d8d0c2;
  color: #24211d;
}

[data-theme="light"] .modern-input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] input:focus {
  background: #ffffff;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

[data-theme="light"] .watch-tab-btn {
  background: #f7f4ef;
  border-color: #e9e4db;
  color: #5e5950;
}

[data-theme="light"] .watch-tab-btn.active {
  background: #ffffff;
  color: #059669;
  border-color: #059669;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.12);
}

[data-theme="light"] .watch-tab-dot.active {
  background: #059669;
  box-shadow: 0 0 6px rgba(5, 150, 105, 0.5);
}

/* 8. Модальные окна */
[data-theme="light"] .modal-card {
  background: #ffffff;
  border-color: #e9e4db;
  box-shadow: 0 20px 45px rgba(45, 38, 28, 0.15);
}

[data-theme="light"] .modal-header h3 {
  color: #24211d;
}

[data-theme="light"] .icon-btn-sm {
  background: #f7f4ef;
  border-color: #e9e4db;
  color: #5e5950;
}

[data-theme="light"] .icon-btn-sm:hover {
  background: #ede8e0;
  color: #24211d;
}

/* 9. Выбор вариантов онбординга */
[data-theme="light"] .choice-btn {
  background: #f7f4ef;
  border-color: #e9e4db;
  color: #5e5950;
}

[data-theme="light"] .choice-btn:hover {
  background: #ede8e0;
  color: #24211d;
}

[data-theme="light"] .choice-btn.active {
  background: #ecfdf5;
  border-color: #059669;
  color: #047857;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15);
}

/* ==========================================================================
   CHUNRUN NEO-CHUVASH EDITION: 3-КОЛОНОЧНЫЙ ДАШБОРД, ANTI-GRAVITY & AI PROMPTS
   ========================================================================== */

/* Базовый стеклянный контейнер с матовым эффектом и градиентной окантовкой */
.glass-card {
  background: rgba(13, 17, 23, 0.72) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 59, 48, 0.18) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 30px -10px rgba(255, 59, 48, 0.2);
  border-radius: 20px;
}

/* 2-Колоночный Desktop Layout: Центральный Чат + AI Prompts */
.chunrun-desktop-chat-layout,
.chunrun-desktop-tri-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 360px;
  gap: 1.25rem;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  height: 100%;
  max-height: calc(100vh - 1.5rem);
  box-sizing: border-box;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 1100px) {
  .chunrun-desktop-chat-layout,
  .chunrun-desktop-tri-layout {
    grid-template-columns: 1fr 310px;
    gap: 1rem;
  }
}

@media (max-width: 860px) {
  .chunrun-desktop-chat-layout,
  .chunrun-desktop-tri-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    padding: 0.5rem;
  }
  .ai-prompts-side-panel {
    display: none !important;
  }
}

/* ---------------------------------------------------------
   ЦЕНТРАЛЬНАЯ КОЛОНКА: ЦЕНТРАЛИЗОВАННЫЙ ЧАТ МЕССЕНДЖЕРА
   --------------------------------------------------------- */
.chunrun-central-chat-col {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
  overflow: hidden;
  height: 100%;
}

.chunrun-central-chat-col .chat-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.75rem;
}

.chunrun-central-chat-col .chat-model-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.chunrun-central-chat-col .bot-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9500 0%, #ff2d55 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 0 16px rgba(255, 59, 48, 0.5);
}

.chunrun-central-chat-col .bot-icon svg {
  stroke: #ffffff;
  width: 18px;
  height: 18px;
}

/* Логика мессенджера: сообщения внизу, скролл вверх */
.messenger-flow {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 0.5rem;
  gap: 0.85rem;
}

.chunrun-central-chat-col .chat-composer {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 16px;
  padding: 0.5rem 0.65rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.chunrun-central-chat-col .chat-composer textarea {
  background: transparent;
  border: none;
  color: #ffffff;
  resize: none;
  font-size: 0.92rem;
  padding: 0.4rem 0.5rem;
  line-height: 1.4;
  flex: 1;
  max-height: 120px;
}

.chunrun-central-chat-col .chat-composer textarea:focus {
  outline: none;
  box-shadow: none;
}

.btn-send-chunrun {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff9500 0%, #ff2d55 100%);
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 0 14px rgba(255, 59, 48, 0.5);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-send-chunrun:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 59, 48, 0.7);
}

/* ---------------------------------------------------------
   ПРАВАЯ ПАНЕЛЬ: AI SYSTEM PROMPTS (NEO-CHUVASH STYLE)
   --------------------------------------------------------- */
.ai-prompts-side-panel {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  overflow-y: auto;
  gap: 1.15rem;
}

.prompts-panel-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
}

.panel-tag-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.chuvash-solar-icon {
  font-size: 1.1rem;
}

.prompts-panel-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin: 0;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.panel-section.flex-grow {
  flex: 1;
}

.prompts-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prompts-field-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ff9500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.neon-badge-sm {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 59, 48, 0.18);
  color: #ff3b30;
  font-weight: 700;
}

.persona-chips-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.side-persona-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.side-persona-btn:hover {
  border-color: rgba(255, 149, 0, 0.4);
  background: rgba(255, 149, 0, 0.06);
}

.side-persona-btn.active {
  background: rgba(255, 59, 48, 0.12);
  border-color: #ff3b30;
  box-shadow: 0 0 14px rgba(255, 59, 48, 0.25);
}

.side-persona-btn .persona-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.side-persona-btn .persona-info {
  display: flex;
  flex-direction: column;
}

.side-persona-btn strong {
  font-size: 0.8rem;
  color: #ffffff;
}

.side-persona-btn small {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Футуристичные тоглы на правой панели */
.side-toggles-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.side-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.side-toggle-row:hover {
  border-color: rgba(255, 59, 48, 0.35);
}

.side-toggle-row .toggle-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.side-toggle-row strong {
  font-size: 0.78rem;
  color: #ffffff;
}

.side-toggle-row small {
  font-size: 0.66rem;
  color: var(--text-muted);
}

.chunrun-switch {
  accent-color: #ff3b30;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Текстовая область */
.side-prompt-textarea {
  width: 100%;
  min-height: 80px;
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  padding: 0.6rem;
  font-size: 0.78rem;
  line-height: 1.4;
  resize: vertical;
  box-sizing: border-box;
}

.side-prompt-textarea:focus {
  border-color: #ff9500;
  outline: none;
  box-shadow: 0 0 12px rgba(255, 149, 0, 0.25);
}

/* Кнопка Save / Apply */
.prompts-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: auto;
}

.btn-chunrun-gradient {
  background: linear-gradient(135deg, #00f2fe 0%, #10b981 100%);
  border: none;
  color: #03101e;
  font-weight: 800;
  font-size: 0.86rem;
  padding: 0.72rem 1.15rem;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.4);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  letter-spacing: 0.02em;
}

.btn-chunrun-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 242, 254, 0.6), 0 0 15px rgba(16, 185, 129, 0.4);
  color: #01060e;
}

.side-status-text {
  font-size: 0.72rem;
  color: #ff9500;
  text-align: center;
  min-height: 1rem;
}


/* ==========================================================================
   NEO-CHUVASH IDENTITY: СОЛЯРНЫЙ ОРНАМЕНТ И ЭТНИЧЕСКАЯ ГРАФИКА
   ========================================================================== */

/* Чувашский орнаментальный разделитель (Солярные руны / ромбы) */
.chuvash-pattern-line {
  height: 10px;
  width: 100%;
  margin: 0.25rem 0 0.65rem;
  background-repeat: repeat-x;
  background-position: center;
  background-size: 24px 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 10' fill='none'%3E%3Cpath d='M12 0 L18 5 L12 10 L6 5 Z' stroke='%23ff9500' stroke-width='1.2' fill='%23ff2d55' fill-opacity='0.28'/%3E%3Ccircle cx='12' cy='5' r='1.2' fill='%23fbbf24'/%3E%3Cpath d='M0 5 L3 2 M0 5 L3 8 M24 5 L21 2 M24 5 L21 8' stroke='%23ff9500' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
  opacity: 0.85;
  filter: drop-shadow(0 0 6px rgba(255, 149, 0, 0.4));
  flex-shrink: 0;
}

.chuvash-sub-tag {
  font-family: var(--font-script) !important;
  font-size: 0.95rem !important;
  color: #ff9500 !important;
  font-weight: 400 !important;
  margin-left: 0.35rem;
  letter-spacing: 0.02em;
}

.chuvash-solar-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 10px rgba(255, 149, 0, 0.6));
}

.chuvash-bot-sun {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 149, 0, 0.25) 0%, rgba(255, 45, 85, 0.15) 100%);
  border: 1px solid rgba(255, 149, 0, 0.5);
  box-shadow: 0 0 16px rgba(255, 149, 0, 0.45);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.prompt-chip-salam {
  background: rgba(255, 149, 0, 0.15) !important;
  border-color: rgba(255, 149, 0, 0.5) !important;
  color: #ff9500 !important;
  font-weight: 600;
}

.prompt-chip-salam:hover {
  background: rgba(255, 149, 0, 0.28) !important;
  border-color: #ff9500 !important;
  color: #fff !important;
  box-shadow: 0 0 12px rgba(255, 149, 0, 0.4);
}


/* Чувашские солярные иконки в меню десктопа */
@media (min-width: 769px) {
  .sidebar-nav .nav-btn .nav-icon-svg {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    padding: 6.5px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 149, 0, 0.2) !important;
    stroke: #94a3b8 !important;
    color: #94a3b8 !important;
    box-sizing: border-box !important;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .sidebar-nav .nav-btn:hover .nav-icon-svg {
    background: rgba(255, 149, 0, 0.12) !important;
    border-color: rgba(255, 149, 0, 0.5) !important;
    stroke: #ff9500 !important;
    color: #ff9500 !important;
    transform: translateY(-2px) scale(1.06) !important;
    box-shadow: 0 0 14px rgba(255, 149, 0, 0.4) !important;
  }

  .sidebar-nav .nav-btn.active .nav-icon-svg {
    background: linear-gradient(135deg, #00f2fe 0%, #10b981 100%) !important;
    border-color: rgba(255, 255, 255, 0.85) !important;
    stroke: #03101e !important;
    color: #03101e !important;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.65), 0 0 10px rgba(16, 185, 129, 0.5) !important;
    transform: scale(1.06) !important;
  }
}

/* ==========================================================================
   ПОЛНАЯ МОБИЛЬНАЯ АДАПТАЦИЯ (<= 768px): ЧАТ, ДАШБОРД, СЕГОДНЯ, ЛЕНТА, ВВОД
   ========================================================================== */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    -webkit-tap-highlight-color: transparent;
  }

  /* Защита от автозума в iOS при фокусе на полях ввода */
  input, textarea, select {
    font-size: 16px !important;
  }

  .app-main-viewport {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding-bottom: 0 !important;
    overflow-x: hidden !important;
  }

  /* Все обычные экраны имеют отступ снизу под нижнюю панель навигации */
  .view {
    padding: 0.85rem 0.75rem calc(68px + max(env(safe-area-inset-bottom, 0px), 18px)) !important;
    overflow-x: hidden !important;
  }

  .panel {
    padding: 1rem 0.85rem !important;
    border-radius: 16px !important;
    margin-bottom: 0.85rem !important;
  }

  /* -------------------------------------------------------------
     ЧАТ С ИИ НА ТЕЛЕФОНЕ: ФИКС ВЫСОТЫ, ПОЛЯ ВВОДА И СКРОЛЛА
     ------------------------------------------------------------- */
  #view-chat:not(.hidden) {
    height: calc(100dvh - 54px - 58px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(100dvh - 54px - 58px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    overflow: hidden !important;
    padding: 0.35rem 0.5rem 0.35rem !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
  }

  .chunrun-desktop-chat-layout {
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  .ai-prompts-side-panel {
    display: none !important;
  }

  .chunrun-central-chat-col {
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0.35rem 0.5rem 0.35rem !important;
    border-radius: 14px !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .chat-header-bar {
    padding: 0.2rem 0.35rem !important;
    margin-bottom: 0.15rem !important;
    flex-shrink: 0 !important;
    min-height: 28px !important;
  }

  .chat-model-info {
    gap: 0.35rem !important;
  }

  .chuvash-bot-sun {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    box-shadow: 0 0 8px rgba(255, 149, 0, 0.4) !important;
  }

  .chuvash-bot-sun svg {
    width: 14px !important;
    height: 14px !important;
  }

  .chat-model-info strong {
    font-size: 0.82rem !important;
    letter-spacing: -0.2px !important;
    white-space: nowrap !important;
  }

  #chat-active-model {
    display: none !important;
  }

  /* Скрываем широкую полосу орнамента в чате на мобильных, чтобы не красть место у сообщений */
  .chuvash-pattern-line {
    display: none !important;
  }

  .chat-header-actions span {
    display: none !important;
  }

  .chat-header-actions button {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.70rem !important;
    border-radius: 6px !important;
  }

  .chat-container-wrap {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .messages.messenger-flow {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 0.2rem !important;
    gap: 0.45rem !important;
  }

  .bubble {
    max-width: 92% !important;
    padding: 0.55rem 0.75rem !important;
    font-size: 0.85rem !important;
    border-radius: 12px !important;
  }

  .prompts-scroll {
    flex-shrink: 0 !important;
    padding: 0.15rem 0 !important;
    gap: 0.25rem !important;
    margin-bottom: 0.15rem !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .prompt-chip {
    font-size: 0.70rem !important;
    padding: 0.22rem 0.45rem !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
  }

  .chat-composer {
    flex-shrink: 0 !important;
    margin-top: 0.15rem !important;
    padding: 0.25rem 0.4rem !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: flex-end !important;
    gap: 0.35rem !important;
  }

  .chat-composer textarea {
    font-size: 15px !important;
    max-height: 52px !important;
    min-height: 36px !important;
    padding: 0.3rem 0.45rem !important;
    line-height: 1.3 !important;
  }

  .chat-composer button.btn-send {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
  }

  /* -------------------------------------------------------------
     ЭКРАН «СЕГОДНЯ» НА ТЕЛЕФОНЕ
     ------------------------------------------------------------- */
  .today-screen-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
    margin-bottom: 1.5rem !important;
  }

  .today-hero-card {
    padding: 1.15rem 1rem !important;
    border-radius: 16px !important;
  }

  /* Чувашские символы на карточках: компактный аккуратный герб в углу, не перекрывающий контент */
  .today-hero-card::after,
  .hero-performance-card::after {
    width: 85px !important;
    height: 90px !important;
    top: 8px !important;
    right: 8px !important;
    opacity: 0.10 !important;
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.25)) !important;
  }

  .today-hero-header {
    margin-bottom: 0.75rem !important;
    gap: 0.4rem !important;
  }

  .today-spotlight-title {
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.35rem !important;
  }

  .today-spotlight-detail {
    font-size: 0.88rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.85rem !important;
  }

  .today-metrics-strip {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.45rem !important;
    margin-bottom: 0.85rem !important;
  }

  .today-metric-tile {
    padding: 0.6rem 0.35rem !important;
    border-radius: 10px !important;
    text-align: center !important;
  }

  .today-metric-tile .metric-label {
    font-size: 0.66rem !important;
    margin-bottom: 0.2rem !important;
  }

  .today-metric-tile .metric-big-num {
    font-size: 1.2rem !important;
  }

  .today-metric-tile .metric-unit {
    font-size: 0.7rem !important;
  }

  .today-metric-tile .metric-sub-badge {
    display: block !important;
    margin: 0.2rem auto 0 auto !important;
    font-size: 0.66rem !important;
    padding: 0.15rem 0.35rem !important;
  }

  .today-phases-box {
    padding: 0.65rem 0.8rem !important;
    margin-bottom: 0.85rem !important;
  }

  .phases-content {
    font-size: 0.85rem !important;
  }

  .today-ai-rationale-box {
    padding: 0.75rem 0.85rem !important;
    margin-bottom: 0.85rem !important;
  }

  .ai-rationale-body {
    font-size: 0.85rem !important;
  }

  .today-action-buttons {
    display: flex !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
  }

  .today-action-buttons button {
    flex: 1 1 0 !important;
    min-width: 110px !important;
    padding: 0.65rem 0.45rem !important;
    font-size: 0.8rem !important;
  }

  .readiness-factors-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem !important;
  }

  .factor-pill {
    padding: 0.45rem 0.55rem !important;
    gap: 0.45rem !important;
    font-size: 0.8rem !important;
  }

  .feel-btn {
    padding: 0.5rem 0.2rem !important;
    font-size: 1.15rem !important;
  }

  /* -------------------------------------------------------------
     ЭКРАН «ДАШБОРД / ПЛАН» НА ТЕЛЕФОНЕ
     ------------------------------------------------------------- */
  .dashboard-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    padding-bottom: 1.5rem !important;
  }

  .col-performance-center {
    order: 1 !important;
  }

  .col-recent-activities {
    order: 2 !important;
    max-height: none !important;
  }

  .hero-performance-card {
    padding: 1.15rem 1rem !important;
  }

  .hero-metrics-strip {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.45rem !important;
  }

  .hero-metric-tile {
    min-width: 0 !important;
    padding: 0.6rem 0.45rem !important;
    text-align: center !important;
  }

  .hero-metric-label {
    font-size: 0.68rem !important;
  }

  .hero-metric-value-row .hr-number {
    font-size: 1.25rem !important;
  }

  .dash-kpi-trio-row,
  .dash-kpi-pair-row {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .kpi-tile-card {
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 1rem 0.85rem !important;
    overflow: hidden !important;
  }

  .kpi-card-header {
    width: 100% !important;
    box-sizing: border-box !important;
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
  }

  #dash-zones-total-badge {
    align-self: flex-start !important;
    white-space: normal !important;
    font-size: 0.7rem !important;
    padding: 2px 7px !important;
    max-width: 100% !important;
    word-break: break-word !important;
  }

  .zones-legend-grid {
    grid-template-columns: 1fr !important;
    gap: 0.35rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .zone-legend-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.35rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 0.72rem !important;
  }

  .vo2-number-row {
    flex-wrap: wrap !important;
    gap: 0.35rem 0.6rem !important;
    justify-content: center !important;
  }

  .vo2-val {
    font-size: 1.85rem !important;
  }

  .race-predictor-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .race-pred-item {
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 0.45rem 0.35rem !important;
  }

  .race-pred-item .race-time {
    font-size: 0.95rem !important;
  }

  .col-performance-center,
  .dashboard-grid,
  #view-analytics {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .plan-header-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
    width: 100% !important;
    margin-top: 0.5rem !important;
  }

  .plan-header-buttons button {
    flex: 1 1 0 !important;
    min-width: 100px !important;
    font-size: 0.78rem !important;
    padding: 0.45rem 0.55rem !important;
  }

  /* -------------------------------------------------------------
     КАРТОЧКА ЦЕЛЕВОГО СТАРТА И ПЕРИОДИЗАЦИИ НА ТЕЛЕФОНЕ
     ------------------------------------------------------------- */
  .target-race-card {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 1rem 0.85rem !important;
    border-radius: 16px !important;
    gap: 0.75rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .target-race-content {
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 0.55rem !important;
  }

  .target-race-icon-box {
    display: none !important;
  }

  .target-race-info {
    width: 100% !important;
    min-width: 0 !important;
    gap: 0.35rem !important;
  }

  .target-race-title-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.35rem !important;
    width: 100% !important;
  }

  .target-race-heading {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    word-break: break-word !important;
    margin: 0 !important;
  }

  .target-race-meta-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.35rem 0.65rem !important;
    font-size: 0.82rem !important;
    width: 100% !important;
  }

  .target-race-date-text,
  .target-race-countdown-highlight,
  .target-race-time-highlight {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
  }

  .target-race-desc {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    color: #cbd5e1 !important;
    word-break: break-word !important;
  }

  .target-race-card button {
    width: 100% !important;
    text-align: center !important;
    margin-top: 0.25rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  .season-roadmap-strip {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    padding: 0.4rem 0.1rem 0.5rem !important;
    margin-top: 0.5rem !important;
    gap: 0.35rem !important;
    box-sizing: border-box !important;
  }

  .season-roadmap-strip::-webkit-scrollbar {
    display: none !important;
  }

  .season-roadmap-strip .roadmap-step {
    flex: 0 0 auto !important;
    min-width: 90px !important;
    box-sizing: border-box !important;
  }

  .season-roadmap-strip span {
    flex: 0 0 auto !important;
  }

  /* -------------------------------------------------------------
     КАРТОЧКА НЕДЕЛЬНОГО ОБЪЕМА И ДИНАМИКИ НА ТЕЛЕФОНЕ
     ------------------------------------------------------------- */
  .weekly-mileage-card {
    padding: 1rem 0.85rem !important;
    border-radius: 16px !important;
    margin-top: 0.85rem !important;
    margin-bottom: 0.85rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .weekly-mileage-card .panel-header-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .section-tag-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.4rem 0.6rem !important;
  }

  .weekly-mode-toggle-group {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .weekly-mode-btn {
    flex: 1 1 0 !important;
    text-align: center !important;
    font-size: 0.76rem !important;
    padding: 0.45rem 0.3rem !important;
    white-space: nowrap !important;
  }

  .weekly-mileage-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
    margin-top: 0.85rem !important;
  }

  .weekly-current-section,
  .weekly-history-section {
    padding: 0.75rem 0.45rem !important;
    border-radius: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .week-days-strip {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 2px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .week-day-pill {
    padding: 0.35rem 1px !important;
    min-height: 48px !important;
    min-width: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .week-day-pill .wd-name {
    font-size: 0.62rem !important;
    white-space: nowrap !important;
  }

  .week-day-pill .wd-date {
    font-size: 0.54rem !important;
    letter-spacing: -0.4px !important;
    margin-bottom: 0.1rem !important;
    white-space: nowrap !important;
  }

  .week-day-pill .wd-km {
    font-size: 0.7rem !important;
    white-space: nowrap !important;
  }

  /* -------------------------------------------------------------
     ТРЕНИРОВКИ В ПЛАНЕ НА ТЕЛЕФОНЕ
     ------------------------------------------------------------- */
  .upcoming-workout-card {
    padding: 0.75rem 0.85rem !important;
  }

  .workout-card-top {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .workout-card-header-left {
    width: 100% !important;
    gap: 0.45rem !important;
  }

  .workout-actions {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 0.35rem !important;
  }

  /* -------------------------------------------------------------
     ЭКРАН «ЛЕНТА» НА ТЕЛЕФОНЕ: ВСЕ 7 ДНЕЙ В КАЛЕНДАРЕ И ГРАФИКЕ
     ------------------------------------------------------------- */
  .feed-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .feed-list-panel, .detail-panel {
    padding: 0.75rem 0.45rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .chart-wrapper {
    margin-bottom: 0.75rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .bars {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 3px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .bar {
    min-width: 0 !important;
    width: 100% !important;
  }

  .bar i {
    width: 100% !important;
    max-width: 18px !important;
  }

  .bar em {
    font-size: 0.68rem !important;
    white-space: nowrap !important;
  }

  .calendar-wrapper {
    padding: 0.45rem 0.2rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 2px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .calendar-day-header {
    font-size: 0.66rem !important;
    padding-bottom: 0.25rem !important;
  }

  .calendar-day {
    min-height: 44px !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 0.2rem 1px !important;
    font-size: 0.7rem !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .calendar-day .cal-day-num {
    font-size: 0.72rem !important;
    margin-bottom: 0.1rem !important;
    line-height: 1 !important;
  }

  .cal-km-badge {
    font-size: 0.56rem !important;
    padding: 1px 2px !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1 !important;
  }

  .cal-metrics-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1px !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  .cal-pace-text {
    font-size: 0.52rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .cal-hr-text {
    font-size: 0.52rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .cal-plan-badge {
    font-size: 0.52rem !important;
    padding: 1px 2px !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* -------------------------------------------------------------
     ЭКРАН «УЧЕНИКИ / КАБИНЕТ ТРЕНЕРА» НА ТЕЛЕФОНЕ
     ------------------------------------------------------------- */
  .coach-invite-strip {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.65rem !important;
    padding: 0.85rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .coach-invite-info {
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 0.45rem !important;
  }

  .invite-code-pill {
    font-size: 1rem !important;
    letter-spacing: 1.5px !important;
    padding: 0.2rem 0.5rem !important;
  }

  .coach-invite-strip button {
    width: 100% !important;
    text-align: center !important;
  }

  .students-layout {
    grid-template-columns: 1fr !important;
    height: auto !important;
    gap: 0.85rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .students-sidebar {
    height: auto !important;
    max-height: 260px !important;
    padding: 0.85rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .students-list {
    max-height: 190px !important;
    overflow-y: auto !important;
  }

  .student-workspace {
    height: auto !important;
    padding: 0.85rem 0.65rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .workspace-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.65rem !important;
    width: 100% !important;
  }

  .workspace-controls {
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
  }

  .workspace-controls button {
    flex: 1 1 0 !important;
    min-width: 90px !important;
    font-size: 0.76rem !important;
    padding: 0.45rem 0.4rem !important;
  }

  .student-week-kpi {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 0.45rem !important;
    width: 100% !important;
  }

  .student-kpi-item {
    padding: 0.5rem 0.25rem !important;
    text-align: center !important;
  }

  .student-kpi-item .kpi-label {
    font-size: 0.62rem !important;
  }

  .student-kpi-item strong {
    font-size: 0.9rem !important;
  }

  .student-week-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .activity-map {
    height: 220px !important;
  }

  .telemetry-wrapper {
    height: 180px !important;
  }

  /* -------------------------------------------------------------
     ЭКРАН «НАСТРОЙКИ» НА ТЕЛЕФОНЕ
     ------------------------------------------------------------- */
  #view-settings {
    padding: 0.85rem 0.75rem calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .settings-stack {
    gap: 1rem !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .settings-subnav {
    padding: 4px !important;
    gap: 0.35rem !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
  }

  .settings-subnav-btn {
    font-size: 0.78rem !important;
    padding: 0.45rem 0.65rem !important;
    flex: 0 0 auto !important;
  }

  .two-fields-row {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .sport-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .watch-tabs-bar {
    grid-template-columns: 1fr 1fr !important;
  }

  /* -------------------------------------------------------------
     МОДАЛЬНЫЕ ОКНА И ЭКРАН ВХОДА НА ТЕЛЕФОНЕ
     ------------------------------------------------------------- */
  .modal-backdrop {
    padding: 0.5rem !important;
    align-items: flex-end !important;
  }

  .modal-card {
    max-height: 85dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 1.25rem 1rem !important;
    border-radius: 20px 20px 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .modal-footer {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  .modal-footer button {
    flex: 1 1 0 !important;
    min-width: 100px !important;
  }

  .gate {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 1.25rem 0.75rem !important;
    align-items: flex-start !important;
  }

  .gate-card-modern {
    padding: 1.35rem 1.15rem !important;
    border-radius: 20px !important;
    gap: 1rem !important;
  }

  .auth-role-segmented {
    padding: 3px !important;
  }

  .role-seg-btn {
    padding: 0.5rem 0.4rem !important;
    font-size: 0.85rem !important;
  }
}

/* Месячный отчет над календарем */
.month-summary-card {
  margin: 1rem 0;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, rgba(16, 26, 46, 0.55) 0%, rgba(9, 14, 26, 0.75) 100%);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.month-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.month-summary-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.month-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

@media (max-width: 640px) {
  .month-summary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

.month-metric-item {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  transition: transform 0.2s, border-color 0.2s;
}

.month-metric-item:hover {
  border-color: rgba(0, 242, 254, 0.35);
  transform: translateY(-1px);
}

.month-metric-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.month-metric-val-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.month-metric-val {
  font-size: 1.18rem;
  font-weight: 800;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.1;
}

.month-metric-unit {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}

/* ==========================================================================
   CHUNRUN ГЛАВНЫЙ ПУБЛИЧНЫЙ ЛЕНДИНГ
   ========================================================================== */
.landing-navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 72px;
  background: rgba(7, 10, 19, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 100;
  transition: all 0.3s ease;
}

.landing-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.landing-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 59, 48, 0.6);
  object-fit: cover;
}

.landing-brand-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #ff9500 0%, #ff2d55 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.landing-nav-links a {
  color: #94a3b8;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.landing-nav-links a:hover {
  color: #00f2fe;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.landing-btn-login {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.35);
  color: #00f2fe;
  padding: 0.6rem 1.25rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.landing-btn-login:hover {
  background: rgba(0, 242, 254, 0.2);
  border-color: #00f2fe;
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.4);
  transform: translateY(-1px);
}

/* Hero Section */
.landing-hero {
  padding: 5.5rem 1.5rem 4rem;
  max-width: 1240px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.landing-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: rgba(0, 242, 254, 0.06);
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: #00f2fe;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.15);
}

.landing-hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.2vw, 3.8rem);
  font-weight: 900;
  line-height: 1.14;
  margin: 0 auto 1.5rem;
  max-width: 980px;
  letter-spacing: -0.02em;
}

.landing-gradient-text {
  background: linear-gradient(135deg, #00f2fe 0%, #38bdf8 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-hero-lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: #94a3b8;
  max-width: 760px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

.landing-hero-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

.landing-btn-hero {
  padding: 0.95rem 2.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.25s ease;
}

.landing-btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  padding: 0.95rem 2rem;
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.landing-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* 4 Pillars Metrics Grid */
.landing-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  text-align: left;
  max-width: 1200px;
  margin: 0 auto;
}

.landing-metric-card {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.landing-metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 254, 0.18);
}

.landing-metric-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.landing-metric-val {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.landing-metric-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #00f2fe;
  margin-bottom: 0.35rem;
}

.landing-metric-norm {
  font-size: 0.8rem;
  color: #10b981;
  font-weight: 600;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.landing-metric-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.45;
}

/* Sections */
.landing-section {
  padding: 5rem 1.5rem;
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.landing-section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem;
}

.landing-section-eyebrow {
  color: #00f2fe;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.landing-section-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  font-weight: 800;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.landing-section-sub {
  font-size: 1.05rem;
  color: #94a3b8;
  line-height: 1.6;
}

/* 3-Col Features Grid */
.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.landing-feature-card {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 2.2rem 1.8rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease;
}

.landing-feature-card:hover {
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 242, 254, 0.12);
}

.landing-feature-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 242, 254, 0.1);
  color: #00f2fe;
  border: 1px solid rgba(0, 242, 254, 0.25);
  margin-bottom: 1.2rem;
}

.landing-feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: #f8fafc;
}

.landing-feature-text {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0;
}

/* AI Terminal Demo Box */
.landing-ai-terminal {
  background: rgba(5, 11, 22, 0.92);
  border: 1.5px solid rgba(0, 242, 254, 0.3);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 45px rgba(0, 242, 254, 0.15);
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.landing-ai-term-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.landing-ai-term-dots {
  display: flex;
  gap: 0.45rem;
}

.landing-ai-term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.landing-ai-block-title {
  color: #00f2fe;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 1.1rem 0 0.4rem;
}

.landing-ai-block-text {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}

/* Auth Section Anchor */
.landing-auth-section {
  scroll-margin-top: 90px;
  padding: 5rem 1.5rem 6rem;
  position: relative;
  z-index: 2;
  text-align: center;
}

.landing-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3rem 1.5rem;
  background: rgba(5, 8, 16, 0.95);
  position: relative;
  z-index: 2;
}

.landing-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* Секция скриншотов и интерфейса платформы */
.landing-screens-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.75rem;
  margin-top: 2.5rem;
}

.landing-gallery-col-6 {
  grid-column: span 6;
}

.landing-gallery-col-4 {
  grid-column: span 4;
}

.landing-screen-card {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.landing-screen-card:hover {
  border-color: rgba(0, 242, 254, 0.38);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 35px rgba(0, 242, 254, 0.18);
  transform: translateY(-5px);
}

.landing-screen-img-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #080f1d;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.5rem;
}

.landing-screen-img-desktop {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.landing-screen-card:hover .landing-screen-img-desktop {
  transform: scale(1.02);
}

.landing-screen-info {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.landing-screen-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.25);
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.landing-screen-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 0.5rem;
  line-height: 1.35;
}

.landing-screen-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 1024px) {
  .landing-gallery-col-6,
  .landing-gallery-col-4 {
    grid-column: span 12;
  }
}




