/* ✅✅✅ ОБЩИЕ СТИЛИ САЙТА ✅✅✅ */

body {
    margin: 0;                                       /* Убираем внешние отступы */
    padding: 0;                                      /* Убираем внутренние отступы */
    font-family: 'Roboto', sans-serif;              /* Новый шрифт Roboto */
    font-size: 16px;                                 /* ✅ Увеличенный размер шрифта */
    background-color: #f8f9fa;                       /* Светло-серый фон */
}



/* ✅✅✅ ШАПКА (HEADER) ✅✅✅ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;

    background-color: #002e36;      /* Цвет фона шапки */
    color: white;                   /* Цвет текста */
    padding: 12px 20px;             /* Внутренние отступы */
    display: flex;                  /* Горизонтальное размещение */
    justify-content: space-between;/* Распределение между логотипом и кнопками */
    align-items: center;            /* Вертикальное центрирование */
    height: 60px;                   /* Высота шапки */
}


.header .btn {
    font-size: 14px;                                 /* Размер текста кнопок */
    padding: 6px 12px;                               /* Внутренние отступы */
    margin-left: 5px;                                /* Отступ между кнопками */
    border: 1px solid white;                         /* Белая рамка */
    background-color: transparent;                   /* Прозрачный фон */
    color: white;                                    /* Белый текст */
    transition: all 0.2s ease-in-out;                /* Плавное изменение при наведении */
}

.header .btn:hover {
    background-color: white;                         /* Белый фон при наведении */
    color: #002e36;                                  /* Тёмный текст */
}


/* ✅✅✅ БОКОВАЯ ПАНЕЛЬ ✅✅✅ */

.sidebar {
    position: fixed;
    top: 60px;                     /* ⬇ ниже фиксированной шапки */
    left: 0;
    width: 70px;
    height: calc(100vh - 60px);    /* Высота от верха до низа */
    background-color: #002e36;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    flex-shrink: 0;
    z-index: 999;
}



/* ✅✅✅ ОБЛАСТЬ КОНТЕНТА ✅✅✅ */

.content-wrapper {
    background-color: #f8f9fa;
    padding: 30px;
    margin-top: 60px;         /* ⬅️ отступ под шапку */
    margin-left: 40px;        /* ⬅️ отступ слева */
    margin-right: -40px;       /* ✅ отступ справа */
    min-height: calc(100vh - 60px);
    flex-grow: 1;
}




/* ✅✅✅ ФОРМА АВТОРИЗАЦИИ / РЕГИСТРАЦИИ ✅✅✅ */

.auth-wrapper {
    min-height: 100vh;                               /* Высота страницы */
    display: flex;                                   /* Flex-контейнер */
    justify-content: center;                         /* Центрирование по горизонтали */
    align-items: flex-start;                         /* Отступ сверху */
    padding-top: 80px;
}

.auth-form-container {
    background-color: #ffffff;                       /* Белый фон формы */
    padding: 30px;                                   /* Внутренние отступы */
    border-radius: 10px;                             /* Скругление углов */
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);      /* Мягкая тень */
    width: 100%;
    max-width: 420px;                                /* Максимальная ширина формы */
}

.auth-form-container h2 {
    text-align: center;                              /* Заголовок по центру */
    margin-bottom: 25px;                             /* Отступ снизу */
    font-size: 24px;                                 /* Размер шрифта */
    font-weight: bold;                               /* Жирный */
    color: #264653;                                  /* Цвет заголовка */
}

.auth-form-container form .form-control {
    margin-bottom: 15px;                             /* Отступ между полями формы */
}

.auth-form-container .btn {
    font-size: 16px;                                 /* Размер текста кнопки */
    padding: 10px 15px;                              /* Отступы */
    font-weight: bold;                               /* Жирный текст */
}

/* ✅✅✅ ✅✅✅ ✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅ */

/* 💬 СТИЛЬ ВСПЛЫВАЮЩЕЙ ПОДСКАЗКИ (tooltip) */
.sidebar-icon::after {
    content: attr(data-tooltip);                     /* Текст подсказки берётся из data-tooltip */
    position: absolute;                              /* Абсолютное позиционирование подсказки */
    left: 130%;                                       /* Сдвигаем подсказку правее от иконки */
    top: 50%;                                         /* Центрируем подсказку по вертикали */
    transform: translateY(-50%) translateX(0);        /* Начальное положение: по центру иконки */
    background-color: #002e36;                        /* Цвет фона подсказки */
    color: #fff;                                      /* Цвет текста */
    padding: 6px 10px;                                /* Отступы внутри подсказки */
    border-radius: 5px;                               /* Скруглённые углы */
    white-space: nowrap;                              /* Запрещаем перенос текста */
    opacity: 0;                                       /* Сначала подсказка скрыта */
    pointer-events: none;                            /* Подсказка не мешает клику */
    transition: opacity 0.1s ease-in, transform 0.1s ease-in;  /* Плавное быстрое появление */
    font-size: 13px;                                  /* Размер текста */
    z-index: 1000;                                    /* Подсказка поверх всех элементов */
    text-transform: uppercase;                        /* Заглавные буквы */
    font-weight: 600;                                 /* Жирный текст */
}

/* ✨ ПОКАЗ ПОДСКАЗКИ ПРИ НАВЕДЕНИИ */
.sidebar-icon:hover::after {
    opacity: 1;                                       /* Делаем подсказку видимой */
    transform: translateY(-50%) translateX(-15px);     /* Немного выдвигаем её вправо при наведении */
}
/* 🟩 Блок строки в боковой панели */
.sidebar-item {
    width: 100%;                          /* Вся строка по ширине панели */
    padding: 0;                           /* Убираем внутренние отступы */
}

/* 🟦 Ссылка с иконкой внутри блока */
.sidebar-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 14px 0;
    color: white;
    font-size: 28px;                     /* 👈 увеличенный размер */
    text-decoration: none;
    position: relative;
    transition: background-color 0.1s ease, transform 0.2s ease;
    border: none;
}
/* 🟦 размер иконок */
.sidebar-icon svg {
    width: 30px;
    height: 30px;
}

.nav-tabs {
    border-bottom: none;
}
/* ✨ Эффект при наведении */
.sidebar-icon:hover {
    background-color: #2d4e55;           /* Подсветка всей строки */
}
/* ✅✅✅ ✅✅✅ ✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅ */
/* 🔷 СТИЛЬ: Универсальная таблица для всех страниц */
.custom-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    font-size: inherit;
    border-radius: 6px;
    table-layout: auto;               /* автоширина */
    word-break: keep-all;             /* не ломаем слова */
    overflow-x: hidden;                 /* прокрутка по ширине */
}

.custom-table td,
.custom-table th {
    padding: 2px 6px;                 /* уменьшили вертикальный отступ */
    line-height: 1.1;                 /* плотнее строки */
    vertical-align: middle;
    border: 1px solid black;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}



/* Первая колонка — без ограничений по ширине */
.custom-table td:first-child {
    max-width: none;
    overflow: visible;
    text-overflow: unset;
    white-space: nowrap;
}


/* 🟩 СТИЛЬ: Заголовок таблицы (шапка) */
.custom-table thead {
    background-color: #3d6066;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
}

/* 🟥 Подсветка строки при наведении */
.custom-table tbody tr:hover {
    background-color: #f1f1f1;
}
/* ✅ Горизонтальный свайп таблицы */
.table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* плавный свайп на iOS */
    width: 100%;
}

/* ✅ Защита от сжатия таблицы: она будет широкой и прокручиваемой */
.custom-table {
    min-width: 1000px;
}

/* ✅✅✅ ✅✅✅ ✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅ */

/* 🔘 СТИЛЬ КНОПОК С ИКОНКАМИ (галочка, корзина в админке) */
.icon-button {
    background: none;            /* Убираем фон */
    border: none;                /* Убираем рамку */
    padding: 0;                  /* Без внутренних отступов */
    cursor: pointer;             /* Курсор-рука при наведении */
    font-size: 18px;             /* Размер иконки */
    transition: transform 0.2s ease, opacity 0.2s ease;  /* Плавность анимаций */
}

/* 🔄 ЭФФЕКТ ПРИ НАВЕДЕНИИ */
.icon-button:hover {
    transform: scale(1.2);       /* Увеличиваем размер на 20% */
    opacity: 0.8;                /* Лёгкое затемнение */
}
/* ✅✅✅ ✅✅✅ ✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅ */
/* 🌌 МОДАЛЬНОЕ ЗАТЕМНЕНИЕ в админке*/
/* 🧩 Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-box {
    background: white;
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

.modal-header {
    padding: 15px 20px;
}

.modal-header h5 {
    margin: 0;
}

.modal-body {
    padding: 20px;
    font-size: 16px;
    color: #333;
}

.modal-footer {
    padding: 10px 20px;
    border-top: 1px solid #eee;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  border-radius: 12px;
  white-space: nowrap;
}


/* 🟢 Кнопка YES */
.btn-success {
    background-color: #28a745;
    color: white;
    padding: 8px 20px;
    font-weight: bold;
    border-radius: 4px;
    border: none;
    transition: background-color 0.2s ease;
}

.btn-success:hover {
    background-color: #218838;
}

/* 🔴 Кнопка NO */
.btn-danger {
    background-color: #dc3545;
    color: white;
    padding: 8px 20px;
    font-weight: bold;
    border-radius: 4px;
    border: none;
    transition: background-color 0.2s ease;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Общие стили для кнопок в модалке */
.modal-footer .btn {
    margin-left: 10px;
    font-size: 14px;
    letter-spacing: 0.5px;
    width: 80px;
    text-align: center;
}

/* ✅✅✅ ✅✅✅ ✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅ */
/* 🌌 всплывающее сообщение об изменении удалии и внимание*/

.custom-toast-container {
  position: fixed;
  top: 80px; /* немного ниже шапки */
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.custom-toast {
  min-width: 300px;
  max-width: 600px;
  margin-top: 10px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: fadein 0.4s, fadeout 0.4s 7.6s forwards; /* добавляем задержку перед исчезновением */
}

/* Цвета под категории */
.custom-toast.success {
  background-color: #28a745;
}

.custom-toast.danger {
  background-color: #dc3545;
}

.custom-toast.warning {
  background-color: #ffc107;
  color: #212529;
}

/* Плавное появление */
@keyframes fadein {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Плавное исчезновение */
@keyframes fadeout {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(10px); }
}

/* ✅✅✅ ✅✅✅ ✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅ */
/* 🌌 в справочнике стили для карточек*/

.menu-card {
    border: 1px solid rgba(0, 0, 0, 0.08); /* светлый контур */
    border-radius: 1rem;
    background-color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* начальная лёгкая тень */
}

.menu-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1); /* глубже при наведении */
    border-color: rgba(0, 0, 0, 0.15); /* усиливаем контур */
}

.menu-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* небольшая тень под иконкой */
}

/* Цвета иконок */
.bg-blue { background-color: #0d6efd; }
.bg-green { background-color: #198754; }
.bg-purple { background-color: #6f42c1; }

.menu-text {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.4;
}

a.icon-button {
  color: inherit;           /* Наследовать цвет */
  text-decoration: none;    /* Убрать подчёркивание */
}

a.icon-button:hover {
  transform: scale(1.3);
  color: #0d6efd;           /* При наведении — синий */
}



.bg-startend td {
    background-color: #ffe473;
}

.bg-income td {
    background-color: #88f46c;
}

.bg-expense td {
    background-color: #ef7681;
}

.bg-net td {
    background-color: #57b4ff;
}

.bg-transfer td {
    background-color: #c6c5c5;
}

.bg-income-cat td {
    background-color: #c9f8c5;
}

.bg-expense-cat td {
    background-color: #f3bebe;
}

.bg-transfer-cat td {
    background-color: #c6c5c5;
}

/* ✅✅✅ ✅✅✅ ✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅ */
/*  // в боковом меню опу и ддс выходит окно*/

.sidebar-submenu {
    position: absolute;
    top: 0;
    left: calc(100% + 5px);
    background-color: #002e36;
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 9999; /* 🔼 повышаем приоритет */
    min-width: 220px;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}



.submenu-item {
    color: white;
    padding: 12px 16px;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.submenu-item:hover {
    background-color: #2d4e55;
}

.sidebar-item.open .sidebar-submenu {
    display: flex !important;
}

/* ✅✅✅ ✅✅✅ ✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅ */
/*  // кнопка поиска и сброса*/
.simple-btn-primary {
    background-color: #0d6efd;
    color: white;
    border: 1px solid #0b5ed7;
    border-radius: 6px;
    padding: 8px 16px;
    transition: transform 0.15s ease-in-out;
    font: inherit;
}

.simple-btn-primary:hover {
    transform: scale(1.03);
    background-color: #0d6efd;
    border: 1px solid #0b5ed7;
    color: white; /* ✅ сохраняем белый текст при наведении */
}


.simple-btn-secondary {
    background-color: white;
    color: #212529;
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 8px 16px;
    transition: transform 0.15s ease-in-out;
    font: inherit;
}

.simple-btn-secondary:hover {
    transform: scale(1.03);
    background-color: white;      /* не меняем */
    border: 1px solid #ced4da;    /* не меняем */
}
.filter-input,
.simple-btn-primary,
.simple-btn-secondary {
    height: 38px;        /* 👈 одинаковая высота */
    padding: 6px 16px;
    font: inherit;
    border-radius: 6px;
}
.filter-block {
    background: #f1f3f5;
    border: 1px solid #d1d1d1;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* 🌈 Эффект при наведении */
.filter-block:hover {
    background: #e9ecef; /* чуть темнее при hover */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #c1c1c1;
}

#categoryDropdown {
    min-width: max-content;
    width: auto !important;
    white-space: nowrap;
}

#categoryDropdown .dropdown-item {
    white-space: nowrap;
    padding-right: 16px;
    padding-left: 16px;
}


/* ✅✅✅ ✅✅✅ ✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅ */
/*  // коменты в операции спрятаны*/

.comment-cell {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  max-height: 3em; /* высота примерно 2 строки */
  transition: all 0.2s ease-in-out;
  white-space: normal;
  position: relative;
  z-index: 1;
}

.comment-cell:hover {
  -webkit-line-clamp: unset;
  max-height: none;
  z-index: 100;
}

/* ✅✅✅ ✅✅✅ ✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅ */
/*  // кнопки в операции */


.operation-btn {
    padding: 10px 20px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border: none;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: white;
}

.operation-btn:hover {
    transform: translateY(-2px);
    color: white;
}

/* Зеленая */
.btn-green {
    background: linear-gradient(to right, #28a745, #218838);
}

.btn-green:hover {
    background: linear-gradient(to right, #218838, #1e7e34);
}

/* Синяя */
.btn-blue {
    background: linear-gradient(to right, #0d6efd, #0b5ed7);
}

.btn-blue:hover {
    background: linear-gradient(to right, #0b5ed7, #0a53be);
}

/* Желтая */
.btn-yellow {
    background: linear-gradient(to right, #ffc107, #e0a800);
    color: #212529;
}

.btn-yellow:hover {
    background: linear-gradient(to right, #e0a800, #d39e00);
    color: #212529;
}

.operations-title {
    font-size: 28px;
    font-weight: 800;               /* Очень жирный */
    color: #002e36;                 /* Цвет в тон шапки */
    letter-spacing: 0.5px;          /* Лёгкое разрежение букв */
    text-transform: uppercase;      /* Все заглавные буквы */
}

/* ✅✅✅ ✅✅✅ ✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅✅ */
/*  // стиль таблицы в справочнике *//* 🔷 СТИЛЬ: Универсальная таблица для всех страниц */
.reference-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    font-size: inherit;
    border-radius: 6px;
    table-layout: auto;               /* автоширина */
    word-break: keep-all;             /* не ломаем слова */
    overflow-x: auto;                 /* прокрутка по ширине */
}

.reference-table th {
    padding: 12px 6px;
    line-height: 1.1;
    vertical-align: middle;
    border: 1px solid black;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
}
.reference-table td {
    padding: 2px 6px;
    line-height: 1.1;
    vertical-align: middle;
    border: 1px solid black;
    white-space: nowrap;           /* ❗ не переносим слова */
    overflow: visible;             /* ❗ не обрезаем */
    text-overflow: unset;          /* ❗ не показываем многоточие */
}
/* Первая колонка — без ограничений по ширине */
.reference-table td:first-child {
    max-width: none;
    overflow: visible;
    text-overflow: unset;
    white-space: nowrap;
}


/* 🟩 СТИЛЬ: Заголовок таблицы (шапка) */
.reference-table thead {
    background-color: #3d6066;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
}

/* 🟥 Подсветка строки при наведении */
.reference-table tbody tr:hover {
    background-color: #f1f1f1;
}


/* Скрываем горизонтальный скролл у .table-responsive */
#loadsTableResponsiveDiv {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    position: relative;
}


/* Фиксированный плавающий скроллбар снизу */
#loadsFloatingScrollbarContainer {
    position: fixed;
    bottom: 0;
    height: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    background-color: #f1f1f1;
    z-index: 9999;
    display: none;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

/* Содержимое скроллбара */
#loadsFloatingScrollbarContent {
    height: 1px;
}

/* Фиксированный плавающий скроллбар снизу для Operations */
#operationsFloatingScrollbarContainer {
    position: fixed;
    bottom: 0;
    height: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    background-color: #f1f1f1;
    z-index: 9999;
    display: none;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

/* Содержимое скроллбара */
#operationsFloatingScrollbarContent {
    height: 1px;
}

html, body {
    overflow-x: hidden !important;
}

.row-invoiced td {
    background-color: #ffcccc !important;  /* светло-красный */
}
.row-posted td {
    background-color: #ffcccc !important;  /* светло-красный */
}
.row-paid td {
    background-color: #ccffcc !important;  /* светло-зелёный */
}

/* Цвет фона по статусу — текст ЧЁРНЫЙ */
tr.row-status-danger td {
    background-color: #ff8686 !important;
    color: #000 !important;
}

tr.row-status-warning td {
    background-color: #f4d873 !important;
    color: #000 !important;
}

tr.row-status-success td {
    background-color: #87fa87 !important;
    color: #000 !important;
}

.floating-scrollbar-container {
    overflow-x: auto;
    overflow-y: hidden;
    height: 16px;
    position: fixed;
    bottom: 0;
    left: 0;
    display: none;
    background-color: #f8f9fa;
    z-index: 999;
}

.floating-scrollbar-content {
    height: 1px;
}
.hover-highlight:hover {
    background-color: #f0f8ff; /* Светло-голубой фон */
    transition: background-color 0.2s ease-in-out;
}

.clickable-text {
    cursor: pointer;
}
.clickable-statement {
    cursor: pointer; /* 👉 палец при наведении */
}

/* ✨ Мягкая подсветка строки при наведении, без стирания цвета */
.custom-table tbody tr.hover-glow:hover td {
    box-shadow: inset 0 0 0 1000px rgba(255, 255, 255, 0.30);
}

.status-transparent {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-size: 14px; /* оставить как текст */
    cursor: pointer;
}

.status-transparent:focus {
    outline: none !important;
    box-shadow: none !important;
}
.table-header-custom {
    background-color: #3d6066 !important;
    color: #ffffff !important;
}

.table-header-custom th {
    background-color: #3d6066 !important;
    color: #ffffff !important;
}
