/*
 * desktop_redesign.css
 * Новый дизайн десктопной версии kroim.by:
 * — Компактная шапка с логотипом и пользователем
 * — Статистика с трендами (4 карточки)
 * — Плавающая таблетка-навигация внизу по центру
 * — Работает только на @media (min-width: 769px)
 * — Мобильную версию (≤768px) не трогает
 */

/* =============================================
   ОБЩИЙ СБРОС ДЛЯ ДЕСКТОПА
   ============================================= */
@media (min-width: 769px) {

  /* =============================================
     ШАПКА — новая компактная
     ============================================= */
  .hero {
    background: #ffffff !important;
    border: none !important;
    border-bottom: 3px solid #d71920 !important;
    border-radius: 0 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
  }

  .hero-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 24px !important;
    gap: 16px !important;
  }

  /* Скрываем старый заголовок h1 и описание */
  .hero h1 {
    display: none !important;
  }

  .hero > .hero-row > div:first-child > p {
    display: none !important;
  }

  /* Логотип через псевдоэлемент на месте h1 */
  .hero > .hero-row > div:first-child::before {
    content: "KROIM.BY";
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #111111 !important;
    letter-spacing: 0.04em !important;
    display: block !important;
  }

  /* Дата рядом с логотипом */
  #currentDate {
    font-size: 12px !important;
    color: #6b7280 !important;
    font-weight: 600 !important;
    display: inline-block !important;
    margin-left: 16px !important;
  }

  /* Правая часть шапки */
  .badge {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: auto !important;
  }

  .header-month-closed {
    display: none !important;
  }

  .header-user-name {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #111111 !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 20px !important;
    padding: 5px 14px !important;
  }

  .switch-user-btn {
    font-size: 11px !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
    border: 1px solid #e5e7eb !important;
    background: #ffffff !important;
    color: #374151 !important;
    font-weight: 700 !important;
    min-height: unset !important;
    height: 30px !important;
  }

  .switch-user-btn:hover {
    background: #f3f4f6 !important;
    color: #111111 !important;
    border-color: #d1d5db !important;
  }

  /* Кнопка "Новый" — красная */
  .new-client-top-btn {
    background: #d71920 !important;
    color: #ffffff !important;
    border-color: #d71920 !important;
  }

  .new-client-top-btn:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
  }

  /* База знаний — тёмная */
  .policy-top-btn {
    background: #111111 !important;
    color: #ffffff !important;
    border-color: #111111 !important;
  }

  .policy-top-btn:hover {
    background: #374151 !important;
    border-color: #374151 !important;
    color: #ffffff !important;
  }

  /* =============================================
     СТРАНИЦА — отступ сверху под sticky шапку
     ============================================= */
  .page {
    padding: 20px 24px 90px !important;
    max-width: 1400px !important;
  }

  /* =============================================
     СТАТИСТИКА — 4 карточки с трендами
     ============================================= */
  .stats {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 14px !important;
    margin-bottom: 18px !important;
  }

  .stat {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-top: 3px solid #d71920 !important;
    border-left: none !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: box-shadow 0.15s !important;
    position: relative !important;
  }

  .stat:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
  }

  .stat.green {
    border-top-color: #16a34a !important;
  }

  .stat.orange {
    border-top-color: #ea580c !important;
  }

  .stat.blue {
    border-top-color: #2563eb !important;
  }

  .stat .label {
    font-size: 11px !important;
    color: #6b7280 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    margin-bottom: 4px !important;
  }

  .stat .value {
    font-size: 24px !important;
    font-weight: 900 !important;
    color: #111111 !important;
    line-height: 1.1 !important;
    margin-bottom: 3px !important;
  }

  .stat .sub {
    font-size: 11px !important;
    color: #9ca3af !important;
    font-weight: 600 !important;
  }

  /* Иконки трендов после .sub */
  .stat-trend-badge {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    margin-top: 5px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
  }

  .stat-trend-badge.up { color: #16a34a !important; }
  .stat-trend-badge.down { color: #d71920 !important; }
  .stat-trend-badge.warn { color: #ea580c !important; }

  /* =============================================
     КАРТОЧКИ СЕКЦИЙ — десктопный вид
     ============================================= */
  .card,
  .today-money-section,
  .calculation-money-section,
  .manager-measurements-section,
  .assigned-sales-section {
    border-left: 3px solid #d71920 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    border-top: 1px solid #e5e7eb !important;
    border-right: 1px solid #e5e7eb !important;
    border-bottom: 1px solid #e5e7eb !important;
  }

  .card-title {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    margin-bottom: 12px !important;
  }

  .card-title h2 {
    font-size: 14px !important;
    font-weight: 900 !important;
  }

  /* =============================================
     ПЛАВАЮЩЕЕ МЕНЮ-ТАБЛЕТКА
     ============================================= */

  /* Скрываем старые панели actions */
  .actions.admin-actions,
  .actions.manager-section {
    display: none !important;
  }

  /* Плавающая таблетка */
  .kroim-float-nav {
    position: fixed !important;
    bottom: 18px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 28px rgba(0,0,0,0.14) !important;
    padding: 5px 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    z-index: 500 !important;
    white-space: nowrap !important;
  }

  .kroim-fn-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    gap: 2px !important;
    transition: background 0.12s !important;
    background: none !important;
    border: none !important;
    font-family: Arial, Helvetica, sans-serif !important;
    min-height: unset !important;
    color: inherit !important;
  }

  .kroim-fn-item i {
    font-size: 18px !important;
    color: #6b7280 !important;
    display: block !important;
  }

  .kroim-fn-item span {
    font-size: 9px !important;
    color: #9ca3af !important;
    font-weight: 700 !important;
    display: block !important;
  }

  .kroim-fn-item:hover {
    background: #f9fafb !important;
  }

  .kroim-fn-item:hover i {
    color: #d71920 !important;
  }

  .kroim-fn-item:hover span {
    color: #d71920 !important;
  }

  .kroim-fn-item.active {
    background: #fff5f5 !important;
  }

  .kroim-fn-item.active i {
    color: #d71920 !important;
  }

  .kroim-fn-item.active span {
    color: #d71920 !important;
  }

  .kroim-fn-sep {
    width: 1px !important;
    height: 32px !important;
    background: #f3f4f6 !important;
    margin: 0 4px !important;
    flex-shrink: 0 !important;
  }

  .kroim-fn-add {
    background: #d71920 !important;
    border-radius: 20px !important;
  }

  .kroim-fn-add i {
    color: #ffffff !important;
  }

  .kroim-fn-add span {
    color: #ffffff !important;
  }

  .kroim-fn-add:hover {
    background: #b91c1c !important;
  }

  .kroim-fn-add:hover i,
  .kroim-fn-add:hover span {
    color: #ffffff !important;
  }

} /* end @media (min-width: 769px) */
