/* Фирменный стиль КУТ поверх темы демо (брендбук «KUT / Identity / 2026»):
   жёлтый #FFDC00, тёмно-жёлтый #FFC600, чёрный #1A1A1A, серый #E6E6E6, шрифт Golos Text, орнамент. */

:root {
  --kut-yellow: #ffdc00;
  --kut-yellow-dark: #ffc600;
  --kut-black: #1a1a1a;
  --kut-gray: #e6e6e6;
}

/* ---------- Логотип в сайдбаре: одна строка, чтобы меню досталось больше места ---------- */
.sidebar { position: relative; padding-top: 16px; }
.brand { flex-direction: row; align-items: center; gap: 10px; padding: 0 40px 12px 6px; }
.brand-logo { display: block; width: 66px; height: auto; flex: 0 0 auto; }
.brand strong { font-size: 15px; font-weight: 700; letter-spacing: .3px; line-height: 1.1; }
.brand small { margin-top: 2px; color: #8c8c8c; font-size: 11.5px; line-height: 1.2; }
/* «свернуть» — в строке логотипа, а не отдельной строкой */
.rail-toggle { position: absolute; top: 22px; right: 12px; margin: 0; }
body.nav-rail .brand { justify-content: center; padding: 0 0 8px; }
body.nav-rail .brand-logo { width: 46px; }
body.nav-rail .rail-toggle { position: static; margin: 0 0 6px; }

/* ---------- Роль: компактнее ---------- */
.side-role { margin: 0 2px 8px; padding: 5px 8px; }

/* ---------- Сайдбар: фирменный орнамент на чёрном, к низу проступает ---------- */
.sidebar {
  background:
    linear-gradient(180deg, var(--kut-black) 0%, rgba(26, 26, 26, .94) 45%, rgba(26, 26, 26, .55) 100%),
    url(../brand/pattern-dark.svg) 0 0 / 120px auto repeat,
    var(--kut-black);
}

/* ---------- ИИ-помощник: жёлтая плашка с орнаментом, как блокнот и папка ---------- */
.assistant-card {
  flex: 0 0 auto;
  margin-top: 10px;
  background: var(--kut-yellow) url(../brand/pattern-yellow.svg) 0 100% / 44px auto repeat-x;
  border: 0;
  padding: 10px 12px 18px;
}
.assistant-card div { color: var(--kut-black); font-size: 11px; }
.assistant-card i { background: var(--kut-black); box-shadow: none; }
/* текст подсказки — не больше двух строк */
.assistant-card p {
  color: var(--kut-black); font-size: 12px; line-height: 1.35; margin: 5px 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* меню забирает всю свободную высоту, карточка помощника прижата к низу */
.sidebar nav { flex: 1 1 auto; min-height: 0; }
.profile { margin-top: 10px; padding-top: 8px; }
/* на невысоких экранах помощник — одна строка: заголовок и кнопка */
@media (max-height: 820px) {
  .assistant-card { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; background-image: none; }
  .assistant-card p { display: none; }
  .assistant-card div, .assistant-card button { white-space: nowrap; font-size: 11px; }
}
.assistant-card button { color: var(--kut-black); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Профиль и аватары ---------- */
.profile .avatar { background: var(--kut-yellow); color: var(--kut-black); }
.profile:hover b { color: var(--kut-yellow); }

/* ---------- Приветствие на рабочем столе: чёрная плашка с орнаментом справа ---------- */
.dash-greeting {
  background:
    linear-gradient(90deg, var(--kut-black) 40%, rgba(26, 26, 26, .2) 100%),
    url(../brand/pattern-dark.svg) 100% 50% / 110px auto repeat,
    var(--kut-black);
  border-left: 6px solid var(--kut-yellow);
}

/* ---------- Кнопки: главная — чёрная, акцентная — жёлтая с чёрным текстом ---------- */
.primary-button { background: var(--kut-black); color: #fff; }
.primary-button:hover { background: #000; }
body.dark .primary-button { background: var(--kut-yellow); color: var(--kut-black); }

/* ---------- Заголовки — Golos Text Bold, как в брендбуке ---------- */
h1, h2, h3, .panel h2, .panel h3 { font-family: "Golos Text", Inter, sans-serif; }
#pageTitle { font-weight: 700; letter-spacing: -.3px; }

/* ---------- Фирменный бланк на документах ЭДО (брендбук, раздел 10) ---------- */
.kut-letterhead { display: flex; align-items: center; gap: 14px; margin: -4px 0 8px; }
.kut-letterhead img { width: 74px; height: auto; flex: 0 0 auto; }
.kut-letterhead i { flex: 1; height: 26px; background: url(../brand/pattern-light.svg) 0 50% / 38px auto repeat-x; }
.kut-letterhead-contacts { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr 1fr; gap: 10px; font-size: 8.5px; line-height: 1.35; color: #1a1a1a; padding-bottom: 10px; margin-bottom: 18px; border-bottom: 1px solid #e6e6e6; font-family: "Golos Text", sans-serif; font-weight: 500; }
.kut-letterhead-contacts b { font-weight: 700; }
