/* =========================================================
   Dashboard — навигация, правая панель, hero, loader
   В стиле Overview/Sicherheit, БЕЗ горизонтального скролла
   ========================================================= */

/* =========================================================
   СБРОС СКРОЛЛА — открытие страницы всегда сверху
   ========================================================= */

html, body {
  scroll-behavior: auto !important;
  scroll-padding-top: 0 !important;
}

html, body {
  /* overflow-x: hidden; — убрано, мешает скроллу таблиц */
}


/* ============================
   MAIN GRID
   ============================ */

.dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 992px) {
  .dash-grid {
    grid-template-columns: 260px minmax(0, 1fr); /* слева фикс., справа адаптивно */
  }
}

.dash-left,
.dash-right {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* =========================================================
   LEFT NAV — карточки
   ========================================================= */

.dash-left .nav-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

/* -------- Базовая карточка -------- */

.nav-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;

  padding: 1.25rem 1.15rem;
  min-height: 96px;

  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(148,163,184,0.30);
  color: inherit;
  text-decoration: none;

  box-shadow: 0 6px 18px rgba(15,23,42,0.04);

  transition:
    background-color .16s ease,
    border-color .16s ease,
    box-shadow .16s ease,
    transform .12s ease;

  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden; /* чтобы ничего не вылезало за карточку */
}

/* Левая цветная полоса */

.nav-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg,#6366f1,#22c55e,#0ea5e9);
  opacity: 0;
  transition: opacity .16s ease;
}

/* Hover-анимация */

.nav-card:hover {
  transform: translateY(-3px);
  background: #f8fafc;
  box-shadow: 0 12px 28px rgba(15,23,42,0.08);
}

/* -------- Активная карточка -------- */

.dash-left .nav-card.active {
  background: #dbeafe !important;
  border-color: #60a5fa !important;
  box-shadow: 0 12px 28px rgba(37,99,235,0.28);
}

.dash-left .nav-card.active::before {
  opacity: 1;
}

/* -------- Иконка слева -------- */

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;
  border-radius: 14px;

  background: radial-gradient(circle at 30% 20%, #eef2ff, #d4ddff);
  box-shadow: 0 8px 20px rgba(79,70,229,0.40);

  font-size: 1.1rem;
  color: #4338ca;
  flex-shrink: 0;
}

/* -------- Текст -------- */

.nav-content { 
  min-width: 0;
}

.nav-title {
  font-weight: 700;
  line-height: 1.25;
  font-size: 0.97rem;
  color: #0f172a;
}

.nav-desc {
  font-size: 0.86rem;
  color: #6b7280;
  margin-top: 2px;
}

/* Стрелочка справа */

.nav-chevron {
  margin-left: auto;
  opacity: 0.45;
  font-size: 0.9rem;
}

/* Мобильный вид */

@media (max-width: 640px) {
  .nav-card {
    padding: 1.1rem 1rem;
    min-height: 88px;
  }
}

/* =========================================================
   RIGHT PANE — без отрицательных отступов
   ========================================================= */

.dash-right {
  padding: 0;
  background: transparent;
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
}

/* Внутренние блоки в правой колонке ведут себя нормально,
   не расползаются на ширину больше родителя */

.dash-right > * {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Если где-то используются surface/card/widget внутри правой колонки,
   просто делаем их обычными карточками без отрицательных margin */

.dash-right .surface,
.dash-right .card,
.dash-right .widget {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.15);
  padding: 1.25rem 1.25rem;
  margin: 0 0 1rem 0;
  box-sizing: border-box;
}

/* =========================================================
   HERO block (верхний приветственный блок)
   ========================================================= */

.hero {
  padding: 20px 24px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15,23,42,0.04);
}

.hero-title {
  margin: 0 0 0.25rem 0;
  font-weight: 800;
  line-height: 1.15;
  font-size: clamp(18px, 5vw, 40px);
  letter-spacing: -0.01em;
  word-break: break-word;
  overflow-wrap: break-word;
}

.hero-sub {
  margin: 0;
  color: #6b7280;
  word-break: break-word;
  overflow-wrap: break-word;
  font-size: 0.95rem;
}

/* =========================================================
   Loader — анимация трёх точек
   ========================================================= */

.loader {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
}

.loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  animation: bounce 1s infinite ease-in-out;
}

.loader-dot:nth-child(2) { animation-delay: 0.15s; }
.loader-dot:nth-child(3) { animation-delay: 0.30s; }

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* =========================================================
   Utility helpers
   ========================================================= */

.stack { display:flex; flex-direction:column; }

.gap-2{ gap:0.5rem; }
.gap-3{ gap:1rem; }


/* =========================================================
   OVERVIEW SECTIONS — грид для секций (Overview, Team и т.д.)
   ========================================================= */

.overview-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* -------- Базовая карточка overview -------- */

.overview-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.15);
  padding: 1.5rem;
  box-shadow: 0 6px 18px rgba(15,23,42,0.04);
  box-sizing: border-box;
}

/* -------- HERO-карточка (всегда на всю ширину) -------- */

.overview-card--hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 2.5rem 2rem;
  min-height: 180px;
  display: flex;
  align-items: center;
}

.overview-hero-inner {
  width: 100%;
}

.overview-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.overview-subtitle {
  font-size: 1.05rem;
  opacity: 0.95;
  margin: 0;
}

/* -------- Карточка на всю ширину -------- */

.overview-card--full {
  grid-column: 1 / -1;
}

/* -------- Элементы внутри карточек -------- */

.overview-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 20%, #eef2ff, #d4ddff);
  box-shadow: 0 4px 12px rgba(79,70,229,0.25);
  font-size: 1.5rem;
  color: #4338ca;
  flex-shrink: 0;
}

.overview-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin: 0;
}

.overview-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.overview-text {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
}
