/* ============================================================
   RUSHON — Веб-кабинет
   Файл: rosh_cabinet.css
   Основной CSS файл для ЛК клиента и дашборда менеджера
   Цветовая схема: корпоративный фиолетовый #5d5d97
   ============================================================ */

/* ─── CSS Переменные ───────────────────────────────────────── */
:root {
  /* Фирменные цвета Rushon */
  --rushon-50:  #f0f0f8;
  --rushon-100: #e1e1ed;
  --rushon-200: #c2c2cf;
  --rushon-300: #a3a3c0;
  --rushon-400: #8484b1;
  --rushon-500: #5d5d97;   /* primary */
  --rushon-600: #4e4e80;
  --rushon-700: #3c3c76;   /* dark */
  --rushon-800: #2e2e5c;
  --rushon-900: #1e1e3d;

  /* Градиенты */
  --grad-primary:   linear-gradient(135deg, #5d5d97 0%, #3c3c76 100%);
  --grad-sidebar:   linear-gradient(180deg, #3c3c76 0%, #2e2e5c 100%);
  --grad-card:      linear-gradient(135deg, #f0f0f8 0%, #ffffff 100%);
  --grad-hero:      linear-gradient(135deg, #5d5d97 0%, #8484b1 50%, #3c3c76 100%);

  /* Семантические цвета */
  --color-success:  #1d9e75;
  --color-danger:   #d85a30;
  --color-warning:  #ba7517;
  --color-info:     #185fa5;

  --bg-success-soft: #e1f5ee;
  --bg-danger-soft:  #faece7;
  --bg-warning-soft: #faeeda;
  --bg-info-soft:    #e6f1fb;

  /* Нейтральные */
  --gray-50:  #f8f8fa;
  --gray-100: #f0f0f2;
  --gray-200: #e4e4e8;
  --gray-300: #d0d0d6;
  --gray-400: #a0a0aa;
  --gray-500: #6c6c78;
  --gray-600: #4a4a55;
  --gray-700: #2e2e38;
  --gray-800: #1a1a22;

  /* Типографика */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-tj: 'arial_tj', Arial, sans-serif;

  /* Размеры */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --header-height: 64px;
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;

  /* Тени */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(93,93,151,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg:  0 8px 32px rgba(93,93,151,0.15), 0 4px 12px rgba(0,0,0,0.08);
  --shadow-card: 0 2px 8px rgba(93,93,151,0.08);

  /* Переходы */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.35s ease;
}

/* ─── Сброс и база ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; scroll-behavior: smooth; }

body {
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-700);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--rushon-500);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--rushon-700); }

/* ─── Layout: Sidebar + Main ────────────────────────────────── */
.cabinet-wrapper {
  display: flex;
  min-height: 100vh;
}

.cabinet-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-base);
  display: flex;
  flex-direction: column;
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--grad-sidebar);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: width var(--transition-base), transform var(--transition-base);
  overflow: hidden;
}

/* Логотип */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  min-height: var(--header-height);
  text-decoration: none;
}
.sidebar-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-brand-text {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 25px;
  font-weight: 300;
  color: #fff;
  letter-spacing: 2px;
  line-height: 1;
}

.sidebar-brand-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.80);  /* было 0.55 — увеличить */
  display: block;
  margin-top: 1px;
  letter-spacing: 1.5px;
  line-height: 1;
}

/* Навигация */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 16px 20px 6px;
}

.sidebar-nav .nav-item { list-style: none; }

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.70);
  font-size: 13.5px;
  font-weight: 400;
  border-radius: 10px;
  transition: all var(--transition-fast);
  white-space: nowrap;
  position: relative;
  text-decoration: none;
  margin: 2px 8px;
}
.sidebar-nav .nav-link i {
  font-size: 18px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  transition: transform var(--transition-fast);
  margin: 2px 8px;
}
.sidebar-nav .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  padding-left: 24px;
}
.sidebar-nav .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  font-weight: 600;
  border-radius: 10px;
}

.sidebar-nav .nav-link.active::before {
  display: none;
}

/* Бейдж в навигации */
.nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.90);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}
.nav-badge.danger {
  background: rgba(216,90,48,0.30);
  color: #ffb89e;
}

/* Профиль в сайдбаре */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--border-radius-md);
  transition: background var(--transition-fast);
  text-decoration: none;
  cursor: pointer;
}
.sidebar-user:hover { background: rgba(255,255,255,0.08); }

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rushon-400), var(--rushon-600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-user-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 11px;
  color: rgba(255,255,255,0.50);
  display: block;
}

/* ─── Header ────────────────────────────────────────────────── */
.cabinet-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}
.header-breadcrumb {
  font-size: 13px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-breadcrumb a { color: var(--gray-400); }
.header-breadcrumb a:hover { color: var(--rushon-500); }

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Кнопка меню (мобильная) */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  color: var(--gray-600);
  transition: background var(--transition-fast);
}
.sidebar-toggle:hover { background: var(--gray-100); }
.sidebar-toggle i { font-size: 22px; }

/* ─── Контент ───────────────────────────────────────────────── */
.cabinet-content {
  flex: 1;
  padding: 24px;
}

/* ─── Карточки ──────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title i { color: var(--rushon-500); font-size: 16px; }
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
}

/* Градиентные карточки KPI */
.kpi-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-card);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.kpi-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-primary);
}
.kpi-card.success::before  { background: linear-gradient(90deg, #1d9e75, #5dcaa5); }
.kpi-card.danger::before   { background: linear-gradient(90deg, #d85a30, #f0997b); }
.kpi-card.warning::before  { background: linear-gradient(90deg, #ba7517, #ef9f27); }
.kpi-card.info::before     { background: linear-gradient(90deg, #185fa5, #378add); }

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.kpi-icon.primary { background: var(--rushon-50); color: var(--rushon-500); }
.kpi-icon.success { background: var(--bg-success-soft); color: var(--color-success); }
.kpi-icon.danger  { background: var(--bg-danger-soft);  color: var(--color-danger); }
.kpi-icon.warning { background: var(--bg-warning-soft); color: var(--color-warning); }
.kpi-icon.info    { background: var(--bg-info-soft);    color: var(--color-info); }

.kpi-label {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.kpi-sub {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.kpi-sub.up   { color: var(--color-success); }
.kpi-sub.down { color: var(--color-danger); }

/* ─── Таблицы ───────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; border-radius: var(--border-radius-md); }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table thead th {
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr {
  transition: background var(--transition-fast);
  cursor: default;
}
.table tbody tr:hover { background: var(--rushon-50); }
.table tbody tr.clickable { cursor: pointer; }

/* ─── Бейджи ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
}
.badge-primary { background: var(--rushon-100); color: var(--rushon-700); }
.badge-success { background: var(--bg-success-soft); color: var(--color-success); }
.badge-danger  { background: var(--bg-danger-soft);  color: var(--color-danger); }
.badge-warning { background: var(--bg-warning-soft); color: var(--color-warning); }
.badge-info    { background: var(--bg-info-soft);    color: var(--color-info); }
.badge-gray    { background: var(--gray-100);        color: var(--gray-500); }

/* ─── Кнопки ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--border-radius-md);
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}
.btn i { font-size: 16px; }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(93,93,151,0.30);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #6e6ea8 0%, #4d4d87 100%);
  box-shadow: 0 4px 14px rgba(93,93,151,0.40);
  transform: translateY(-1px);
  color: #fff;
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(93,93,151,0.30);
}

.btn-outline-primary {
  background: transparent;
  color: var(--rushon-500);
  border-color: var(--rushon-300);
}
.btn-outline-primary:hover {
  background: var(--rushon-50);
  border-color: var(--rushon-500);
  color: var(--rushon-700);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12.5px;
  border-radius: var(--border-radius-sm);
}
.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
  border-radius: var(--border-radius-lg);
}
.btn-icon {
  padding: 8px;
  border-radius: var(--border-radius-md);
  background: transparent;
  border: 1px solid var(--gray-200);
  color: var(--gray-500);
}
.btn-icon:hover { background: var(--gray-100); color: var(--gray-700); }

/* ─── Формы ─────────────────────────────────────────────────── */
.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 6px;
  display: block;
}
.form-control,
.form-select {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius-md);
  font-size: 13.5px;
  color: var(--gray-800);
  background: #fff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  line-height: 1.5;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--rushon-400);
  box-shadow: 0 0 0 3px rgba(93,93,151,0.12);
}
.form-control::placeholder { color: var(--gray-300); }

.input-group {
  display: flex;
  gap: 0;
}
.input-group .form-control { border-radius: var(--border-radius-md) 0 0 var(--border-radius-md); }
.input-group .btn          { border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0; }

/* ─── Страница авторизации ──────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-hero);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  top: -200px;
  right: -100px;
}
.auth-page::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  bottom: -100px;
  left: -50px;
}

.auth-card {
  background: #fff;
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}
.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.auth-logo img { height: 60px; object-fit: contain; }
.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-800);
  text-align: center;
  margin: 0 0 6px;
}
.auth-subtitle {
  font-size: 13.5px;
  color: var(--gray-400);
  text-align: center;
  margin: 0 0 28px;
}

/* OTP поля */
.otp-input-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 16px 0;
}
.otp-input {
  width: 52px;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--rushon-700);
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius-md);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.otp-input:focus {
  border-color: var(--rushon-500);
  box-shadow: 0 0 0 3px rgba(93,93,151,0.15);
}
.otp-input.filled { border-color: var(--rushon-400); background: var(--rushon-50); }

/* ─── Dashboard Hero (клиент) ───────────────────────────────── */
.dashboard-hero {
  background: var(--grad-hero);
  border-radius: var(--border-radius-xl);
  padding: 28px 32px;
  color: #fff;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.dashboard-hero::after {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  top: -80px;
  right: -60px;
}

.dashboard-hero::after {
  pointer-events: none;
}

.hero-greeting {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.70;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.hero-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}
.hero-debt-label {
  font-size: 12px;
  opacity: 0.70;
  margin-bottom: 4px;
}
.hero-debt-value {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
}
.hero-sync {
  font-size: 11.5px;
  opacity: 0.55;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── Карточки заказов ──────────────────────────────────────── */
.order-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  padding: 16px 20px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}
.order-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--rushon-200);
  color: inherit;
}
.order-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}
.order-doc-type {
  font-size: 12px;
  font-weight: 600;
  color: var(--rushon-600);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.order-date {
  font-size: 12px;
  color: var(--gray-400);
}
.order-agent {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.order-assortments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.assortment-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--rushon-50);
  color: var(--rushon-600);
  border: 1px solid var(--rushon-100);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
}
.assortment-tag .amount {
  font-weight: 700;
  color: var(--rushon-700);
}
.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}
.order-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
}
.order-total.positive { color: var(--color-danger); }
.order-total.negative { color: var(--color-success); }
.order-invoices-count {
  font-size: 12px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── Фильтры ───────────────────────────────────────────────── */
.filters-bar {
  background: #fff;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--gray-200);
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 20px;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label { font-size: 11px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.4px; }
.filter-group .form-control,
.filter-group .form-select {
  min-width: 140px;
  height: 36px;
  padding: 6px 12px;
  font-size: 13px;
}

/* ─── Пагинация ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-sm);
  font-size: 13.5px;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  background: #fff;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}
.page-link:hover { background: var(--rushon-50); color: var(--rushon-600); border-color: var(--rushon-200); }
.page-link.active { background: var(--grad-primary); color: #fff; border-color: transparent; box-shadow: 0 2px 6px rgba(93,93,151,0.30); }
.page-link.disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Alerts и сообщения ────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--border-radius-md);
  font-size: 13.5px;
  border: 1px solid transparent;
}
.alert i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-info    { background: var(--bg-info-soft);    color: var(--color-info);    border-color: rgba(24,95,165,0.15); }
.alert-success { background: var(--bg-success-soft); color: var(--color-success); border-color: rgba(29,158,117,0.15); }
.alert-warning { background: var(--bg-warning-soft); color: var(--color-warning); border-color: rgba(186,117,23,0.15); }
.alert-danger  { background: var(--bg-danger-soft);  color: var(--color-danger);  border-color: rgba(216,90,48,0.15); }

/* ─── Заглушка "Загружается" ────────────────────────────────── */
.loading-placeholder {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
}
.loading-placeholder i { font-size: 40px; margin-bottom: 12px; display: block; opacity: 0.4; }
.loading-placeholder p { font-size: 14px; margin: 0; }

/* ─── Мобильный оверлей ─────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
  backdrop-filter: blur(2px);
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --sidebar-width: 220px; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .sidebar-overlay.visible { display: block; }
  .cabinet-main { margin-left: 0 !important; }
  .sidebar-toggle { display: flex; }
  .cabinet-content { padding: 16px; }
  .dashboard-hero { padding: 20px; }
  .hero-debt-value { font-size: 28px; }
  .filters-bar { flex-direction: column; }
  .filter-group .form-control,
  .filter-group .form-select { min-width: 100%; }
  .kpi-value { font-size: 22px; }
  .auth-card { padding: 28px 20px; }
  .otp-input { width: 44px; height: 50px; font-size: 20px; }
}

@media (max-width: 480px) {
  .header-breadcrumb { display: none; }
  .order-card-header { flex-direction: column; gap: 4px; }
  .otp-input-group { gap: 6px; }
  .otp-input { width: 40px; height: 46px; font-size: 18px; }
}

/* ─── WebView режим (?embed=1) ──────────────────────────────── */
.embed-mode .sidebar,
.embed-mode .cabinet-header { display: none !important; }
.embed-mode .cabinet-main { margin-left: 0; }
.embed-mode .cabinet-content { padding: 12px; }

/* ─── Утилиты ───────────────────────────────────────────────── */
.text-primary { color: var(--rushon-500) !important; }
.text-muted   { color: var(--gray-400) !important; }
.text-success { color: var(--color-success) !important; }
.text-danger  { color: var(--color-danger) !important; }
.text-warning { color: var(--color-warning) !important; }

.bg-primary-soft { background: var(--rushon-50); }
.bg-gray         { background: var(--gray-50); }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mt-auto { margin-top: auto; }

.w-100 { width: 100%; }
.rounded { border-radius: var(--border-radius-md); }
.rounded-lg { border-radius: var(--border-radius-lg); }

/* Divider */
.divider {
  height: 1px;
  background: var(--gray-100);
  margin: 16px 0;
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--border-radius-sm);
}
@keyframes skeleton-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ─── Hero customer dropdown (выбор точки на главной) ─────────── */

.hero-customer-dropdown {
  display: inline-block;
  margin-bottom: 4px;
}

/* Кликабельное название точки — выглядит как hero-name + chevron */
.hero-customer-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff !important;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  padding: 6px 14px 6px 14px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.2;
}

.hero-customer-toggle:hover,
.hero-customer-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff !important;
}

.hero-customer-toggle .ti-chevron-down {
  font-size: 18px;
  opacity: 0.9;
  transition: transform 0.2s;
}

.hero-customer-toggle[aria-expanded="true"] .ti-chevron-down {
  transform: rotate(180deg);
}

/* Меню */
.hero-customer-menu {
  min-width: 320px;
  max-height: 420px;
  overflow-y: auto;
  padding: 6px;
  border: none;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  margin-top: 6px !important;
  background: #fff;
}

.hero-customer-menu li {
  list-style: none;
}

.hero-customer-menu form {
  margin: 0;
}

.hero-customer-menu.show {
  position: fixed !important;
}

/* Пункт меню (внутри form, поэтому button) */
.hero-customer-item {
  display: flex !important;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px !important;
  border: none;
  background: transparent;
  text-align: left;
  border-radius: 8px;
  transition: background 0.1s;
  cursor: pointer;
  white-space: normal;
  color: var(--gray-800) !important;
}

.hero-customer-item:hover {
  background: var(--rushon-50) !important;
  color: var(--gray-800) !important;
}

.hero-customer-item.active {
  background: var(--rushon-50) !important;
}

.hero-customer-item .ti {
  font-size: 18px;
  flex-shrink: 0;
  color: var(--rushon-500);
}

.hero-customer-item.active .ti-check {
  color: var(--rushon-600);
}

.hero-customer-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.3;
}

.hero-customer-item.active .hero-customer-item-name {
  color: var(--rushon-700);
}

.hero-customer-item-code {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  letter-spacing: 0.3px;
}

/* ─── Lucide icons — общие стили ─────────────────────────────── */
.lucide,
[data-lucide] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 2;
  display: inline-block;
  vertical-align: middle;
}

/* Sidebar — стандартный размер */
.sidebar-nav .nav-link .lucide,
.sidebar-nav .nav-link [data-lucide] {
  width: 20px;
  height: 20px;
}

/* Header кнопка меню */
.sidebar-toggle .lucide,
.sidebar-toggle [data-lucide] {
  width: 22px;
  height: 22px;
}

/* KPI карточки — крупные иконки в цветных кружках */
.kpi-icon .lucide,
.kpi-icon [data-lucide] {
  width: 20px;
  height: 20px;
}

/* Кнопки навигации внизу — большие иконки */
[data-lucide][style*="width:28px"] {
  width: 28px !important;
  height: 28px !important;
}

/* Hero customer dropdown */
.hero-customer-toggle [data-lucide] {
  width: 18px;
  height: 18px;
}

.hero-customer-item [data-lucide] {
  width: 18px;
  height: 18px;
}

/* ─── KPI карточки — статичные, только тень при ховере ────────── */

.kpi-card {
  transition: box-shadow 0.2s;
}

.kpi-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

/* ─── Быстрые действия (карточки навигации внизу) ─────────────── */

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.quick-action-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-lg, 12px);
  padding: 24px 20px;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.quick-action-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
  border-color: var(--rushon-200);
}

.quick-action-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
  transition: transform 0.18s ease;
}

.quick-action-card:hover .quick-action-icon {
  transform: scale(1.08);
}

.quick-action-icon [data-lucide],
.quick-action-icon .lucide {
  width: 26px;
  height: 26px;
  stroke-width: 2.2;
}

.quick-action-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-top: 2px;
}

/* ─── Колокольчик уведомлений в шапке ────────────────────────── */

.bell-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gray-100);
  color: var(--gray-600);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.bell-btn:hover {
  background: var(--rushon-50);
  color: var(--rushon-600);
}

.bell-btn [data-lucide],
.bell-btn .lucide {
  width: 20px;
  height: 20px;
}

.bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid #fff;
}

/* ─── Sidebar footer — кнопка выхода внутри блока пользователя ── */

.sidebar-logout-icon {
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
}

.sidebar-logout-icon [data-lucide],
.sidebar-logout-icon .lucide {
  width: 16px;
  height: 16px;
}

.sidebar-user:hover .sidebar-logout-icon {
  opacity: 0.9;
}

.sidebar-footer .sidebar-user {
  text-decoration: none;
}

.sidebar-logout-icon svg {
  width: 16px !important;
  height: 16px !important;
  color: rgba(255, 255, 255, 0.6);
}

.sidebar-user:hover .sidebar-logout-icon svg {
  color: #fff !important;
  opacity: 1 !important;
}

/* ─── Переключатель языка ─────────────────────────────────────── */

.lang-switcher {
  display: flex;
  align-items: center;
}

.lang-btn {
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1.5px solid var(--gray-200);
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-btn:hover {
  background: var(--rushon-50);
  border-color: var(--rushon-300);
  color: var(--rushon-600);
}

.lang-btn.active {
  background: var(--rushon-500);
  border-color: var(--rushon-500);
  color: #fff;
}

/* ─── Фикс прыжка колокольчика — зарезервированное место ─────── */

.header-actions-slot {
  min-width: 100px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.header-actions-slot:empty {
  min-width: 100px;
  min-height: 38px;
}

/* ─── Список новостей ─────────────────────────────────────────── */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.news-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.09);
  border-color: var(--rushon-200);
}

.news-card-image {
  height: 160px;
  overflow: hidden;
  background: var(--gray-100);
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
  transform: scale(1.04);
}

.news-card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-300);
}

.news-card-image-placeholder [data-lucide],
.news-card-image-placeholder .lucide {
  width: 48px;
  height: 48px;
}

.news-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.news-card-date {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
}

.news-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.4;
  flex: 1;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}

.news-card-more {
  font-size: 12px;
  font-weight: 600;
  color: var(--rushon-500);
  display: flex;
  align-items: center;
  gap: 2px;
}

.news-card-more [data-lucide],
.news-card-more .lucide {
  width: 14px;
  height: 14px;
}

/* Тело новости */
.news-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray-700);
}

.news-body p {
  margin-bottom: 12px;
}

/* ─── Feedback select стиль ──────────────────────────────────── */
.feedback-select {
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--gray-200);
  padding: 10px 14px;
}

.feedback-select:focus {
  box-shadow: 0 4px 12px rgba(93, 93, 151, 0.15);
  border-color: var(--rushon-400);
  outline: none;
}

/* Popover стиль */
.popover {
  border-radius: 12px;
  border: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 200px;
}

.popover-body {
  padding: 14px 16px;
}
.sidebar-user-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.sidebar-user-wrapper .sidebar-user {
  flex: 0 0 80%;
  max-width: 80%;
}

.sidebar-user-wrapper .sidebar-logout-btn {
  flex: 0 0 20%;
  width: 100%;
  max-width: 20%;
  justify-content: center;
}