/* Восстанавливаем скролл для страницы */
html {
    scroll-behavior: smooth; /* Плавный скролл */
    overflow-y: auto; /* Разрешаем вертикальный скролл */
    height: auto !important; /* Переопределяем стили из style.css */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: stretch;
    align-items: flex-start;
    min-height: 100vh;
    color: #333;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    overflow-y: auto; /* Разрешаем вертикальный скролл */
    overflow-x: hidden; /* Предотвращаем горизонтальный скролл */
    height: auto !important; /* Переопределяем стили из style.css */
}

/* Восстанавливаем скролл для основного контейнера */
.wallet-page {
    overflow-y: auto;
    overflow-x: hidden;
    height: auto;
    min-height: 100vh;
}

/* Переопределяем стили из style.css для страницы кошелька */
.wallet-page body,
.wallet-page html {
    height: auto !important;
    overflow-y: auto !important;
    width: 100% !important;
}

.wallet-page #app {
    height: auto !important;
    min-height: 100vh;
    overflow-y: auto !important;
    width: 100% !important;
}

.wallet-container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 800px; /* Ограничиваем максимальную ширину */
    margin: 0 auto; /* Центрируем по горизонтали */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Растягиваем на всю высоту экрана */
    /* Убираем overflow-y: auto чтобы не блокировать скролл страницы */
}

/* Переопределяем стили #app для страницы кошелька */
.wallet-page #app {
    height: auto !important;
    min-height: 100vh;
    overflow-y: auto !important;
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
}



.wallet-header {
    background-color: #007bff;
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    position: relative;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.wallet-header .header-left,
.wallet-header .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

.wallet-header .header-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
    position: absolute;
    right: 0;
    margin: auto;
    z-index: 2;
    width: 60%;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Стиль для строгого центрирования заголовка */
.wallet-header .header-title {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    margin: auto !important;
    text-align: center !important;
    width: fit-content !important;
    max-width: 80% !important;
    z-index: 10 !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transform: translateX(0) !important;
}

.wallet-header .back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    transition: all 0.2s;
    margin-right: 0;
    text-decoration: none;
    z-index: 10;
    color: #fff;
    padding: 0;
}
.wallet-header .back-button:hover, .wallet-header .back-button:focus {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    text-decoration: none;
}
.wallet-header .back-button .fa-home {
    color: #fff;
    font-size: 1.1rem;
}
.wallet-header .back-button:hover .fa-home {
    color: #fff;
}

.wallet-header .add-task-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    transition: all 0.2s;
    margin-left: auto;
    text-decoration: none;
    z-index: 10;
    color: #fff;
    padding: 0;
}
.wallet-header .add-task-btn:hover,
.wallet-header .add-task-btn:focus {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}
.wallet-header .add-task-btn .fa-plus {
    color: #fff;
    font-size: 1.1rem;
}

/* Общие стили для кнопок в шапке */
.wallet-header .header-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    transition: all 0.2s;
    text-decoration: none;
    z-index: 10;
    color: #fff;
    padding: 0;
}
.wallet-header .header-button:hover, .wallet-header .header-button:focus {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    text-decoration: none;
}
.wallet-header .header-button i {
    color: #fff;
    font-size: 1.1rem;
}
.wallet-header .header-button:hover .header-button i {
    color: #fff;
}



/* Контейнер для плавающих иконок */
#floating-icons-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Иконки не будут мешать кликам по кнопкам */
    z-index: 1; /* Под контентом хедера */
    overflow: hidden;
}

/* Стили для самих иконок */
.floating-icon {
    position: absolute;
    display: block;
    opacity: 0.3; /* Начальная прозрачность */
    width: 28px;  /* Размер для SVG */
    height: 28px; /* Размер для SVG */
    filter: brightness(0) invert(1); /* Делает иконки белыми */
    z-index: 1;
    transition: opacity 0.5s ease; /* Добавляем плавность при изменении прозрачности */
}

.wallet-body {
    padding: 20px;
}

/* Панель с балансом */
.balance-panel {
    position: relative;
    background: linear-gradient(135deg, rgba(0,123,255,0.7) 0%, rgba(0,86,179,0.9) 100%), url('/static/img/finance_card/ChatGPT.png') center 45%/100% no-repeat;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    color: white;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.balance-panel:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.35);
}

/* Размытость (soft vignette) по углам для панели баланса */
.balance-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 15px;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.15), transparent 60%),
        radial-gradient(circle at top right, rgba(255,255,255,0.15), transparent 60%),
        radial-gradient(circle at bottom left, rgba(255,255,255,0.15), transparent 60%),
        radial-gradient(circle at bottom right, rgba(255,255,255,0.15), transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.balance-info {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

/* Кнопки в панели баланса */
.balance-panel-buttons {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.balance-panel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.balance-panel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    text-decoration: none;
    color: white;
}

.balance-panel-btn i {
    font-size: 0.9rem;
}

.balance-info {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    text-align: center;
}

.balance-amount {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    flex: 1;
    min-width: 200px;
}



.balance-label {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 5px;
    text-align: center;
    width: 100%;
}

.balance-value-container {
    position: relative;
    display: inline-block;
    text-align: center;
    margin: 0 auto;
}

.balance-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: text;
    outline: none;
    border: none;
    background: transparent;
    display: inline-block;
    min-width: 120px;
    text-align: center;
    margin: 0 auto;
    padding: 8px 12px;
    border-radius: 8px;
    /* Улучшенная поддержка редактирования */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Предотвращаем перенос строк */
    word-break: keep-all;
    /* Улучшенная типографика для чисел */
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.balance-value:hover {
    opacity: 0.8;
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.balance-value:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 4px rgba(255, 255, 255, 0.3);
}

.balance-value:focus {
    outline: none;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px 10px;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    /* Добавляем анимацию для плавного перехода */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Улучшенная поддержка редактирования */
    caret-color: rgba(255, 255, 255, 0.9);
    /* Показываем курсор более четко */
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Стили для неактивного состояния (после сохранения) */
.balance-value:not(:focus) {
    border: 2px solid transparent;
    background: transparent;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.balance-value[contenteditable="true"]:empty::before {
    content: '0₽';
    color: rgba(255, 255, 255, 0.5);
}

/* Добавляем подсказку при наведении */
.balance-value::after {
    content: 'Нажмите для редактирования';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.balance-value:hover::after {
    opacity: 1;
}

/* Улучшенные стили для редактирования баланса */
.balance-value[contenteditable="true"] {
    /* Улучшенная поддержка редактирования */
    caret-color: rgba(255, 255, 255, 0.9);
    /* Показываем курсор более четко */
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.3);
    /* Предотвращаем выделение текста при двойном клике */
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Стили для пустого поля при редактировании */
.balance-value[contenteditable="true"]:empty::before {
    content: '0,00';
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Улучшенные стили для отображения чисел */
.balance-value {
    /* Улучшенная типографика для чисел */
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    /* Предотвращаем перенос чисел */
    word-break: keep-all;
    white-space: nowrap;
}

.monthly-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 120px;
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 8px;
    text-align: center;
    width: 100%;
    margin-top: -40px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    width: 100%;
    margin-top: -12px;
}

.stat-value.income {
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.stat-value.expense {
    color: #ff4757;
    text-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
}

/* Контейнер транзакций */
.transactions-container {
    margin-top: 20px;
    flex: 1; /* Растягиваем на оставшееся пространство */
    display: flex;
    flex-direction: column;
    width: 100%;
}

.transactions-section {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    min-height: calc(100vh - 300px); /* Растягиваем на всю высоту экрана */
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%; /* Занимаем всю высоту родителя */
    width: 100%;
    max-width: 100%;
}

.section-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-align: left;
}

.add-transaction-btn {
    background: none;
    border: none;
    color: #007bff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0;
}

.add-transaction-btn:hover {
    background-color: rgba(0, 123, 255, 0.1);
    transform: scale(1.1);
}

.period-filter {
    background-color: rgba(0, 123, 255, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    text-align: center;
    width: auto;
    min-width: fit-content;
    max-width: fit-content;
    height: 20px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.filter-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: #007bff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1;
}

.transactions-list {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    width: 100%;
}

.transaction-item {
    background-color: white;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 0;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.transaction-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.transaction-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.transaction-description {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 1.1rem;
}

.transaction-category {
    font-size: 10px;
    color: #6c757d;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.transaction-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.transaction-amount {
    font-weight: 700;
    font-size: 1.3rem;
}

.transaction-amount.income {
    color: #28a745;
}

.transaction-amount.expense {
    color: #dc3545;
}

.section-footer {
    margin-top: auto; /* Прижимаем к низу */
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
    margin-bottom: 0; /* Убираем отступ снизу */
}

.total-amount {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.total-label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.total-value {
    font-weight: 700;
    font-size: 1.5rem;
}

.total-value.income {
    color: #108b2cb5;
}

.total-value.expense {
    color: #dc3545;
}

/* Модальные окна */
.modal-header.bg-primary {
    background-color: #007bff !important;
    border-bottom: none;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    padding: 18px 25px;
}

.modal-header.bg-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
    border-bottom: none;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    padding: 18px 25px;
}

.modal-header .close {
    color: white;
    opacity: 1;
    text-shadow: none;
    font-size: 1.8rem;
    font-weight: 300;
}

.modal-content {
    border-radius: 18px !important;
    box-shadow: 0 8px 32px rgba(60, 60, 120, 0.18), 0 1.5px 6px rgba(0,0,0,0.08);
    border: none;
    padding: 0 0 0 0;
    background: #fff;
    transition: box-shadow 0.2s;
    max-width: 95vw;
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom: none;
    padding: 1rem 1.5rem 0.8rem 1.5rem;
}

.modal-body {
    padding: 1rem 1.5rem 1rem 1.5rem;
    font-size: 0.95rem;
    color: #444;
    text-align: left;
    line-height: 1.4;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer, .modern-modal-footer {
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    border-top: none;
    padding: 0.8rem 1.5rem 1rem 1.5rem;
    background: #f8fafd;
    display: flex;
    justify-content: center;
    gap: 0.7rem;
}

.modern-save-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 16px;
    font-weight: 600;
    padding: 6px 12px;
    font-size: 0.8rem;
    box-shadow: none;
    transition: background 0.18s;
    min-width: 80px;
}

.modern-save-btn:hover, .modern-save-btn:focus {
    background: #1e40af;
}

.modern-cancel-btn {
    background: #6c757d;
    color: #fff !important;
    border: none;
    border-radius: 16px;
    font-weight: 500;
    padding: 6px 12px;
    font-size: 0.8rem;
    box-shadow: none;
    transition: background 0.18s;
    min-width: 80px;
}

.modern-cancel-btn:hover, .modern-cancel-btn:focus {
    background: #5a6268;
    color: #fff !important;
}

.modal-header .close {
    color: #fff;
    opacity: 0.7;
    font-size: 1.5rem;
    transition: opacity 0.18s;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-header .modal-title {
    font-weight: 700;
    font-size: 1.4rem;
    text-align: center;
    width: 100%;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    display: block;
    font-size: 0.8rem;
}

.form-control {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
    /* Добавляем плавную анимацию */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Специальные стили для поля суммы */
#transactionAmount:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.3rem rgba(0, 123, 255, 0.3);
    background-color: #fff;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

/* Toast notifications - подключены из tasks.css */

/* Адаптивность */




/* Стили для бокового меню */
.sidebar .list-group-item {
    color: white !important;
    transition: transform 0.3s ease, background-color 0.3s ease !important;
}

.sidebar .list-group-item span {
    color: white !important;
}

.sidebar .list-group-item:hover {
    background-color: transparent !important;
    color: white !important;
    transform: scale(1.05) !important;
}

.sidebar .list-group-item.active {
    background-color: transparent !important;
    color: white !important;
}

.task-management-section .list-group-item.active {
    background-color: rgb(255 193 7 / 73%) !important;
    color: white !important;
}

.task-management-section .finance-btn-gold:hover {
    background-color: rgba(0, 123, 255, 0.2) !important;
    color: #1976d2 !important;
    transform: scale(1.05) !important;
}

.task-management-section .finance-btn-gold.active:hover {
    background-color: rgba(0, 123, 255, 0.3) !important;
    color: #fff !important;
    transform: scale(1.05) !important;
}

.task-management-section .finance-btn-gold:hover i,
.task-management-section .finance-btn-gold.active:hover i {
    color: inherit !important;
}

.sidebar .list-group-item i {
    color: white !important;
}

.sidebar-search-input {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
}

.sidebar-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

.sidebar-search-icon,
.sidebar-fav-filter-icon {
    color: white !important;
}

.chat-item .chat-title {
    color: white !important;
}

.chat-item .bookmark-icon {
    color: white !important;
}

.sidebar-footer {
    color: white !important;
}

.clear-history-btn {
    color: white !important;
}

.sidebar .task-management-section {
    margin-top: 1px !important;
}

.wallet-page .sidebar .task-management-section {
    margin-top: 1px !important;
}

/* Центрирование заголовка для всех страниц */
/* Центрирование заголовка для всех страниц */
.wallet-page .wallet-header .header-title,
.tasks-page .tasks-header .header-title,
.notes-page .tasks-header .header-title,
.calendar-page .tasks-header .header-title,
.editor-page .tasks-header .header-title {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    margin: auto !important;
    text-align: center !important;
    width: fit-content !important;
    max-width: 80% !important;
    z-index: 10 !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transform: translateX(0) !important;
}

/* Стили для скроллбара на странице кошелька */
.wallet-page ::-webkit-scrollbar {
    width: 8px;
}

.wallet-page ::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.wallet-page ::-webkit-scrollbar-thumb {
    background: #88a4ff;
    border-radius: 6px;
}

.wallet-page ::-webkit-scrollbar-thumb:hover {
    background: #5577ff;
}

/* Скрываем скроллбар для всех браузеров */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE и Edge */
    scroll-behavior: smooth; /* Плавный скролл */
}

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

body {
    /* Скрываем скроллбар для всех браузеров */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE и Edge */
    overflow-x: hidden; /* Предотвращаем горизонтальный скролл */
    overflow-y: auto; /* Разрешаем вертикальный скролл */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Скрываем скроллбары для всех элементов на странице */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE и Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.toast {
    background-color: rgba(52, 58, 64, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    opacity: 0;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    transform: translateY(-20px);
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 250px;
    max-width: 350px;
    text-align: center;
    pointer-events: all;
    max-height: 60px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.hide {
    opacity: 0;
    transform: translateY(-20px);
}

.toast.toast-success {
    background-color: rgba(40, 167, 69, 0.9);
    color: #fff;
}

.toast.toast-error {
    background-color: rgba(220, 53, 69, 0.9);
    color: #fff;
}

.toast.toast-blue {
    background-color: #007bff;
    color: #fff;
}

.toast-icon {
    margin-right: 10px;
    font-size: 1.2rem;
} 

/* === Стили для круглых кнопок в модалке транзакций === */
#transactionModal .modern-save-btn,
#transactionModal .modern-cancel-btn {
    border-radius: 16px;
    min-width: 80px;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 6px 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#transactionModal .modern-save-btn:hover,
#transactionModal .modern-cancel-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

#transactionModal .modern-save-btn:active,
#transactionModal .modern-cancel-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* === Стили для кнопок в модалке фильтров === */
#filterModal .modern-save-btn,
#filterModal .modern-cancel-btn {
    padding: 6px 12px;
    min-width: 80px;
    font-size: 0.8rem;
    border-radius: 16px;
}

/* Специальные стили для модального окна добавления транзакции */
#transactionModal .modal-dialog {
    max-width: 95%;
    margin: 1.75rem auto;
}

#transactionModal .modal-content {
    border-radius: 12px;
    overflow: hidden;
}

#transactionModal .modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

#transactionModal .form-group {
    margin-bottom: 15px;
}

#transactionModal .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
    gap: 5px;
    max-height: 100px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

#transactionModal .categories-grid .category-item {
    padding: 4px 3px;
    font-size: 0.6rem;
    min-height: 45px;
}

/* === Стили для круглых кнопок в модалке транзакций === */ 

/* === Стили для фильтров === */
.filter-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    min-height: 50px;
}

.filter-option:hover {
    border-color: #007bff;
    background: #f8f9ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.filter-option.active {
    border-color: #007bff;
    background: #e3f2fd;
    color: #007bff;
}

.filter-option i {
    font-size: 1.1rem;
    color: #6c757d;
    transition: color 0.2s ease;
}

.filter-option:hover i,
.filter-option.active i {
    color: #007bff;
}

.filter-option span {
    font-weight: 600;
    font-size: 0.9rem;
}

.custom-period-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.custom-period-container .form-group {
    margin-bottom: 10px;
}

.custom-period-container label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    font-size: 0.8rem;
}

.custom-period-container .form-control {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    transition: border-color 0.2s ease;
}

.custom-period-container .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Стили для активного фильтра в интерфейсе */
.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.filter-label.active {
    color: #007bff;
    font-weight: 600;
}

.filter-label i {
    font-size: 0.8rem;
}



/* === Стили для фильтров === */ 

/* === Стили для заголовков дат в транзакциях === */
.date-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.date-header:first-child {
    margin-top: 0;
}

.date-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.date-full {
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.transaction-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.transaction-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.transaction-description {
    font-weight: 500;
    color: #343a40;
    font-size: 0.95rem;
}

.transaction-date {
    font-size: 12px;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    font-weight: 500;
}

.transaction-amount {
    font-weight: 600;
    font-size: 1rem;
    text-align: right;
}

.transaction-amount.income {
    color: #28a745;
}

.transaction-amount.expense {
    color: #dc3545;
}

/* === Стили для заголовков дат в транзакциях === */ 

/* === Стили для глобального блока периода === */
/* Удалено - заменено на современные кнопки фильтров */ 

/* === Стили для глобального блока категорий === */
/* Удалено - заменено на современные кнопки фильтров */ 

/* === Стили для модального окна категорий === */
.categories-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin: 0; /* Убираем все отступы */
    max-height: 60vh;
    overflow-y: auto;
    flex: 1;
    min-height: 200px; /* Минимальная высота */
    padding: 16px; /* Добавляем отступы */
}

.category-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    min-height: 40px;
    font-size: 0.75rem;
    word-wrap: break-word;
    overflow: hidden;
}

.category-option:hover {
    border-color: #007bff;
    background: #f8f9ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.category-option.active {
    border-color: #007bff;
    background: #e3f2fd;
    color: #0056b3;
}

.category-option i {
    font-size: 0.9rem;
    color: #6c757d;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-option:hover i,
.category-option.active i {
    color: #007bff;
    transform: scale(1.05);
}

.category-option span {
    font-weight: 500;
    font-size: 0.75rem;
    line-height: 1.1;
}

/* Стили для кнопки добавления категории */
.add-category-btn {
    border: 2px dashed #007bff !important;
    background: #f8f9ff !important;
    color: #007bff !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.add-category-btn:hover {
    border-color: #0056b3 !important;
    background: #e3f2fd !important;
    color: #0056b3 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.add-category-btn i {
    color: #007bff !important;
    font-size: 1rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.add-category-btn:hover i {
    color: #0056b3 !important;
    transform: scale(1.1);
}

.add-category-btn span {
    color: #007bff !important;
    font-weight: 600 !important;
}

.add-category-btn:hover span {
    color: #0056b3 !important;
}

/* Стили для кнопок в модальном окне категорий */
#categoriesModal .modern-save-btn,
#categoriesModal .modern-cancel-btn {
    padding: 6px 12px;
    min-width: 80px;
    font-size: 0.8rem;
    border-radius: 16px;
}

/* Убираем лишние отступы в футере модального окна категорий */
#categoriesModal .modal-footer {
    padding: 10px 16px;
    margin: 0;
    border-top: 1px solid #e9ecef;
}

#categoriesModal .modern-save-btn {
    background: #007bff;
    border-color: #007bff;
    color: white !important;
}

#categoriesModal .modern-save-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
    color: white !important;
}



/* === Стили для модального окна категорий === */ 

/* Стили для модального окна категорий */
#categoriesModal .modal-dialog {
    max-width: 90vw;
    width: 90vw;
    max-height: 90vh;
    margin: 5vh auto;
}

#categoriesModal .modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

#categoriesModal .modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0; /* Убираем отступы */
    margin: 0; /* Убираем отступы */
}

/* Стили для новой системы выбора категорий */
.categories-selection-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.categories-type-tabs {
    display: flex;
    background: transparent;
    border-bottom: 1px solid #e0e0e0;
}

.category-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    position: relative;
}

.category-tab.active {
    background: #007bff;
    color: white;
}

.category-tab:hover:not(.active) {
    background: #e9ecef;
    color: #333;
}

/* Удаляем дублирующий блок стилей для .categories-grid */
/* Используем только .categories-options для единообразия */

.category-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    font-size: 13px;
    min-width: 0;
    overflow: hidden;
}

.category-item:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.category-item.selected {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.category-item i {
    margin-right: 6px;
    font-size: 14px;
    flex-shrink: 0;
}

/* Специальные стили для категории "Все категории" - такие же как у обычных категорий */
.category-option[data-category="all_categories"] {
    /* Используем стандартные стили категорий */
}

/* Стили для текста в категориях */
.category-item span,
.category-item div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.selected-categories {
    padding: 12px 16px;
    background: transparent;
    border-top: 1px solid #e0e0e0;
}

.selected-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    display: block;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: #007bff;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.category-tag:hover {
    background: #0056b3;
}

.category-tag .remove-tag {
    margin-left: 6px;
    font-size: 10px;
    cursor: pointer;
}

.category-tag .remove-tag:hover {
    opacity: 0.8;
}

 

/* Стили для селектора типа транзакций в модальном окне */
.transaction-type-selector {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.transaction-type-selector .type-option {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-weight: 500;
    color: #6c757d;
    font-size: 0.7rem;
}

.transaction-type-selector .type-option:hover {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
}

.transaction-type-selector .type-option.active {
    border-color: #007bff;
    background-color: #007bff;
    color: white;
}

.transaction-type-selector .type-option i {
    font-size: 0.7rem;
}

.transaction-type-selector .type-option span {
    font-size: 0.65rem;
}

.modern-type-selector {
    display: flex;
    gap: 8px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 12px;
    position: relative;
}

.type-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
    border: 2px solid transparent;
}

.type-option:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}

.type-option.active {
    background: #fff;
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.type-option.active[data-type="all"] {
    border-color: #6c757d;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.type-option.active[data-type="expense"] {
    border-color: #dc3545;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.type-option.active[data-type="income"] {
    border-color: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.type-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    transition: all 0.3s ease;
    background: #e9ecef;
    color: #6c757d;
}

.type-option.active .type-icon {
    background: #007bff;
    color: white;
}

.type-option.active[data-type="all"] .type-icon {
    background: #6c757d;
}

.type-option.active[data-type="expense"] .type-icon {
    background: #dc3545;
}

.type-option.active[data-type="income"] .type-icon {
    background: #28a745;
}

.type-option span {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    text-align: center;
    line-height: 1.2;
}

.type-option.active span {
    color: #fff;
    font-weight: 600;
}

.type-icon i {
    font-size: 14px;
}

 

/* Стили для пустых сообщений */
.empty-transactions-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
    border: 2px dashed #dee2e6;
}

.empty-transactions-message .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: #adb5bd;
}

.empty-transactions-message .empty-text {
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
}

/* Стили для кнопки дублирования транзакций */
.transaction-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 12px;
}

.duplicate-transaction-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
    opacity: 0.8;
}

.duplicate-transaction-btn:hover {
    background: #e3f2fd;
    color: #0056b3;
    opacity: 1;
    transform: scale(1.1);
}

.duplicate-transaction-btn:active {
    transform: scale(0.95);
}

.duplicate-transaction-btn.success {
    animation: duplicateSuccess 0.6s ease;
}

@keyframes duplicateSuccess {
    0% {
        transform: scale(1);
        color: #007bff;
    }
    50% {
        transform: scale(1.3);
        color: #28a745;
    }
    100% {
        transform: scale(1);
        color: #007bff;
    }
}

/* Обновляем стили транзакций для размещения кнопки */
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.transaction-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.transaction-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transaction-description {
    font-weight: 500;
    color: #212529;
    font-size: 14px;
}

.transaction-date {
    font-size: 12px;
    color: #6c757d;
}

.transaction-amount {
    font-weight: 600;
    font-size: 16px;
}

.transaction-amount.income {
    color: #28a745;
}

.transaction-amount.expense {
    color: #dc3545;
} 

/* Убираем скролл для списков транзакций - страница скроллится целиком */
.transactions-list {
    max-height: none;
    overflow-y: visible;
    overflow-x: hidden;
}

/* Стили для отображения итогов над заголовками секций */
.section-header {
    position: relative;
    margin-bottom: 5px;
}

.section-title {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-left: 0;
}

.section-title::before {
    content: attr(data-total);
    font-size: 0.65rem;
    font-weight: 600;
    color: #495057;
    order: -1;
    display: block;
    margin-bottom: 2px;
}

/* Цвета для итогов в заголовках секций */
.income-section .section-title::before {
    color: #28a745; /* Зеленый для доходов */
}

.expense-section .section-title::before {
    color: #dc3545; /* Красный для расходов */
}

/* Скрываем старые итоги внизу */
.section-footer {
    display: none;
}

 

/* Стили для индикатора скролла */
.scroll-indicator {
    text-align: center;
    padding: 10px;
    color: #6c757d;
    font-size: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px dashed #dee2e6;
}

.scroll-indicator i {
    margin-right: 5px;
    color: #007bff;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
} 

/* Стили для кнопки удаления транзакций */
.delete-transaction-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
    opacity: 0.8;
}

.delete-transaction-btn:hover {
    background: #f8d7da;
    color: #c82333;
    opacity: 1;
    transform: scale(1.1);
}

.delete-transaction-btn:active {
    transform: scale(0.95);
}

/* Стили для категории в модальном окне удаления */
.transaction-category-preview {
    color: #6c757d;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Обновленные стили для заголовков дат */
.date-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.date-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.date-full {
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
}

/* Стили для модального окна удаления */
.transaction-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-preview .amount {
    font-weight: 600;
    font-size: 16px;
}

.transaction-preview .amount.income {
    color: #28a745;
}

.transaction-preview .amount.expense {
    color: #dc3545;
}

 

/* Стили для категорий в модальном окне транзакций */




/* Стили для categories-grid в модальном окне редактирования транзакции */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 6px;
    margin-bottom: 10px;
    max-height: 120px;
    overflow-y: auto;
    padding: 0 2px;
    width: 100%;
    box-sizing: border-box;
}

.categories-grid .category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 4px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    text-align: center;
    font-size: 0.65rem;
    min-height: 50px;
    justify-content: center;
    word-wrap: break-word;
    overflow: hidden;
}

.categories-grid .category-item:hover {
    border-color: #007bff;
    background: #f8f9fa;
    transform: scale(1.05);
}

.categories-grid .category-item.selected {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

.categories-grid .category-item i {
    font-size: 0.7rem;
    margin-bottom: 2px;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 20px;
    padding: 3px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background: transparent;
}

.selected-tags .category-tag {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    background: #007bff;
    color: white;
    border-radius: 12px;
    font-size: 0.65rem;
}

.selected-tags .remove-tag {
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    line-height: 1;
}

.selected-tags .remove-tag:hover {
    opacity: 0.8;
}

/* Стили для селектора типа транзакций в модальном окне категорий */
.type-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 10px; /* Уменьшаем отступ */
    padding: 0 16px; /* Добавляем горизонтальные отступы */
    margin-top: 15px
}

.type-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    text-align: center;
}

.type-option:hover {
    border-color: #007bff;
    background: #f8f9fa;
    transform: scale(1.02);
}

.type-option.active {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

.type-option i {
    font-size: 1rem;
    margin-bottom: 3px;
}

.type-option span {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Стили для кнопок действий в транзакциях */
.transaction-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.duplicate-transaction-btn,
.delete-transaction-btn {
    background: none;
    border: none;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.duplicate-transaction-btn {
    color: #007bff;
}

.duplicate-transaction-btn:hover {
    background: #007bff;
    color: white;
}

.delete-transaction-btn {
    color: #dc3545;
}

.delete-transaction-btn:hover {
    background: #dc3545;
    color: white;
}

.duplicate-transaction-btn.success {
    background: #28a745;
    color: white;
    animation: pulse 0.6s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Стили для пустых сообщений */
.empty-transactions-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-text {
    font-size: 1rem;
    font-weight: 500;
}

/* Стили для индикатора скролла */
.scroll-indicator {
    text-align: center;
    padding: 15px;
    color: #6c757d;
    font-size: 0.9rem;
    border-top: 1px solid #e9ecef;
    margin-top: 10px;
}

.scroll-indicator i {
    margin-right: 5px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

/* Стили для категорий в транзакциях */
.transaction-category {
    font-size: 0.75rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 10px;
    margin-top: 2px;
    display: inline-block;
}

/* Улучшенные стили для дат */
.date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: transparent;
    border-radius: 8px;
    margin: 10px 0 5px 0;
}

.date-label {
    font-weight: 600;
    color: #495057;
}

.date-full {
    font-size: 0.8rem;
    color: #6c757d;
} 

/* === Стили для предотвращения сжатия карточек на мобильных === */
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    /* Предотвращаем сжатие на мобильных */
    min-width: 0;
    flex-shrink: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.transaction-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0; /* Позволяет тексту сжиматься */
    overflow: hidden; /* Скрывает переполнение */
}

.transaction-description {
    font-weight: 500;
    color: #343a40;
    font-size: 0.95rem;
    /* Предотвращаем сжатие текста */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.transaction-category {
    font-size: 0.75rem;
    color: #6c757d;
    background: transparent;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    font-weight: 500;
    /* Предотвращаем сжатие */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-left: -5px
}

.transaction-amount {
    font-weight: 600;
    font-size: 1rem;
    text-align: right;
    /* Предотвращаем сжатие суммы */
    flex-shrink: 0;
    white-space: nowrap;
    min-width: fit-content;
}

.transaction-actions-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    min-width: fit-content;
}

.transaction-actions-top {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.transaction-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Улучшаем отображение кнопок действий */
.duplicate-transaction-btn,
.delete-transaction-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    min-width: 28px;
    min-height: 28px;
}

/* Обеспечиваем правильное отображение в Bootstrap колонках */
.transactions-section {
    min-width: 0;
    overflow: hidden;
}

.transactions-list {
    min-width: 0;
    overflow: hidden;
}

/* Исправляем отображение в Bootstrap row */
.transactions-row {
    min-width: 0;
    overflow: hidden;
}

/* Обеспечиваем правильное поведение в Bootstrap col-6 */
.col-6 {
    min-width: 0;
    overflow: hidden;
}

/* Предотвращаем сжатие контейнера */
.wallet-container {
    min-width: 0;
    overflow: hidden;
}

.wallet-body {
    min-width: 0;
    overflow: hidden;
}

.transactions-container {
    min-width: 0;
    overflow: hidden;
}

/* === МЕДИА-ЗАПРОСЫ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ === */

/* === Стили для фильтров в одну строчку === */
.filters-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 5px;
    color: rgba(108, 117, 125, 0.6);
    font-weight: 500;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.filters-header i {
    color: rgba(108, 117, 125, 0.6);
    font-size: 0.8rem;
}

.filters-header span {
    font-weight: 500;
    color: rgba(108, 117, 125, 0.6);
}

.filters-row {
    display: flex;
    gap: 15px;
    margin-bottom: 5px;
    padding: 0 5px;
    margin-top: 5px;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
}

.filter-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #495057;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    min-height: 48px;
    height: 48px;
    min-width: 60px;
    max-width: none;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05) 0%, rgba(0, 123, 255, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.filter-btn:hover {
    border-color: #007bff;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.15);
    color: #007bff;
}

.filter-btn:hover::before {
    opacity: 1;
}

.filter-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.filter-btn i:first-child {
    font-size: 0.9rem;
    color: #007bff;
    margin-right: 6px;
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
    min-width: 12px;
    text-align: center;
}

.filter-btn:hover i:first-child {
    color: #0056b3;
    transform: scale(1.1);
}

.filter-text {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    z-index: 1;
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: none;
    min-width: 30px;
}

.filter-btn:hover .filter-text {
    color: #007bff;
}

.filter-arrow {
    font-size: 0.7rem;
    color: #6c757d;
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
    min-width: 8px;
    text-align: center;
    margin-left: 3px;
}

.filter-btn:hover .filter-arrow {
    color: #007bff;
    transform: rotate(180deg);
}

/* Анимация при клике */
.filter-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

/* Эффект пульсации для активных кнопок */
.filter-btn.active {
    animation: pulseActive 2s infinite;
}

@keyframes pulseActive {
    0% {
        box-shadow: 0 4px 16px rgba(0, 123, 255, 0.2);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
    }
    100% {
        box-shadow: 0 4px 16px rgba(0, 123, 255, 0.2);
    }
}

/* Анимация для активных фильтров */
.filter-btn.active {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    color: #007bff;
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.2);
}

.filter-btn.active i:first-child {
    color: #007bff;
}

.filter-btn.active .filter-text {
    color: #007bff;
}

.filter-btn.active .filter-arrow {
    color: #007bff;
}



/* === Стили для фильтров в одну строчку === */ 

/* Стили для редактирования баланса */
.balance-value-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.edit-balance-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    backdrop-filter: blur(10px);
    transform: scale(0.9);
}

.edit-balance-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transform: scale(1);
}

.balance-panel:hover .edit-balance-btn {
    opacity: 1;
    transform: scale(1);
}

.edit-balance-btn:active {
    transform: scale(0.95);
}

.edit-balance-btn i {
    font-size: 14px;
}

/* Стили для модального окна редактирования баланса */
.current-balance-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.current-balance-display label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

.current-balance-value {
    font-size: 24px;
    font-weight: 700;
    color: #28a745;
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
}

.balance-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.balance-input {
    font-size: 18px;
    font-weight: 600;
    padding: 15px 45px 15px 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
    background: #fff;
}

.balance-input:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    outline: none;
}

.balance-input::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.currency-symbol {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 600;
    color: #6c757d;
    pointer-events: none;
}



/* Анимация для кнопки редактирования */
@keyframes editPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.edit-balance-btn:hover {
    animation: editPulse 0.6s ease-in-out;
}



/* Специальные стили для кнопки сохранения в модальном окне редактирования транзакции */
#editTransactionModal .modern-save-btn {
    background: #007bff !important;
    border: none !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 16px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3) !important;
    min-width: 80px !important;
    font-size: 0.8rem !important;
}

#editTransactionModal .modern-save-btn:hover,
#editTransactionModal .modern-save-btn:focus {
    background: #0056b3 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4) !important;
    border-radius: 16px !important;
}

#editTransactionModal .modern-save-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3) !important;
    border-radius: 16px !important;
}

/* Специальные стили для кнопки отмены в модальном окне редактирования транзакции */
#editTransactionModal .modern-cancel-btn {
    background: #6c757d !important;
    border: none !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 16px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    min-width: 80px !important;
    font-size: 0.8rem !important;
}

#editTransactionModal .modern-cancel-btn:hover,
#editTransactionModal .modern-cancel-btn:focus {
    background: #5a6268 !important;
    color: white !important;
    border-radius: 16px !important;
}

#editTransactionModal .modern-cancel-btn:active {
    border-radius: 16px !important;
}

/* Специальные стили для модального окна редактирования транзакции */
#editTransactionModal .modal-dialog {
    max-width: 95%;
    margin: 1.75rem auto;
}

#editTransactionModal .modal-content {
    border-radius: 12px;
    overflow: hidden;
}

#editTransactionModal .modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

#editTransactionModal .form-group {
    margin-bottom: 15px;
}

#editTransactionModal .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
    gap: 5px;
    max-height: 100px;
    padding: 5px;
    width: 100%;
    box-sizing: border-box;
}

#editTransactionModal .categories-grid .category-item {
    padding: 4px 3px;
    font-size: 0.6rem;
    min-height: 45px;
}



/* Стили для кнопок в модальном окне удаления транзакции */
.modal-footer .btn-danger {
    background: #dc3545 !important;
    border: none !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 16px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    min-width: 80px !important;
    font-size: 0.8rem !important;
}

.modal-footer .btn-danger:hover,
.modal-footer .btn-danger:focus {
    background: #c82333 !important;
    color: white !important;
    border-radius: 16px !important;
}

.modal-footer .btn-danger:active {
    border-radius: 16px !important;
}

.modal-footer .btn-secondary {
    background: #6c757d !important;
    border: none !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 16px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    min-width: 80px !important;
    font-size: 0.8rem !important;
}

.modal-footer .btn-secondary:hover,
.modal-footer .btn-secondary:focus {
    background: #5a6268 !important;
    color: white !important;
    border-radius: 16px !important;
}

.modal-footer .btn-secondary:active {
    border-radius: 16px !important;
}

/* Стили для кнопок в модальном окне добавления категории */
#addCategoryModal .modern-save-btn {
    background: #007bff !important;
    border: none !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 16px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    min-width: 80px !important;
    font-size: 0.8rem !important;
}

#addCategoryModal .modern-save-btn:hover,
#addCategoryModal .modern-save-btn:focus {
    background: #0056b3 !important;
    color: white !important;
    border-radius: 16px !important;
}

#addCategoryModal .modern-save-btn:active {
    border-radius: 16px !important;
}

#addCategoryModal .modern-cancel-btn {
    background: #6c757d !important;
    border: none !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 16px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    min-width: 80px !important;
    font-size: 0.8rem !important;
}

#addCategoryModal .modern-cancel-btn:hover,
#addCategoryModal .modern-cancel-btn:focus {
    background: #5a6268 !important;
    color: white !important;
    border-radius: 16px !important;
}

#addCategoryModal .modern-cancel-btn:active {
    border-radius: 16px !important;
}

/* Стили для кликабельности карточек транзакций */
.transaction-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.transaction-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.transaction-item:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Предотвращаем изменение курсора для кнопок действий */
.transaction-item .duplicate-transaction-btn,
.transaction-item .delete-transaction-btn {
    cursor: pointer;
}

.transaction-item .duplicate-transaction-btn:hover,
.transaction-item .delete-transaction-btn:hover {
    transform: scale(1.1);
}

/* Стили для кастомных категорий */
.add-custom-category {
    text-align: center;
    padding: 15px 0;
    margin: 0;
    position: relative;
    width: 100%;
    transition: all 0.3s ease;
}

/* Когда форма активна, убираем отступы у контейнера кнопки */
.add-custom-category.form-active {
    padding: 0;
    margin: 0;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Разделитель между категориями и формой добавления */
.modal-body hr {
    border-color: #e9ecef;
    margin: 20px 0;
    opacity: 0.6;
    transition: all 0.3s ease;
}

/* Скрываем разделитель когда форма активна */
.add-custom-category.form-active + hr {
    margin: 0;
    opacity: 0;
    height: 0;
    border: none;
    animation: fadeOut 0.3s ease-out;
}

@keyframes fadeOut {
    from {
        opacity: 0.6;
        height: 1px;
    }
    to {
        opacity: 0;
        height: 0;
    }
}

.add-custom-category .btn {
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #007bff;
    background: #007bff;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.add-custom-category .btn:hover {
    transform: scale(1.05);
    background: #0056b3;
}

.add-custom-category .btn:active {
    transform: scale(0.98);
}

.add-custom-category .btn i {
    margin-right: 8px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.add-custom-category .btn:hover i {
    transform: scale(1.1);
}

.custom-category-form {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e9ecef;
    margin-top: 0;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: formSlideIn 0.4s ease-out;
}

@keyframes formSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Когда форма видима */
.custom-category-form.show {
    opacity: 1;
    transform: translateY(0);
}

.custom-category-form .form-group {
    margin-bottom: 20px;
    width: 100%;
}

.custom-category-form .form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.custom-category-form .form-control {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    padding: 12px 16px;
    font-size: 14px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
}

.custom-category-form .form-control::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transition: left 0.3s ease;
}

.custom-category-form .form-control:focus::before {
    left: 0;
}

.custom-category-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    outline: none;
    transform: translateY(-1px);
}

.custom-category-form .form-control:hover {
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

/* Стили для select элементов */
.custom-category-form select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 50px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 100%;
    width: 100%;
    font-size: 14px;
    line-height: 1.5;
}

.custom-category-form select.form-control:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23007bff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Стили для опций в select */
.custom-category-form select.form-control option {
    padding: 8px 12px;
    font-size: 14px;
    background: #ffffff;
    color: #2c3e50;
}

.custom-category-form select.form-control option:hover {
    background: #f8f9fa;
}

/* Стили для текстового поля */
.custom-category-form input[type="text"].form-control {
    padding: 12px 16px;
    width: 100%;
    min-width: 100%;
    font-size: 14px;
    line-height: 1.5;
}

.custom-category-form .btn-group {
    display: flex;
    gap: 20px;
    margin-top: 24px;
    justify-content: center;
    align-items: center;
}

.custom-category-form .btn-group .btn {
    flex: 0 0 auto;
    border-radius: 20px;
    height: 40px;
    min-width: 120px;
    padding: 0.4rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
}

.custom-category-form .btn:not(.modern-save-btn):not(.modern-cancel-btn) {
    border-radius: 50px;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 50px;
    min-width: 50px;
    margin: 0;
}

.custom-category-form .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    border-radius: 50px;
}

.custom-category-form .btn:hover::before {
    left: 100%;
}

.custom-category-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.custom-category-form .btn:active {
    transform: translateY(0);
}

.custom-category-form .btn-success {
    background: #007bff;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    border-radius: 50px;
}

.custom-category-form .btn-success:hover {
    background: #0056b3;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.custom-category-form .btn-secondary {
    background: #6c757d;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    border-radius: 50px;
}

.custom-category-form .btn-secondary:hover {
    background: #5a6268;
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.custom-category-form .btn:not(.modern-save-btn):not(.modern-cancel-btn) i {
    margin: 0;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.custom-category-form .btn:not(.modern-save-btn):not(.modern-cancel-btn):hover i {
    transform: scale(1.1);
}

/* Анимация для кнопки "Сохранить" */
.custom-category-form .btn-success:active {
    animation: buttonPress 0.2s ease-out;
}

@keyframes buttonPress {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/* Стили для кнопки удаления категорий */
.category-item .delete-category-btn {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #dc3545;
    color: #ffffff;
    border: none;
    font-size: 9px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.category-item:hover .delete-category-btn {
    display: flex;
}

.category-item .delete-category-btn:hover {
    background: #c82333;
    transform: scale(1.3);
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.5);
}

.category-item .delete-category-btn:active {
    transform: scale(0.95);
}

/* Специфичные стили для иконки в кнопке удаления */
.category-item .delete-category-btn i {
    font-size: 9px !important;
    color: #ffffff !important;
    margin: 0 !important;
}

.category-item .delete-category-btn:hover i {
    color: #ffffff !important;
}

/* Стили для кастомных категорий */
.category-item.custom-category {
    position: relative;
}

.category-item.custom-category .delete-category-btn {
    display: flex;
    opacity: 0.7;
}

.category-item.custom-category:hover .delete-category-btn {
    opacity: 1;
}

/* Стили для кнопки удаления в модальном окне категорий */
.category-option .delete-category-btn {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #dc3545;
    color: #ffffff;
    border: none;
    font-size: 9px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.category-option:hover .delete-category-btn {
    display: flex;
}

.category-option .delete-category-btn:hover {
    background: #c82333;
    transform: scale(1.3);
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.5);
}

.category-option .delete-category-btn:active {
    transform: scale(0.95);
}

/* Специфичные стили для иконки в кнопке удаления в модальном окне */
.category-option .delete-category-btn i {
    font-size: 9px !important;
    color: #ffffff !important;
    margin: 0 !important;
}

.category-option .delete-category-btn:hover i {
    color: #ffffff !important;
}

.category-option.custom-category {
    position: relative;
}

.category-option.custom-category .delete-category-btn {
    display: flex;
    opacity: 0.7;
}

.category-option.custom-category:hover .delete-category-btn {
    opacity: 1;
} 

.custom-category-form .btn {
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
}

.custom-category-form .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    border-radius: 25px;
}

.custom-category-form .btn:hover::before {
    left: 100%;
}

.custom-category-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.custom-category-form .btn:active {
    transform: translateY(0);
}

.custom-category-form .btn-success {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    border-radius: 25px;
}

.custom-category-form .btn-success:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.custom-category-form .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    border-radius: 25px;
}

.custom-category-form .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.custom-category-form .btn i {
    margin-right: 8px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.custom-category-form .btn:hover i {
    transform: scale(1.1);
}

/* Анимация для кнопки "Сохранить" */
.custom-category-form .btn-success:active {
    animation: buttonPress 0.2s ease-out;
}

@keyframes buttonPress {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/* Специальные стили для кнопок в форме создания категории */
.custom-category-form .modern-save-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    box-shadow: none;
    transition: background 0.18s;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}

.custom-category-form .modern-save-btn:hover, 
.custom-category-form .modern-save-btn:focus {
    background: #1e40af;
    transform: scale(1.05);
}

.custom-category-form .modern-cancel-btn {
    background: #6c757d;
    color: #fff !important;
    border: none;
    border-radius: 20px;
    font-weight: 500;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    box-shadow: none;
    transition: all 0.18s;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}

.custom-category-form .modern-cancel-btn:hover, 
.custom-category-form .modern-cancel-btn:focus {
    background: #5a6268;
    color: #fff !important;
    transform: scale(1.05);
}

.custom-category-form .modern-save-btn i,
.custom-category-form .modern-cancel-btn i {
    margin-right: 8px;
    font-size: 12px;
    transition: transform 0.18s ease;
}

.custom-category-form .modern-save-btn:hover i,
.custom-category-form .modern-cancel-btn:hover i {
    transform: scale(1.1);
}

/* Анимация для кнопок в форме создания категории */
.custom-category-form .modern-save-btn:active,
.custom-category-form .modern-cancel-btn:active {
    animation: buttonPress 0.2s ease-out;
}

/* Переопределение стилей для кнопок в форме создания категории */
.custom-category-form .btn:hover::before {
    left: 100%;
}

.custom-category-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.custom-category-form .btn:active {
    transform: translateY(0);
}

.custom-category-form .btn i {
    margin: 0;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.custom-category-form .btn:hover i {
    transform: scale(1.1);
}

/* Переопределение стилей для убирания анимаций */
.custom-category-form .btn::before {
    display: none;
}

.custom-category-form .btn:hover::before {
    display: none;
}

.custom-category-form .btn:hover {
    transform: scale(1.05) !important;
    box-shadow: none !important;
}

.custom-category-form .btn:active {
    transform: scale(0.98) !important;
}

.custom-category-form .btn-success:hover {
    transform: scale(1.05) !important;
    box-shadow: none !important;
}

.custom-category-form .btn-secondary:hover {
    transform: scale(1.05) !important;
    box-shadow: none !important;
}

/* Стили для inline-редактирования баланса */
.balance-value[contenteditable="true"] {
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
    background-clip: initial !important;
    text-shadow: none !important;
    box-shadow: none !important;
    outline: none !important;
    min-width: 150px !important;
    text-align: center !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 2.2rem !important;
    font-weight: 600 !important;
    caret-color: white !important;
    position: relative !important;
    z-index: 1000 !important;
}

.balance-value[contenteditable="true"]:focus {
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.02) !important;
}

.balance-value[contenteditable="true"]:empty::before {
    content: "" !important;
}

/* Анимация для кнопки редактирования при переходе в режим сохранения */
.edit-balance-btn.editing {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4) !important;
}

.edit-balance-btn.editing:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%) !important;
    transform: scale(1.15) !important;
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.5) !important;
}

/* Стили для кнопки кошелька при наведении */
.wallet-page #manage-finance-btn:hover {
    background-color: rgba(68, 127, 255, 0.85) !important;
    color: white !important;
    transform: scale(1.05) !important;
}

.wallet-page #manage-finance-btn:hover i,
.wallet-page #manage-finance-btn:hover span {
    color: white !important;
}

.wallet-page #manage-finance-btn:hover #sidebarAddTransactionBtn {
    color: white !important;
}

/* Стили для кнопки задач при наведении - как у заметок (прозрачный фон) */
.wallet-page #manage-tasks-btn:hover {
    background-color: transparent !important;
    color: white !important;
    transform: scale(1.05) !important;
}

.wallet-page #manage-tasks-btn:hover i,
.wallet-page #manage-tasks-btn:hover span {
    color: white !important;
}

.wallet-page #manage-tasks-btn:hover #sidebarAddTaskBtn {
    color: white !important;
}

