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

/* ============================
   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;
}

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

.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(24px, 3.2vw, 40px);
  letter-spacing: -0.01em;
}

.hero-sub {
  margin: 0;
  color: #6b7280;
  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; }
