/* ========================================================
   СВЕТЛАЯ СОВРЕМЕННАЯ ТЕМА (EYE-FRIENDLY & HIGH-CONTRAST)
   Светло-серые спокойные тона, гармоничные сине-голубые кнопки,
   высокая читаемость шрифтов и цифр (WCAG AAA)
   ======================================================== */

[v-cloak] {
    display: none !important;
}

:root {
    --bg-page: #eaedf2;         /* Мягкий комфортный нейтрально-серый фон страницы (выделяет белые карточки) */
    --bg-card: #ffffff;         /* Белоснежные карточки */
    --bg-card-hover: #eff6ff;   /* Нежно-голубой оттенок при наведении на строки/карточки */
    --bg-subtle: #f1f5f9;       /* Серые подложки панелей и вторичных блоков */
    --border-light: #cbd5e1;    /* Четкие контрастные границы карточек (slate-300) */
    --border-medium: #94a3b8;   /* Рамки полей ввода, шапок таблиц и фильтров (slate-400) */
    
    --text-primary: #0f172a;    /* Основной глубокий темный текст / заголовки / крупные цифры */
    --text-body: #0f172a;       /* Максимально четкий темный текст для таблиц и списков */
    --text-muted: #334155;      /* Вторичный темный текст (slate-700, высокая контрастность) */
    --text-caption: #475569;    /* Подписи, даты, подсказки (slate-600) */

    --color-primary: #0284c7;   /* Сине-голубой основной акцент (sky-600) */
    --color-primary-hover: #0369a1; /* Насыщенный синий при наведении (sky-700) */
    --color-primary-light: #e0f2fe; /* Нежно-голубой фон активных элементов (sky-100) */
    --color-primary-border: #7dd3fc;/* Голубая рамка активных элементов (sky-300) */
}

/* 1. Глобальный фон, защита от засвета и переполнения ширины */
html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
    background-color: var(--bg-page) !important;
    color: var(--text-body) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

#app, main {
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    overflow-x: hidden !important;
    background-color: var(--bg-page) !important;
}

/* 2. ПРИНУДИТЕЛЬНОЕ ПЕРЕОПРЕДЕЛЕНИЕ ВСЕХ ТЕМНЫХ SLATE-ФОНОВ (любые дроби и прозрачности) */
[class*="bg-slate-950"]:not(.fixed):not([class*="fixed"]) {
    background-color: #f1f5f9 !important; /* slate-100 для внутренних панелей и фильтров */
    border-color: #cbd5e1 !important;
}

[class*="bg-slate-900"],
[class*="bg-slate-850"] {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.06) !important;
}

[class*="bg-slate-800"] {
    background-color: #e2e8f0 !important; /* slate-200 для второстепенных плашек */
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

[class*="bg-slate-700"] {
    background-color: #cbd5e1 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* 3. Границы и разделители */
[class*="border-slate-"],
[class*="divide-slate-"] {
    border-color: #cbd5e1 !important;
}

/* 4. Защита от темных состояний при наведении (HOVER FIX) */
.hover\:bg-slate-800:hover,
.hover\:bg-slate-700:hover,
.hover\:bg-slate-900:hover,
.hover\:bg-slate-950:hover,
[class*="hover:bg-slate-"]:hover {
    background-color: #f1f5f9 !important;
}

.hover\:text-white:hover {
    color: #0f172a !important;
}

.hover\:text-slate-200:hover,
.hover\:text-slate-300:hover {
    color: #1e293b !important;
}

/* 5. ЧЕТКАЯ ТИПОГРАФИКА И МАКСИМАЛЬНЫЙ КОНТРАСТ (WCAG AAA) */
.text-white {
    color: #0f172a !important; /* Глубокий черно-сланцевый для заголовков и важных цифр */
}

.text-slate-100,
.text-slate-200,
.text-slate-300 {
    color: #0f172a !important; /* Максимально четкий темный текст для таблиц и названий */
}

.text-slate-400 {
    color: #334155 !important; /* Глубокий темно-сланцевый (slate-700) вместо блеклого серого */
}

.text-slate-500 {
    color: #475569 !important; /* Четкий сланцевый (slate-600) для вторичных подписей */
}

.text-slate-600 {
    color: #334155 !important;
}

/* Финансовые и статусные показатели - глубокие насыщенные контрастные цвета */
.text-emerald-400,
.text-emerald-300,
.text-emerald-500 {
    color: #065f46 !important; /* Глубокий лесной изумруд (выручка, маржа) */
}

.text-amber-400,
.text-amber-300,
.text-amber-500 {
    color: #92400e !important; /* Насыщенный темно-янтарный (средний чек, фудкост) */
}

.text-rose-400,
.text-rose-300,
.text-rose-500,
.text-red-400,
.text-red-300 {
    color: #9f1239 !important; /* Глубокий темно-бордовый (аутсайдеры, убытки) */
}

.text-indigo-400,
.text-indigo-300,
.text-sky-400,
.text-sky-300,
.text-blue-400,
.text-blue-300 {
    color: #0369a1 !important; /* Насыщенный темно-синий */
}

.text-purple-400,
.text-purple-300 {
    color: #5b21b6 !important; /* Глубокий королевский фиолетовый */
}

.text-cyan-400,
.text-cyan-300 {
    color: #0369a1 !important; /* Глубокий морской циан */
}

/* 6. КНОПКИ И АКЦЕНТЫ: СИНЕ-ГОЛУБОЙ СТИЛЬ */
.bg-indigo-600,
.bg-indigo-500,
.bg-sky-600,
.bg-sky-500,
.bg-blue-600,
.bg-purple-600,
.btn-primary {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px -1px rgba(2, 132, 199, 0.3) !important;
    font-weight: 600 !important;
}

.bg-indigo-600:hover,
.bg-indigo-500:hover,
.bg-sky-600:hover,
.bg-blue-600:hover,
.bg-purple-600:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
    color: #ffffff !important;
}

/* Кнопка экспорта в Excel - благородный зеленый */
.bg-emerald-600 {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    border-color: #059669 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px -1px rgba(5, 150, 105, 0.3) !important;
}

.bg-emerald-600:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
    color: #ffffff !important;
}

/* Текст и иконки внутри цветных кнопок ВСЕГДА чистые белые */
.bg-indigo-600 *,
.bg-indigo-500 *,
.bg-sky-600 *,
.bg-blue-600 *,
.bg-emerald-600 *,
.bg-rose-600 *,
button.bg-indigo-600,
button.bg-sky-600,
button.bg-emerald-600,
a.bg-indigo-600,
a.bg-sky-600 {
    color: #ffffff !important;
}

/* Нежные сине-голубые подсветки для активных табов и меню */
.bg-indigo-600\/20,
.bg-indigo-500\/10,
.bg-indigo-500\/15,
.bg-indigo-500\/20,
.bg-sky-500\/10,
.bg-sky-500\/20,
.bg-sky-500\/30 {
    background-color: var(--color-primary-light) !important; /* sky-100 */
    border-color: var(--color-primary-border) !important;     /* sky-300 */
    color: var(--color-primary-hover) !important;            /* sky-700 */
    font-weight: 600 !important;
}

.border-indigo-500\/20,
.border-indigo-500\/30,
.border-indigo-500\/40,
.border-sky-500\/30,
.border-sky-500\/50 {
    border-color: var(--color-primary-border) !important;
}

/* 7. САЙДБАР: ЧИСТЫЙ, АККУРАТНЫЙ И БЕЗ ТЕМНЫХ ПЯТЕН */
aside {
    background-color: #ffffff !important;
    border-right: 1px solid var(--border-light) !important;
}

aside button {
    color: #475569 !important;
    border-color: transparent !important;
}

aside button:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

aside button.bg-indigo-600\/20,
aside button[class*="border-indigo-"] {
    background-color: #e0f2fe !important;
    border-color: #7dd3fc !important;
    color: #0369a1 !important;
}

aside button.bg-indigo-600\/20 i,
aside button[class*="border-indigo-"] i {
    color: #0284c7 !important;
}

/* Блок профиля внизу сайдбара */
aside .border-t {
    background-color: #f8fafc !important;
    border-top: 1px solid var(--border-light) !important;
}

aside .border-t .rounded-full.bg-slate-800 {
    background-color: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

aside .border-t .ring-slate-900 {
    --tw-ring-color: #f8fafc !important;
}

aside .border-t button {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

aside .border-t button:hover {
    background-color: #fff1f2 !important;
    border-color: #fecdd3 !important;
    color: #e11d48 !important;
}

/* 8. ИНПУТЫ, СЕЛЕКТЫ И КАЛЕНДАРЬ */
input[type="text"],
input[type="search"],
input[type="date"],
input[type="number"],
input[type="password"],
input[type="email"],
select,
textarea {
    background-color: #ffffff !important;
    border: 1px solid var(--border-medium) !important;
    color: #0f172a !important;
    color-scheme: light !important;
    border-radius: 8px !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2) !important;
    outline: none !important;
}

input[type="date"] {
    color-scheme: light !important;
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none !important;
    opacity: 0.8;
    cursor: pointer;
    border-radius: 4px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background-color: #e0f2fe;
}

/* Центрирование и комфортные отступы для полей выбора дат в шапке */
input[type="date"].date-picker-full-click,
.header-date-input {
    text-align: center !important;
    padding: 3px 6px !important;
    font-variant-numeric: tabular-nums !important;
    border: 1px solid var(--border-medium) !important;
    background-color: #ffffff !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
}

input[type="date"].date-picker-full-click:hover,
.header-date-input:hover {
    border-color: var(--color-primary) !important;
    background-color: #f8fafc !important;
}

input[type="date"].date-picker-full-click::-webkit-datetime-edit {
    text-align: center !important;
    margin: 0 auto !important;
    padding: 0 2px !important;
}

input[type="date"].date-picker-full-click::-webkit-datetime-edit-fields-wrapper {
    display: inline-flex !important;
    justify-content: center !important;
    margin: 0 auto !important;
}

input[type="date"].date-picker-full-click::-webkit-calendar-picker-indicator {
    cursor: pointer !important;
    margin-left: 2px !important;
    padding: 2px !important;
}

/* Капсула быстрого выбора периода (Все, 30 дн, 7 дн, даты) и фильтры */
.bg-slate-950 button,
header button {
    color: #1e293b !important;
    font-weight: 600 !important;
}

.bg-slate-950 button:hover,
header button:hover {
    background-color: #cbd5e1 !important;
    color: #0f172a !important;
}

header button.bg-sky-600,
header button.bg-indigo-600,
.bg-slate-950 button.bg-sky-600,
.bg-slate-950 button.bg-indigo-600 {
    color: #ffffff !important;
}

/* Кнопки переключения подвкладок и карточек */
.bg-slate-900 button.text-slate-400 {
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    font-weight: 600 !important;
}

.bg-slate-900 button.text-slate-400:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

/* 9. ТАБЛИЦЫ: ВЫРАЗИТЕЛЬНАЯ СЕРАЯ ШАПКА, КОНТРАСТНАЯ ЗЕБРА, ЧЕТКИЕ РАЗДЕЛИТЕЛИ */
table {
    border-collapse: separate;
    border-spacing: 0;
    background-color: #ffffff !important;
}

table thead th {
    background-color: #e2e8f0 !important; /* Выразительная серая шапка таблицы (slate-200) */
    color: #0f172a !important;            /* Глубокий темный шрифт заголовков */
    font-weight: 800 !important;
    border-bottom: 2px solid #94a3b8 !important; /* Четкий темный разделитель (slate-400) */
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

table tbody tr {
    background-color: #ffffff !important;
    border-bottom: 1px solid #cbd5e1 !important;
    transition: background-color 0.15s ease;
    color: #0f172a !important;
}

table tbody tr:nth-child(even) {
    background-color: #f1f5f9 !important; /* Отчетливая серая полоса зебры (slate-100) */
}

table tbody tr:hover {
    background-color: #e0f2fe !important; /* Мягкая голубая подсветка при наведении */
}

table td {
    color: #0f172a !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.overflow-x-auto {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 10. БЕЙДЖИ НОМЕНКЛАТУРЫ, ABC, НАЦЕНКИ И РИСКОВ (ЧЕТКИЕ, ЯРКИЕ, КОНТРАСТНЫЕ) */
.bg-emerald-500\/20.text-emerald-300,
span:has(> .fa-box) {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #6ee7b7 !important;
    font-weight: 700 !important;
}

.bg-indigo-500\/20.text-indigo-300,
.bg-blue-500\/20.text-blue-300 {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #7dd3fc !important;
    font-weight: 700 !important;
}

.bg-amber-500\/20.text-amber-300 {
    background: #fffbeb !important;
    color: #92400e !important;
    border: 1px solid #fcd34d !important;
    font-weight: 700 !important;
}

.bg-rose-500\/20.text-rose-300 {
    background: #fff1f2 !important;
    color: #9f1239 !important;
    border: 1px solid #fda4af !important;
    font-weight: 700 !important;
}

/* Бейджи ABC */
.badge-abc-a,
span:contains("A") {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #6ee7b7 !important;
    font-weight: 800 !important;
}
.badge-abc-b {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #7dd3fc !important;
    font-weight: 800 !important;
}
.badge-abc-c {
    background: #fffbeb !important;
    color: #92400e !important;
    border: 1px solid #fcd34d !important;
    font-weight: 800 !important;
}

/* Риски */
.risk-loss {
    background: #fff1f2 !important;
    color: #9f1239 !important;
    border: 1px solid #fda4af !important;
    font-weight: 700 !important;
}
.risk-low {
    background: #fffbeb !important;
    color: #92400e !important;
    border: 1px solid #fcd34d !important;
    font-weight: 700 !important;
}
.risk-normal {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #7dd3fc !important;
    font-weight: 700 !important;
}
.risk-high {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #6ee7b7 !important;
    font-weight: 700 !important;
}

/* Плашка подключенного файла себестоимости в баннере */
.bg-slate-800\/90.border-emerald-500\/40 {
    background-color: #f0fdf4 !important;
    border-color: #86efac !important;
    color: #166534 !important;
}

.bg-slate-800\/90.border-emerald-500\/40 * {
    color: #166534 !important;
}

.bg-slate-800\/90.border-emerald-500\/40 button:hover i {
    color: #be123c !important;
}

/* 11. МОДАЛЬНЫЕ ОКНА И ДИАЛОГИ (ПОЛНАЯ АДАПТИВНОСТЬ ПОД ВСЕ РАЗРЕШЕНИЯ ЭКРАНА) */

html.modal-open,

body.modal-open,

html.overflow-hidden,

body.overflow-hidden {

    overflow: hidden !important;

    height: 100vh !important;

    max-height: 100vh !important;

    touch-action: none !important;

    overscroll-behavior: none !important;

}



/* Фиксированная подложка модального окна — перекрывает ровно 100% экрана от y=0 до низа без единого зазора */

.fixed.inset-0,

.fixed.inset-0[class*="z-"],

div.fixed.inset-0 {

    position: fixed !important;

    top: 0 !important;

    left: 0 !important;

    right: 0 !important;

    bottom: 0 !important;

    width: 100vw !important;

    height: 100vh !important;

    min-width: 100vw !important;

    min-height: 100vh !important;

    margin: 0 !important;

    box-sizing: border-box !important;

    z-index: 99999 !important;

    overflow: hidden !important;

    overscroll-behavior: contain !important;

    background-color: rgba(15, 23, 42, 0.75) !important;

    backdrop-filter: blur(6px) !important;

    -webkit-backdrop-filter: blur(6px) !important;

}



@media (min-width: 640px) {

    .fixed.inset-0[class*="z-"] {

        padding: 1rem !important;

    }

}



@media (min-width: 1024px) {

    .fixed.inset-0[class*="z-"] {

        padding: 1.5rem !important;

    }

}



/* Карточка модального окна внутри подложки */

.fixed.inset-0[class*="z-"] > div {

    width: 100% !important;

    max-width: min(96vw, 1380px) !important;

    max-height: 92vh !important;

    display: flex !important;

    flex-direction: column !important;

    overflow: hidden !important;

    box-sizing: border-box !important;

    margin: 0 !important;

    overscroll-behavior: contain !important;

    background-color: #ffffff !important;

    border: 1px solid var(--border-medium) !important;

    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.2), 0 8px 10px -6px rgba(15, 23, 42, 0.1) !important;

}



.fixed.inset-0[class*="z-"] > div.max-w-md { max-width: min(94vw, 460px) !important; }

.fixed.inset-0[class*="z-"] > div.max-w-lg { max-width: min(94vw, 560px) !important; }

.fixed.inset-0[class*="z-"] > div.max-w-xl { max-width: min(94vw, 680px) !important; }

.fixed.inset-0[class*="z-"] > div.max-w-2xl { max-width: min(95vw, 780px) !important; }

.fixed.inset-0[class*="z-"] > div.max-w-3xl { max-width: min(95vw, 880px) !important; }

.fixed.inset-0[class*="z-"] > div.max-w-4xl { max-width: min(96vw, 1020px) !important; }

.fixed.inset-0[class*="z-"] > div.max-w-5xl { max-width: min(96vw, 1180px) !important; }

.fixed.inset-0[class*="z-"] > div.max-w-6xl { max-width: min(96vw, 1280px) !important; }

.fixed.inset-0[class*="z-"] > div.max-w-7xl,

.fixed.inset-0[class*="z-"] > div[class*="2xl:max-w-6xl"],

.fixed.inset-0[class*="z-"] > div[class*="2xl:max-w-[1400px]"] { max-width: min(96vw, 1400px) !important; }



.fixed.inset-0.z-50 table {
    background-color: #ffffff !important;
}

.fixed.inset-0.z-50 table thead th {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    border-bottom: 2px solid #94a3b8 !important;
}

.fixed.inset-0.z-50 table tbody tr {
    background-color: #ffffff !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

.fixed.inset-0.z-50 table tbody tr:nth-child(even) {
    background-color: #f1f5f9 !important;
}

.fixed.inset-0.z-50 table tbody tr:hover {
    background-color: #e0f2fe !important;
}

/* 11.1 ПЛАВНАЯ ПРОКРУТКА И ИЗОЛЯЦИЯ ЖЕСТОВ ВНУТРИ МОДАЛЬНЫХ ОКОН */
.fixed.inset-0 .overflow-y-auto,
.fixed.inset-0 .overflow-y-scroll,
.fixed.inset-0 [class*="overflow-y-auto"] {
    touch-action: pan-y !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch;
}

.fixed.inset-0 .overflow-x-auto,
.fixed.inset-0 .overflow-x-scroll,
.fixed.inset-0 [class*="overflow-x-auto"] {
    touch-action: pan-x !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch;
}

/* 12. АККУРАТНЫЙ СКРОЛЛБАР */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 13. БЛЮДО В ДВЕ СТРОЧКИ С ПРАВИЛЬНЫМ ПЕРЕНОСОМ */
.dish-cell-wrap {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    line-height: 1.25;
    max-height: 2.6em;
}

/* 14. АНИМИРОВАННЫЙ ПРОГРЕСС-БАР ЗАГРУЗКИ */
@keyframes indeterminate-bar {
    0% { transform: translateX(-100%); width: 40%; }
    50% { transform: translateX(60%); width: 60%; }
    100% { transform: translateX(250%); width: 40%; }
}

.animate-indeterminate {
    animation: indeterminate-bar 1.6s infinite ease-in-out;
}

/* 15. КОМПАКТНЫЙ ВИД ТАБЛИЦ И ЭРГОНОМИЧНЫЙ ИНТЕРВАЛ СТРОК (БЕЗ ПУСТЫХ ПРОСВЕТОВ) */
table th, 
table td {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    line-height: 1.25 !important;
}

table thead th {
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
    font-size: 10px !important;
    letter-spacing: 0.03em;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

.compact-table td, 
.compact-table th {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
    line-height: 1.2 !important;
}

/* 16. АДАПТИВНОСТЬ И ПОЛНАЯ ШИРИНА ЭКРАНА */
.w-full-adaptive {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.table-responsive-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 17. SKELETON LOADER & PULSE */
.skeleton-pulse {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite ease-in-out;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 18. ВСПЛЫВАЮЩИЕ ПОДСКАЗКИ (TOOLTIPS) */
.ui-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.ui-tooltip:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #0f172a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    padding: 5px 9px;
    border-radius: 6px;
    white-space: normal;
    width: max-content;
    max-width: 240px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
    z-index: 9999;
    pointer-events: none;
    animation: tooltip-fade 0.15s ease-out;
}

.ui-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0 5px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
    z-index: 9999;
    pointer-events: none;
}

@keyframes tooltip-fade {
    from { opacity: 0; transform: translate(-50%, 4px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Стилизация подсказок в заголовках таблиц (единый стиль, защита от caps и сдвигов) */
button.ui-tooltip {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    line-height: 1 !important;
    color: inherit !important;
}

th .ui-tooltip,
.ui-tooltip {
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: normal !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: color 0.15s ease, transform 0.15s ease !important;
}

.ui-tooltip:hover {
    color: #0284c7 !important;
}

th .ui-tooltip:hover::after {
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 500 !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    width: max-content !important;
    max-width: 250px !important;
    z-index: 99999 !important;
}

th .ui-tooltip:hover::before {
    z-index: 99999 !important;
}

@media (max-width: 640px) {
    .ui-tooltip:hover::after {
        max-width: 180px;
        font-size: 10px;
        padding: 4px 7px;
    }
}

.cursor-help {
    cursor: help;
}

/* Скрытие скроллбара, но сохранение скролла */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 19. ЕДИНЫЙ ФИКСИРОВАННЫЙ РАЗМЕР ПЛАШЕК КЛАССОВ БЛЮД (UNIFORM DISH CLASS BADGES) */
.dish-class-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 105px !important;
    min-width: 105px !important;
    max-width: 105px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    padding: 1px 4px !important;
    font-size: 9.5px !important;
    font-weight: 600 !important;
    line-height: 1.1 !important;
    border-radius: 6px !important;
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
    box-sizing: border-box !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    transition: all 0.15s ease !important;
    vertical-align: middle !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.dish-class-badge:hover {
    border-color: #0284c7 !important;
    color: #0369a1 !important;
    background-color: #e0f2fe !important;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.15) !important;
}

/* Фиксированная ширина колонки Класс для предотвращения скачков таблицы */
.col-dish-class {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Единый размер плашек ABC-классификации */
.badge-abc {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 24px !important;
    height: 22px !important;
    border-radius: 6px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

/* Единый размер плашек типа блюда в справочнике */
.badge-dish-type {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100px !important;
    height: 24px !important;
    border-radius: 6px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

/* 20. ЕДИНЫЙ ФИКСИРОВАННЫЙ РАЗМЕР ПЛАШЕК FOOD COST И ПРОЦЕНТОВ */
.badge-food-cost,
.badge-percent {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    padding: 0 4px !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

/* Фиксированная ширина колонки Food Cost в таблицах */
.col-food-cost {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* 21. ЕДИНЫЙ ФИКСИРОВАННЫЙ РАЗМЕР ПЛАШЕК СТАТУСА НАЦЕНКИ / МАРЖИ (getCostBadge) */
.badge-cost-status {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 66px !important;
    min-width: 66px !important;
    max-width: 66px !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    border-radius: 6px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    padding: 0 4px !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

/* 22. ЕДИНЫЙ РАЗМЕР ПЛАШЕК КАТЕГОРИЙ В СВОДКАХ */
.badge-category-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    padding: 0 10px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    max-width: 180px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    vertical-align: middle !important;
}

/* 23. СТИЛИ ДРОБНЫХ ПОРЦИЙ: ВЫСОКИЙ КОНТРАСТ, ПРЕМИАЛЬНАЯ ЧИТАЕМОСТЬ */
.badge-portion-violation {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 58px !important;
    height: 22px !important;
    padding: 0 6px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    background-color: #fee2e2 !important; /* нежно-красный фон */
    color: #991b1b !important;            /* контрастный насыщенный темно-красный текст */
    border: 1px solid #f87171 !important;  /* аккуратная розовая рамка */
    white-space: nowrap !important;
}

/* Выпадающие списки столовых и кассиров: фикс стрелки и обрезки */
select.fractional-select {
    padding-right: 2rem !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    cursor: pointer !important;
}
select.fractional-select option {
    background: #ffffff !important;
    color: #0f172a !important;
    padding: 6px 10px !important;
}

/* 24. ВЫПАДАЮЩИЕ МЕНЮ ФИЛЬТРОВ ШАПКИ (MULTI-SELECT DROPDOWNS) */
.multi-select-container {
    position: relative !important;
    display: inline-flex !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}
.multi-select-container > div[v-show],
.multi-select-container > div.absolute {
    z-index: 9999 !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25), 0 8px 10px -6px rgba(15, 23, 42, 0.15) !important;
}
.multi-select-container label {
    color: #0f172a !important;
    cursor: pointer !important;
}
.multi-select-container label:hover {
    background-color: #f1f5f9 !important;
}

/* 25. ЕДИНЫЙ ФИКСИРОВАННЫЙ РАЗМЕР ПЛАШЕК ОПЛАТЫ (ОДИН РАЗМЕР ДЛЯ ВСЕХ) */
.badge-pay-type {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 105px !important;
    min-width: 105px !important;
    max-width: 105px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    padding: 0 6px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

/* 26. СВОДНЫЕ ПЛИТКИ-ФИЛЬТРЫ ДРОБНЫХ ПОРЦИЙ (ЧЁТКИЙ АКТИВНЫЙ ФОКУС И ОТКЛИК КЛИКА) */
.fractional-kpi-card {
    background-color: #ffffff !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 0.75rem !important;
    padding: 0.75rem !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    width: 100% !important;
    text-align: left !important;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.08) !important;
    position: relative !important;
    outline: none !important;
}

.fractional-kpi-card * {
    user-select: none !important;
    -webkit-user-select: none !important;
}

.fractional-kpi-card:hover {
    border-color: #94a3b8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.12), 0 2px 4px -2px rgba(15, 23, 42, 0.08) !important;
}

.fractional-kpi-card:active {
    transform: translateY(1px) scale(0.98) !important;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.1) !important;
}

.fractional-kpi-card-static {
    background-color: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    padding: 0.75rem !important;
    user-select: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.05) !important;
    cursor: default !important;
}

/* Активное состояние: ВСЕ ЧЕКИ С ДОЛЯМИ */
.fractional-kpi-card.is-active-all {
    background-color: #e0f2fe !important; /* sky-100 */
    border: 3px solid #0284c7 !important; /* sky-600 */
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.35), 0 4px 6px -1px rgba(2, 132, 199, 0.2) !important;
}

/* Активное состояние: ПОЛОВИНКИ (0.5) */
.fractional-kpi-card.is-active-halves {
    background-color: #fef3c7 !important; /* amber-100 */
    border: 3px solid #d97706 !important; /* amber-600 */
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.4), 0 4px 6px -1px rgba(217, 119, 6, 0.25) !important;
}

/* Активное состояние: ЧЕТВЕРТИ (0.25 / 0.75) */
.fractional-kpi-card.is-active-quarters {
    background-color: #ffe4e6 !important; /* rose-100 */
    border: 3px solid #e11d48 !important; /* rose-600 */
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.4), 0 4px 6px -1px rgba(225, 29, 72, 0.25) !important;
}

/* Активное состояние: ОБЪЕМ (ШТУЧНЫХ ПОРЦИЙ) */
.fractional-kpi-card.is-active-qty {
    background-color: #f1f5f9 !important; /* slate-100 */
    border: 3px solid #475569 !important; /* slate-600 */
    box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.35) !important;
}

/* Активное состояние: СУММА ПОЗИЦИЙ */
.fractional-kpi-card.is-active-revenue {
    background-color: #dcfce7 !important; /* emerald-100 */
    border: 3px solid #16a34a !important; /* emerald-600 */
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.35) !important;
}

/* Активное состояние: КАССИРЫ / СТОЛОВЫЕ */
.fractional-kpi-card.is-active-cashiers {
    background-color: #e0e7ff !important; /* indigo-100 */
    border: 3px solid #6366f1 !important; /* indigo-600 */
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35), 0 4px 6px -1px rgba(99, 102, 241, 0.25) !important;
}

.badge-card-active {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 2px 7px !important;
    border-radius: 9999px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}
.badge-card-active.badge-sky {
    background-color: #0284c7 !important;
}
.badge-card-active.badge-amber {
    background-color: #d97706 !important;
}
.badge-card-active.badge-rose {
    background-color: #e11d48 !important;
}
.badge-card-active.badge-slate {
    background-color: #475569 !important;
}
.badge-card-active.badge-emerald {
    background-color: #16a34a !important;
}
.badge-card-active.badge-indigo {
    background-color: #6366f1 !important;
}

.badge-card-inactive {
    display: inline-flex !important;
    align-items: center !important;
    padding: 1px 6px !important;
    border-radius: 9999px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #cbd5e1 !important;
}


/* 27. СОРТИРОВКА В ТАБЛИЦАХ ДРОБНЫХ ПОРЦИЙ (ЯРКИЙ ПОНЯТНЫЙ ИНДИКАТОР) */
.th-sortable {
    cursor: pointer !important;
    user-select: none !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
    color: #334155 !important; /* slate-700 */
    font-weight: 600 !important;
    background-color: #f8fafc !important; /* slate-50 */
    border-bottom: 2px solid #cbd5e1 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.th-sortable:hover {
    background-color: #f1f5f9 !important; /* slate-100 */
    color: #0f172a !important;
}

.th-sortable.is-sorted {
    background-color: #f0f9ff !important; /* sky-50 */
    color: #0284c7 !important; /* sky-600 */
    border-bottom: 2px solid #0284c7 !important; /* sky-600 */
    font-weight: 700 !important;
}

.th-sortable.is-sorted:hover {
    background-color: #e0f2fe !important; /* sky-100 */
    color: #0369a1 !important;
}

/* Единая кнопка подсказки в столбцах таблиц (?) */
.th-help-btn {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    max-width: 14px !important;
    border-radius: 9999px !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #e2e8f0 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
    margin-left: 2px !important;
    margin-right: 1px !important;
    padding: 0 !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

.th-help-btn:hover {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.4) !important;
}

/* 27b. СОРТИРОВКА В ТАБЛИЦАХ АУДИТА ПОСТАВОК / НАКЛАДНЫХ */
.th-sortable-dark {
    cursor: pointer !important;
    user-select: none !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
    color: #0f172a !important; /* slate-900 */
    font-weight: 700 !important;
    background-color: #e2e8f0 !important; /* slate-200 */
    border-bottom: 2px solid #94a3b8 !important; /* slate-400 */
    box-sizing: border-box !important;
}

.th-sortable-dark:hover {
    background-color: #cbd5e1 !important; /* slate-300 */
    color: #0f172a !important;
}

.th-sortable-dark.is-sorted {
    background-color: #e0f2fe !important; /* sky-100 */
    color: #0369a1 !important; /* sky-700 */
    border-bottom: 2px solid #0284c7 !important; /* sky-600 */
    font-weight: 700 !important;
}

.th-sortable-dark.is-sorted:hover {
    background-color: #bae6fd !important; /* sky-200 */
    color: #0369a1 !important;
}


/* 28. ПЕРЕКЛЮЧАТЕЛЬ МЕТРИК ЭФФЕКТИВНОСТИ СТОЛОВЫХ (Food Cost %, Ср. чек, Чеки) */
.canteen-metrics-switcher {
    background-color: #f1f5f9 !important; /* slate-100 */
    border: 1px solid #cbd5e1 !important; /* slate-300 */
    padding: 2px !important;
    gap: 3px !important;
    border-radius: 8px !important;
}

.canteen-metric-btn {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    padding: 0 9px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 5px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

/* Активное состояние кнопки (акцентный небесно-синий с белым текстом) */
.canteen-metric-btn.is-active {
    background-color: #0284c7 !important; /* sky-600 */
    border: 1px solid #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px 0 rgba(2, 132, 199, 0.3) !important;
}
.canteen-metric-btn.is-active:hover {
    background-color: #0369a1 !important; /* sky-700 */
    border-color: #0369a1 !important;
    color: #ffffff !important;
}

/* Неактивное состояние кнопки (аккуратная белая кнопка с контрастным текстом) */
.canteen-metric-btn:not(.is-active) {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important; /* slate-700 */
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.04) !important;
}
.canteen-metric-btn:not(.is-active):hover {
    background-color: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}



/* ========================================================
   ACTIVE CANTEEN SCOPE BANNERS (HIGH CONTRAST & WCAG AAA)
   ======================================================== */
.active-canteen-table-banner,
.active-canteen-kpi-banner {
    background-color: #f0f9ff !important;
    background-image: linear-gradient(to right, #f0f9ff, #e0f2fe, #f8fafc) !important;
    border-color: #bae6fd !important;
    color: #0f172a !important;
}

.active-canteen-table-banner strong,
.active-canteen-kpi-banner strong {
    background-color: #ffffff !important;
    color: #0369a1 !important;
    border: 1px solid #7dd3fc !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
    font-weight: 700 !important;
}

.active-canteen-table-banner span,
.active-canteen-kpi-banner span {
    color: #334155 !important;
}

.active-canteen-table-banner .text-slate-800,
.active-canteen-kpi-banner .text-slate-800 {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.active-canteen-table-banner .bg-sky-600,
.active-canteen-kpi-banner .bg-sky-600 {
    background-color: #0284c7 !important;
    color: #ffffff !important;
}

.active-canteen-table-banner .bg-sky-600 i,
.active-canteen-kpi-banner .bg-sky-600 i {
    color: #ffffff !important;
}

.active-canteen-table-banner button,
.active-canteen-kpi-banner button {
    background-color: #ffffff !important;
    color: #be123c !important;
    border: 1px solid #fda4af !important;
    font-weight: 600 !important;
}

.active-canteen-table-banner button:hover,
.active-canteen-kpi-banner button:hover {
    background-color: #fff1f2 !important;
    border-color: #fb7185 !important;
    color: #9f1239 !important;
}

.active-canteen-table-banner button i,
.active-canteen-kpi-banner button i {
    color: #e11d48 !important;
}

/* ========================================================
   29. ЕДИНЫЙ СТИЛЬ ВКЛАДОК И ФИЛЬТРОВ ABC-АНАЛИЗА
   ======================================================== */
.subtab-pill-group {
    display: inline-flex !important;
    align-items: center !important;
    border-radius: 0.5rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
    border: 1px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    color: #334155 !important;
    user-select: none !important;
    height: 32px !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

.subtab-pill-group:hover {
    border-color: #94a3b8 !important;
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

.subtab-pill-group.is-active {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25) !important;
}

.subtab-pill-group.is-active > .subtab-pill-btn,
.subtab-pill-group.is-active > .subtab-pill-btn span,
.subtab-pill-group.is-active > .subtab-pill-btn i,
.subtab-pill-group.is-active > .subtab-pill-arrow,
.subtab-pill-group.is-active > .subtab-pill-arrow i {
    color: #ffffff !important;
}

.subtab-pill-group.pill-cost.is-active {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
}

.subtab-pill-group.pill-outsiders.is-active {
    background-color: #e11d48 !important;
    border-color: #e11d48 !important;
}

/* Standalone Subtab Pills (No dropdown arrow) */
.subtab-pill-group.subtab-pill-standalone {
    padding: 0 0.75rem !important;
    gap: 0.375rem !important;
    cursor: pointer !important;
    border-radius: 0.5rem !important;
}

.subtab-pill-group.subtab-pill-standalone:hover {
    border-color: #94a3b8 !important;
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

.subtab-pill-group.subtab-pill-standalone.is-active {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25) !important;
}

.subtab-pill-group.subtab-pill-standalone.is-active i,
.subtab-pill-group.subtab-pill-standalone.is-active span {
    color: #ffffff !important;
}

.subtab-pill-group.subtab-pill-standalone.pill-cost.is-active {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
}

.subtab-pill-group.subtab-pill-standalone.pill-outsiders.is-active {
    background-color: #e11d48 !important;
    border-color: #e11d48 !important;
    color: #ffffff !important;
}

.subtab-pill-btn {
    all: unset !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.375rem !important;
    padding: 0 0.5rem 0 0.625rem !important;
    height: 100% !important;
    cursor: pointer !important;
    border-radius: 0.5rem 0 0 0.5rem !important;
    color: inherit !important;
    background: transparent !important;
    border: none !important;
    font-weight: inherit !important;
    font-size: inherit !important;
    box-sizing: border-box !important;
}

.subtab-pill-btn:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

.subtab-pill-group.filter-active-sky {
    background-color: #f0f9ff !important;
    border-color: #7dd3fc !important;
    color: #0369a1 !important;
}

.subtab-pill-group.filter-active-emerald {
    background-color: #ecfdf5 !important;
    border-color: #6ee7b7 !important;
    color: #047857 !important;
}

.subtab-pill-arrow {
    all: unset !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 0.5rem 0 0.25rem !important;
    height: 100% !important;
    cursor: pointer !important;
    border-radius: 0 0.5rem 0.5rem 0 !important;
    color: inherit !important;
    background: transparent !important;
    border: none !important;
    opacity: 0.6 !important;
    transition: opacity 0.15s, background-color 0.15s !important;
    box-sizing: border-box !important;
}

.subtab-pill-arrow:hover {
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.subtab-pill-group.is-active .subtab-pill-arrow:hover {
    background-color: rgba(255, 255, 255, 0.18) !important;
}

.subtab-pill-arrow::before {
    content: '' !important;
    display: block !important;
    width: 1px !important;
    height: 14px !important;
    background-color: currentColor !important;
    opacity: 0.25 !important;
    margin-right: 0.375rem !important;
}

.subtab-filter-dot {
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
    background-color: #0284c7 !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

.subtab-pill-group.is-active .subtab-filter-dot {
    background-color: #fef08a !important;
}

.subtab-dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.18), 0 8px 10px -6px rgba(15, 23, 42, 0.1) !important;
    color: #0f172a !important;
    border-radius: 0.75rem !important;
}

.subtab-dropdown-menu input[type="text"] {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

.subtab-dropdown-menu input[type="text"]:focus {
    border-color: #0284c7 !important;
    background-color: #ffffff !important;
    outline: none !important;
}

.subtab-dropdown-menu label:hover {
    background-color: #f1f5f9 !important;
}

/* Ensure text in dropdown menus is crisp, dark and not inherited from active pills */
.subtab-dropdown-menu,
.subtab-dropdown-menu *,
.subtab-pill-group .subtab-dropdown-menu,
.subtab-pill-group .subtab-dropdown-menu *,
.subtab-pill-group.is-active .subtab-dropdown-menu,
.subtab-pill-group.is-active .subtab-dropdown-menu * {
    color: #1e293b !important;
}

.subtab-dropdown-menu input[type="text"],
.subtab-pill-group.is-active .subtab-dropdown-menu input[type="text"] {
    color: #0f172a !important;
    background-color: #f8fafc !important;
}

.subtab-dropdown-menu input[type="text"]::placeholder,
.subtab-pill-group.is-active .subtab-dropdown-menu input[type="text"]::placeholder {
    color: #94a3b8 !important;
}

.subtab-dropdown-menu .text-sky-600,
.subtab-pill-group.is-active .subtab-dropdown-menu .text-sky-600 {
    color: #0284c7 !important;
}

.subtab-dropdown-menu .text-rose-600,
.subtab-pill-group.is-active .subtab-dropdown-menu .text-rose-600 {
    color: #e11d48 !important;
}

.subtab-dropdown-menu .text-emerald-700,
.subtab-pill-group.is-active .subtab-dropdown-menu .text-emerald-700 {
    color: #047857 !important;
}

.subtab-dropdown-menu .text-blue-700,
.subtab-pill-group.is-active .subtab-dropdown-menu .text-blue-700 {
    color: #1d4ed8 !important;
}

.subtab-dropdown-menu .text-amber-700,
.subtab-pill-group.is-active .subtab-dropdown-menu .text-amber-700 {
    color: #b45309 !important;
}

.subtab-dropdown-menu .text-slate-400,
.subtab-pill-group.is-active .subtab-dropdown-menu .text-slate-400 {
    color: #94a3b8 !important;
}

.subtab-dropdown-menu .text-slate-500,
.subtab-pill-group.is-active .subtab-dropdown-menu .text-slate-500 {
    color: #64748b !important;
}

/* ORDERS FORECAST & PRINT STYLES */
@media print {
    /* Hide everything non-essential when printing */
    header, aside, #sidebar, .sidebar, nav, .no-print, button, input[type="file"], .btn-action {
        display: none !important;
    }
    body, main, #app, .main-content {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    .print-sheet {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 10mm !important;
    }
    .print-only {
        display: block !important;
    }
    table {
        border-collapse: collapse !important;
        width: 100% !important;
        font-size: 11px !important;
    }
    th, td {
        border: 1px solid #333333 !important;
        padding: 4px 6px !important;
        color: #000000 !important;
    }
    th {
        background-color: #f1f5f9 !important;
        font-weight: bold !important;
    }
    .page-break {
        page-break-after: always;
    }
}
.print-only {
    display: none;
}


/* ==========================================================================
   VAT Mode: Both (Stacked с НДС / без НДС друг над другом)
   ========================================================================== */
body.vat-mode-both table td,
body.vat-mode-both table th,
.vat-mode-both table td,
.vat-mode-both table th,
body.vat-mode-both .whitespace-nowrap,
.vat-mode-both .whitespace-nowrap,
body.vat-mode-both .font-mono,
.vat-mode-both .font-mono,
body.vat-mode-both .kpi-val,
.vat-mode-both .kpi-val,
body.vat-mode-both .vat-cell,
.vat-mode-both .vat-cell,
body.vat-mode-both .vat-stack,
.vat-mode-both .vat-stack {
    white-space: pre !important;
    line-height: 1.25 !important;
}

body.vat-mode-both .text-3xl,
.vat-mode-both .text-3xl {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
    white-space: pre !important;
}

/* Exempt non-money text elements from pre formatting so they wrap normally */
body.vat-mode-both .dish-cell-wrap,
.vat-mode-both .dish-cell-wrap,
body.vat-mode-both .normal-wrap,
.vat-mode-both .normal-wrap {
    white-space: normal !important;
}
