* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #181A1B;
    color: #B7B1A7;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    line-height: 1.6;
    padding: 10px;
    min-height: 100vh;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Стили для вкладок */
.tabs-container {
    background: #1E2021;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.tabs-header {
    display: flex;
    background: #2A2D2E;
    border-bottom: 1px solid #3A3D3E;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs-header::-webkit-scrollbar {
    display: none;
}

.tab {
    flex: 1;
    min-width: 0;
    padding: 10px 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 400;
    color: #B7B1A7;
    border: none;
    background: transparent;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.tab:hover {
    background: #3A3D3E;
    color: #D1CDC7;
}

.tab.active {
    background: #1E2021;
    color: #D1CDC7;
    border-bottom: 2px solid #B7B1A7;
}

.tab-content {
    display: none;
    padding: 15px;
    min-height: 300px;
}

.tab-content.active {
    display: block;
}

/* Стили контента внутри вкладок */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2A2D2E;
}

.content-header h2 {
    color: #D1CDC7;
    font-size: 1.3rem;
    font-weight: 300;
    margin: 0;
}

.add-btn {
    background: #3A3D3E;
    color: #B7B1A7;
    border: 1px solid #4A4D4E;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    font-size: 13px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.add-btn:hover {
    background: #4A4D4E;
    color: #D1CDC7;
    transform: translateY(-1px);
}

.content-body {
    padding: 15px 0;
}

.empty-state {
    text-align: center;
    color: #6B6B6B;
    font-style: italic;
    padding: 50px 15px;
    background: #2A2D2E;
    border-radius: 6px;
    border: 1px dashed #3A3D3E;
}

.empty-state p:first-child {
    color: #D1CDC7;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-style: normal;
}

/* Стили для фильтров задач */
.tasks-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #2A2D2E;
    border-radius: 6px;
    border: 1px solid #3A3D3E;
}

.search-box {
    flex: 1;
    min-width: 200px;
    display: flex;
    gap: 5px;
}

.search-input {
    flex: 1;
    background: #1E2021;
    border: 1px solid #3A3D3E;
    color: #B7B1A7;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: #B7B1A7;
}

.search-btn {
    background: #3A3D3E;
    color: #B7B1A7;
    border: 1px solid #4A4D4E;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #4A4D4E;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 2;
}

.filter-select {
    flex: 1;
    min-width: 120px;
    background: #1E2021;
    border: 1px solid #3A3D3E;
    color: #B7B1A7;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23B7B1A7' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    padding-right: 30px;
}

.filter-select:focus {
    outline: none;
    border-color: #B7B1A7;
}

/* Стили для сетки карточек задач */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* Обновленные стили для карточек задач */
.task-card {
    background: #2A2D2E;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #B7B1A7;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #3A3D3E;
    display: flex;
    flex-direction: column;
    min-height: 220px;
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: #4A4D4E;
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.task-card-title {
    flex: 1;
    font-size: 1.1rem;
    color: #D1CDC7;
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
    word-break: break-word;
}

.task-card-doc-count {
    background: rgba(92, 107, 192, 0.3);
    color: #5c6bc0;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-card-body {
    flex: 1;
    margin-bottom: 12px;
}

.task-card-meta {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.task-card-theme {
    background: rgba(66, 73, 73, 0.5);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #D1CDC7;
    display: inline-block;
}

.task-card-goal {
    background: rgba(66, 73, 73, 0.5);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #D1CDC7;
    display: inline-block;
}

.task-card-divider {
    height: 1px;
    background: #3A3D3E;
    margin: 12px 0;
    border: none;
}

/* ОБНОВЛЕННЫЙ СТИЛЬ: Информационные блоки один под другим */
.task-card-info-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-card-info-block-vertical {
    background: rgba(42, 45, 46, 0.7);
    border: 1px solid #3A3D3E;
    border-radius: 6px;
    padding: 10px;
    transition: all 0.3s ease;
}

.task-card-info-block-vertical:hover {
    border-color: #4A4D4E;
    background: rgba(42, 45, 46, 0.9);
}

.task-card-info-title-vertical {
    font-size: 0.75rem;
    color: #6B6B6B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 400;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #3A3D3E;
}

.task-card-status-badge-vertical {
    font-size: 0.8rem;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
    text-align: center;
    min-width: 80px;
    margin-top: 4px;
}

/* ОБНОВЛЕННЫЙ СТИЛЬ: Финансовые суммы в виде кнопок С СЕРЫМ ФОНОМ */
.task-card-finance-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
    min-width: 80px;
    margin-top: 4px;
    border: none;
    cursor: default;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    background: rgba(66, 73, 73, 0.5);
    border: 1px solid rgba(66, 73, 73, 0.7);
}

.task-card-finance-badge.positive {
    color: #2B6E55;
}

.task-card-finance-badge.negative {
    color: #A03F45;
}

.task-card-finance-pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
    margin-top: 3px;
    background: rgba(66, 73, 73, 0.5);
    color: #9C6834;
    border: 1px solid rgba(66, 73, 73, 0.7);
    cursor: default;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
}

/* ОБНОВЛЕННЫЙ СТИЛЬ: Даты в виде кнопок С СЕРЫМ ФОНОМ */
.task-card-date-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
    min-width: 80px;
    margin-top: 4px;
    border: none;
    cursor: default;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    background: rgba(66, 73, 73, 0.5);
    color: #D1CDC7;
    border: 1px solid rgba(66, 73, 73, 0.7);
}

.task-card-date-badge.overdue {
    color: #A03F45;
}

.task-card-meeting-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
    margin-top: 3px;
    background: rgba(66, 73, 73, 0.5);
    color: #B7B1A7;
    border: 1px solid rgba(66, 73, 73, 0.7);
    cursor: default;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
}

/* ОБНОВЛЕННЫЙ СТИЛЬ: Горизонтальное расположение кнопок */
.task-card-buttons-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 4px;
}

.task-card-buttons-row .task-card-finance-badge,
.task-card-buttons-row .task-card-finance-pending-badge {
    flex: 1;
    min-width: 0;
    margin-top: 0;
}

.task-card-buttons-row .task-card-date-badge,
.task-card-buttons-row .task-card-meeting-badge {
    flex: 1;
    min-width: 0;
    margin-top: 0;
}

.status-pending { background: #2C446E; color: #fff; }
.status-in-progress { background: #A03F45; color: #fff; }
.status-review { background: #9C6834; color: #fff; }
.status-completed { background: #2B6E55; color: #fff; }
.status-postponed { background: #5E4E86; color: #fff; }
.status-cancelled { background: #585967; color: #fff; }

/* Цвета границ для разных статусов */
.task-card[data-status="В планах"] { border-left-color: #2C446E; }
.task-card[data-status="В работе"] { border-left-color: #A03F45; }
.task-card[data-status="На проверке"] { border-left-color: #9C6834; }
.task-card[data-status="Завершено"] { border-left-color: #2B6E55; }
.task-card[data-status="Отложено"] { border-left-color: #5E4E86; }
.task-card[data-status="Отменено"] { border-left-color: #585967; }

/* Анимация появления карточек */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для popup */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-content {
    background: #1E2021;
    border-radius: 8px;
    width: 98%;
    max-width: 900px;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    margin: 5px;
}

/* Полоса прокрутки для временной шкалы */
.popup-content::-webkit-scrollbar {
    width: 8px;
}

.popup-content::-webkit-scrollbar-track {
    background: #2A2D2E;
}

.popup-content::-webkit-scrollbar-thumb {
    background: #5c6bc0;
    border-radius: 4px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
    background: #7986cb;
}



.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #2A2D2E;
    background: #2A2D2E;
    border-radius: 8px 8px 0 0;
}

.popup-title {
    color: #D1CDC7;
    font-size: 1.2rem;
    font-weight: 300;
}

.close-popup {
    background: #3A3D3E;
    color: #B7B1A7;
    border: 1px solid #4A4D4E;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    transition: all 0.3s ease;
    font-size: 11px;
}

.close-popup:hover {
    background: #4A4D4E;
    color: #D1CDC7;
}

.popup-body {
    padding: 0;
}

.popup-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
}

.form-block {
    background: #1E2021;
    border: none;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.form-block h3 {
    color: #D1CDC7;
    margin-bottom: 10px;
    font-weight: 300;
    font-size: 1.2rem;
    border-left: 3px solid #B7B1A7;
    padding-left: 6px;
    min-height: 24px;
    display: flex;
    align-items: center;
}

/* Стили для полей ввода цели */
.goal-title-input {
    background: transparent;
    border: none;
    color: #D1CDC7;
    font-size: 1.2rem;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    width: 100%;
    padding: 0;
    margin: 0;
    border-left: 3px solid #B7B1A7;
    padding-left: 6px;
    outline: none;
}

.goal-title-input::placeholder {
    color: #6B6B6B;
    font-style: italic;
}

.goal-title-input:focus {
    background: rgba(42, 45, 46, 0.3);
    border-radius: 4px;
    padding: 3px 6px;
    margin-left: -6px;
}

.goal-description-input {
    background: #2A2D2E;
    border: 1px solid #3A3D3E;
    color: #B7B1A7;
    font-size: 0.95rem;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    width: 100%;
    padding: 8px 10px;
    border-radius: 4px;
    resize: vertical;
    min-height: 80px;
}

.goal-description-input:focus {
    outline: none;
    border-color: #B7B1A7;
}

/* ОБНОВЛЕННЫЙ СТИЛЬ: Поле ввода названия темы как в задачах */
.theme-title-input {
    background: transparent;
    border: none;
    color: #D1CDC7;
    font-size: 1.2rem;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    width: 100%;
    padding: 0;
    margin: 0;
    border-left: 3px solid #B7B1A7;
    padding-left: 6px;
    outline: none;
}

.theme-title-input::placeholder {
    color: #6B6B6B;
    font-style: italic;
}

.theme-title-input:focus {
    background: rgba(42, 45, 46, 0.3);
    border-radius: 4px;
    padding: 3px 6px;
    margin-left: -6px;
}

.task-title-input {
    background: transparent;
    border: none;
    color: #D1CDC7;
    font-size: 1.2rem;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    width: 100%;
    padding: 0;
    margin: 0;
    border-left: 3px solid #B7B1A7;
    padding-left: 6px;
    outline: none;
}

.task-title-input::placeholder {
    color: #6B6B6B;
    font-style: italic;
}

.task-title-input:focus {
    background: rgba(42, 45, 46, 0.3);
    border-radius: 4px;
    padding: 3px 6px;
    margin-left: -6px;
}

.form-input {
    background: transparent;
    border: none;
    color: #D1CDC7;
    font-size: 1.2rem;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    width: 100%;
    padding: 0;
    margin: 0;
    border-left: 3px solid #B7B1A7;
    padding-left: 6px;
    outline: none;
}

.form-input::placeholder {
    color: #6B6B6B;
    font-style: italic;
}

.form-input:focus {
    background: rgba(42, 45, 46, 0.3);
    border-radius: 4px;
    padding: 3px 6px;
    margin-left: -6px;
}

/* Контейнер для select с иконкой */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper::after {
    content: "▼";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #B7B1A7;
    font-size: 0.7rem;
    pointer-events: none;
}

.form-select {
    background: transparent;
    border: none;
    color: #D1CDC7;
    font-size: 1.2rem;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    width: 100%;
    padding: 0;
    margin: 0;
    border-left: 3px solid #B7B1A7;
    padding-left: 6px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    display: inline-block;
}

.form-select option {
    background: #2A2D2E;
    color: #B7B1A7;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    padding: 6px;
}

/* Стили для статусов с большими кнопками (3 в строку) */
.status-grid-large {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.status-btn-large {
    padding: 12px 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 400;
    font-size: 14px;
    text-align: center;
    background: #3A3D3E;
    color: #B7B1A7;
    border: 1px solid #4A4D4E;
}

.status-btn-large:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.status-btn-large.active {
    color: #fff;
    font-weight: 500;
    border: 1px solid transparent;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

/* Цвета статусов */
.status-btn-large[data-status="В планах"].active { background: #2C446E; }
.status-btn-large[data-status="В работе"].active { background: #A03F45; }
.status-btn-large[data-status="На проверке"].active { background: #9C6834; }
.status-btn-large[data-status="Завершено"].active { background: #2B6E55; }
.status-btn-large[data-status="Отложено"].active { background: #5E4E86; }
.status-btn-large[data-status="Отменено"].active { background: #585967; }

/* Стили для финансового блока */
.finance-section {
    margin-top: 10px;
}

.finance-row {
    background: #2A2D2E;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 3px solid #B7B1A7;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.finance-name {
    flex: 2;
    min-width: 150px;
}

.finance-name input {
    width: 100%;
    background: #1E2021;
    border: 1px solid #3A3D3E;
    color: #B7B1A7;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.95rem;
}

.finance-type-toggle {
    display: flex;
    background: #3A3D3E;
    border-radius: 6px;
    padding: 3px;
    border: 1px solid #4A4D4E;
    flex: 1;
    min-width: 140px;
}

.type-btn {
    padding: 8px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 400;
    font-size: 11px;
    background: transparent;
    color: #B7B1A7;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.type-btn.active {
    background: #4A4D4E;
    color: #fff;
    font-weight: 500;
}

.type-income.active {
    background: #2B6E55;
    color: #fff;
}

.type-expense.active {
    background: #A03F45;
    color: #fff;
}

.finance-amount {
    flex: 1;
    min-width: 120px;
}

.finance-amount input {
    width: 100%;
    background: #1E2021;
    border: 1px solid #3A3D3E;
    color: #B7B1A7;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.95rem;
    text-align: right;
    font-family: 'Source Sans Pro', monospace;
    letter-spacing: 0.5px;
}

.payment-status-toggle {
    display: flex;
    background: #3A3D3E;
    border-radius: 6px;
    padding: 3px;
    border: 1px solid #4A4D4E;
    flex: 1;
    min-width: 140px;
}

.payment-btn {
    padding: 8px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 400;
    font-size: 11px;
    background: transparent;
    color: #B7B1A7;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.payment-btn.active {
    background: #4A4D4E;
    color: #fff;
    font-weight: 500;
}

.payment-pending.active {
    background: #9C6834;
    color: #fff;
}

.payment-completed.active {
    background: #2B6E55;
    color: #fff;
}

.remove-finance-btn {
    background: #3A3D3E;
    color: #B7B1A7;
    border: 1px solid #4A4D4E;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 30px;
    text-align: center;
}

.remove-finance-btn:hover {
    background: #4A4D4E;
    color: #D1CDC7;
}

.add-section-btn {
    background: #3A3D3E;
    color: #B7B1A7;
    border: 1px solid #4A4D4E;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    font-size: 11px;
    width: 100%;
    margin-top: 10px;
}

.add-section-btn:hover {
    background: #4A4D4E;
}

/* Финансовые итоги */
.finance-totals-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.totals-section {
    background: #2A2D2E;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #3A3D3E;
}

.totals-section h4 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: #D1CDC7;
    text-align: center;
    border-bottom: 1px solid #3A3D3E;
    padding-bottom: 6px;
    font-weight: 400;
}

.totals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
}

.total-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.total-item span {
    font-size: 0.7rem;
    color: #B7B1A7;
    font-weight: 400;
}

.total-value {
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    letter-spacing: 0.3px;
}

.total-value.positive { color: #2B6E55; }
.total-value.negative { color: #A03F45; }
.total-value.neutral { color: #B7B1A7; }
.total-value.pending { color: #9C6834; }

/* Дедлайн на всю ширину */
.deadline-section-full {
    margin-bottom: 15px;
}

.deadline-section-full label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    color: #D1CDC7;
    font-size: 0.95rem;
}

.full-width-date {
    width: 100%;
    padding: 10px 12px;
    background: #2A2D2E;
    border: 1px solid #3A3D3E;
    border-radius: 6px;
    color: #B7B1A7;
    font-size: 0.95rem;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
}

.full-width-date:focus {
    outline: none;
    border-color: #B7B1A7;
}

/* Стили для планерок */
.meetings-section {
    margin-top: 12px;
}

.meetings-section label {
    display: block;
    margin-bottom: 4px;
    font-weight: 400;
    color: #D1CDC7;
    font-size: 0.95rem;
}

.meeting-entry {
    background: #2A2D2E;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    border-left: 3px solid #B7B1A7;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.meeting-date {
    flex: 1;
    min-width: 120px;
}

.meeting-date input {
    width: 100%;
    background: #1E2021;
    border: 1px solid #3A3D3E;
    color: #B7B1A7;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.95rem;
}

.meeting-time {
    flex: 2;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 150px;
}

.meeting-time select {
    flex: 1;
    background: #1E2021;
    border: 1px solid #3A3D3E;
    color: #B7B1A7;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.95rem;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23B7B1A7' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 8px;
    padding-right: 20px;
}

.time-separator {
    color: #B7B1A7;
    font-weight: 400;
    padding: 0 3px;
}

.remove-meeting-btn {
    background: #3A3D3E;
    color: #B7B1A7;
    border: 1px solid #4A4D4E;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 30px;
    text-align: center;
}

.remove-meeting-btn:hover {
    background: #4A4D4E;
    color: #D1CDC7;
}

/* Стили для документов */
.documents-section {
    margin-top: 10px;
}

.document-row {
    background: #2A2D2E;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 3px solid #B7B1A7;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.document-name {
    flex: 2;
    min-width: 150px;
}

.document-name input {
    width: 100%;
    background: #1E2021;
    border: 1px solid #3A3D3E;
    color: #B7B1A7;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.95rem;
}

.document-file {
    flex: 2;
    min-width: 150px;
}

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

.file-input-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-input-label {
    width: 100%;
    background: #1E2021;
    border: 1px solid #3A3D3E;
    color: #B7B1A7;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.file-input-label:hover {
    background: #2A2D2E;
    border-color: #4A4D4E;
}

.file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
    font-size: 0.85rem;
}

.file-size {
    color: #9C6834;
    font-size: 0.8rem;
    font-weight: 500;
}

.remove-document-btn {
    background: #3A3D3E;
    color: #B7B1A7;
    border: 1px solid #4A4D4E;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 30px;
    text-align: center;
}

.remove-document-btn:hover {
    background: #4A4D4E;
    color: #D1CDC7;
}

.file-info {
    margin-top: 8px;
    text-align: center;
    color: #9C6834;
    font-size: 0.85rem;
}

/* Стили для загрузки изображений тем */
.image-upload-section {
    margin-top: 10px;
}

.image-preview {
    width: 100%;
    height: 200px;
    background: #2A2D2E;
    border: 2px dashed #3A3D3E;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.image-preview-placeholder {
    text-align: center;
    color: #6B6B6B;
    font-style: italic;
    padding: 20px;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.image-upload-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.image-upload-buttons .file-input-wrapper {
    flex: 2;
}

.image-upload-buttons .file-input-label {
    background: #3A3D3E;
    color: #B7B1A7;
    border: 1px solid #4A4D4E;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 400;
}

.image-upload-buttons .file-input-label:hover {
    background: #4A4D4E;
    color: #D1CDC7;
}

.color-picker-btn {
    flex: 1;
    background: #2A2D2E;
    color: #B7B1A7;
    border: 1px solid #3A3D3E;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.color-picker-btn:hover {
    background: #3A3D3E;
    color: #D1CDC7;
}

.color-picker-input {
    width: 100%;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-bottom: 15px;
}

.color-presets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .color-presets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.color-preset {
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.color-preset:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.color-preset.active {
    border-color: #B7B1A7;
    box-shadow: 0 0 0 2px rgba(183, 177, 167, 0.3);
}

.save-btn {
    background: #2A2D2E;
    color: #B7B1A7;
    border: 1px solid #3A3D3E;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
}

.save-btn:hover {
    background: #3A3D3E;
    color: #D1CDC7;
}

.delete-btn {
    background: #A03F45;
    color: white;
    border: 1px solid #8a353a;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.delete-btn:hover {
    background: #8a353a;
    transform: translateY(-1px);
}

/* Кнопки действий с кнопкой удаления */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.action-buttons .save-btn {
    flex: 3;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
}

.delete-task-btn {
    flex: 1;
    background: #A03F45;
    color: white;
    border: 1px solid #8a353a;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    min-width: 80px;
}

.delete-task-btn:hover {
    background: #8a353a;
    transform: translateY(-1px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .add-btn {
        align-self: flex-start;
    }
    
    .tasks-filters {
        flex-direction: column;
    }
    
    .search-box,
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        min-width: 100px;
    }
    
    .tasks-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .status-grid-large {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .finance-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .finance-name,
    .finance-type-toggle,
    .finance-amount,
    .payment-status-toggle {
        min-width: 100%;
    }
    
    .document-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .document-name,
    .document-file {
        min-width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .delete-task-btn {
        width: 100%;
        margin-top: 5px;
    }
    
    .finance-totals-split {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    body { padding: 8px; }
    
    .tab { font-size: 11px; padding: 8px 3px; }
    
    .popup-content { 
        width: 100%; 
        margin: 2px; 
        max-height: 100vh;
        border-radius: 0;
    }
    
    .tasks-grid {
        grid-template-columns: 1fr;
    }
    
    .status-grid-large {
        grid-template-columns: 1fr;
    }
    
    .totals-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .meeting-entry {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .meeting-date,
    .meeting-time {
        min-width: 100%;
    }
    
    .task-card-meta {
        flex-wrap: wrap;
        gap: 5px;
    }
}

@media (max-width: 320px) {
    body { padding: 5px; }
    .tab { font-size: 10px; padding: 6px 2px; }
    .popup-content { margin: 1px; }
}

/* Отключение масштабирования на мобильных устройствах */
input, select, textarea {
    width: 100%;
    padding: 6px;
    background: #2A2D2E;
    border: 1px solid #3A3D3E;
    border-radius: 4px;
    color: #B7B1A7;
    font-size: 13px;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    
    /* Предотвращение масштабирования */
    font-size: 16px; /* Минимальный размер для iOS */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Особые настройки для разных типов полей ввода */
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    /* Отключение автоматического увеличения масштаба в iOS */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Улучшение рендеринга */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Специфичные настройки для полей ввода чисел */
input[type="number"] {
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

/* Убираем стрелки в input type number */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Для полей с датами */
input[type="date"] {
    -webkit-appearance: none;
    min-height: 32px; /* Минимальная высота для удобного тапа */
}

/* Улучшение для select */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23B7B1A7' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 8px;
    padding-right: 25px;
}

/* Стили для фокуса - без изменения масштаба */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #B7B1A7;
    /* Отключаем любые трансформации при фокусе */
    transform: scale(1);
    -webkit-transform: scale(1);
}

/* Дополнительные медиа-запросы для мобильных устройств */
@media screen and (max-width: 768px) {
    body {
        /* Предотвращение масштабирования на всем документе */
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
        
        /* Улучшение производительности */
        -webkit-overflow-scrolling: touch;
    }
    
    input, select, textarea {
        /* Гарантированный размер шрифта для iOS */
        font-size: 16px !important;
        
        /* Улучшение отзывчивости */
        touch-action: manipulation;
    }
    
    /* Особые настройки для маленьких экранов */
    @media screen and (max-width: 360px) {
        input, select, textarea {
            padding: 8px 6px;
            min-height: 36px; /* Увеличиваем область тапа */
        }
    }
}

/* Улучшение для финансовых строк на мобильных */
@media screen and (max-width: 480px) {
    .finance-row input {
        font-size: 14px !important;
        min-height: 32px;
    }
    
    .meeting-entry input,
    .meeting-entry select {
        font-size: 14px !important;
        min-height: 32px;
    }
}

/* ==================== УНИВЕРСАЛЬНАЯ СЕТКА И КАРТОЧКИ ==================== */

/* Сетка для универсальных карточек */
.universal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .universal-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .universal-grid {
        grid-template-columns: 1fr;
    }
}

/* Универсальная карточка */
.universal-card {
    background: #2A2D2E;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #3A3D3E;
    border-left: 4px solid #B7B1A7;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.3s ease-out;
}

.universal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: #4A4D4E;
}

/* КОРРЕКТИРОВКА: Цветные границы для статусов задач */
.universal-card.task[data-status="В планах"] { border-left-color: #2C446E; }
.universal-card.task[data-status="В работе"] { border-left-color: #A03F45; }
.universal-card.task[data-status="На проверке"] { border-left-color: #9C6834; }
.universal-card.task[data-status="Завершено"] { border-left-color: #2B6E55; }
.universal-card.task[data-status="Отложено"] { border-left-color: #5E4E86; }
.universal-card.task[data-status="Отменено"] { border-left-color: #585967; }

/* КОРРЕКТИРОВКА: Цветные границы для тем - по выбранному цвету */
.universal-card.theme {
    border-left-color: var(--theme-color, #B7B1A7);
}

/* КОРРЕКТИРОВКА: Цветные границы для целей - по цвету фона темы */
.universal-card.goal {
    border-left-color: var(--goal-theme-color, #9C6834);
}

/* КОРРЕКТИРОВКА: Цветные границы для категорий */
.universal-card.category { border-left: 4px solid #5c6bc0; }

/* Заголовок карточки */
.universal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.universal-card-title {
    flex: 1;
    font-size: 1.1rem;
    color: #D1CDC7;
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
    word-break: break-word;
}

/* Горизонтальная черта */
.universal-card-divider {
    height: 1px;
    background: #3A3D3E;
    margin: 12px 0;
    border: none;
    width: 100%;
}

/* Тело карточки */
.universal-card-body {
    flex: 1;
    margin-bottom: 12px;
}

/* Мета-информация (темы и цели) */
.universal-card-meta {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.universal-card-tag {
    background: rgba(66, 73, 73, 0.5);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #D1CDC7;
    display: inline-block;
}

/* Универсальные информационные блоки */
.universal-card-info-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.universal-card-info-block-vertical {
    background: rgba(42, 45, 46, 0.7);
    border: 1px solid #3A3D3E;
    border-radius: 6px;
    padding: 10px;
    transition: all 0.3s ease;
}

.universal-card-info-block-vertical:hover {
    border-color: #4A4D4E;
    background: rgba(42, 45, 46, 0.9);
}

.universal-card-info-title-vertical {
    font-size: 0.75rem;
    color: #6B6B6B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 400;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #3A3D3E;
}

/* Бейджи статуса */
.universal-card-status-badge-vertical {
    font-size: 0.8rem;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
    text-align: center;
    min-width: 80px;
    margin-top: 4px;
    color: #fff;
}

/* Статистические бейджи */
.universal-card-stat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
    min-width: 80px;
    margin-top: 4px;
    border: none;
    cursor: default;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    background: rgba(66, 73, 73, 0.5);
    color: #D1CDC7;
    border: 1px solid rgba(66, 73, 73, 0.7);
}

/* Горизонтальное расположение кнопок */
.universal-card-buttons-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 4px;
}

.universal-card-buttons-row .universal-card-stat-badge {
    flex: 1;
    min-width: 0;
    margin-top: 0;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .universal-card-buttons-row {
        flex-wrap: wrap;
    }
    
    .universal-card-buttons-row .universal-card-stat-badge {
        min-width: 120px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .universal-card {
        min-height: 170px;
    }
    
    .universal-card-buttons-row {
        flex-direction: column;
        gap: 4px;
    }
    
    .universal-card-buttons-row .universal-card-stat-badge {
        min-width: 100%;
    }
}

/* Цвета статусов для универсальных карточек */
.status-pending { background: #2C446E; }
.status-in-progress { background: #A03F45; }
.status-review { background: #9C6834; }
.status-completed { background: #2B6E55; }
.status-postponed { background: #5E4E86; }
.status-cancelled { background: #585967; }

/* ==================== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ==================== */

/* Кнопки целей в карточке темы */
.theme-goals-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.theme-goal-btn {
    background: rgba(66, 73, 73, 0.5);
    border: 1px solid rgba(66, 73, 73, 0.7);
    color: #D1CDC7;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    width: 100%;
    border-left: 4px solid rgba(66, 73, 73, 0.7);
}

.theme-goal-btn:hover {
    background: rgba(66, 73, 73, 0.5);
    border-color: #D1CDC7;
    color: #D1CDC7;
    transform: translateY(-1px);
}

/* Кнопки задач в карточке цели */
.goal-tasks-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.goal-task-btn {
    background: rgba(66, 73, 73, 0.5);
    border: 1px solid rgba(66, 73, 73, 0.7);
    color: #D1CDC7;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    width: 100%;
    position: relative;
    padding-left: 20px;
}

.goal-task-btn:hover {
    background: rgba(66, 73, 73, 0.5);
    border-color: #D1CDC7;
    color: #D1CDC7;
    transform: translateY(-1px);
}



/* Кнопка очистки фильтров */
.clear-filters-btn {
    background: #3A3D3E;
    color: #B7B1A7;
    border: 1px solid #4A4D4E;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    font-size: 13px;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-left: auto;
}

.clear-filters-btn:hover {
    background: #4A4D4E;
    color: #D1CDC7;
}

/* Адаптивность для новых элементов */
@media (max-width: 768px) {
    .clear-filters-btn {
        margin-left: 0;
        width: 100%;
        margin-top: 10px;
    }
    
    .theme-goals-list,
    .goal-tasks-list {
        gap: 4px;
    }
    
    .theme-goal-btn,
    .goal-task-btn {
        font-size: 0.75rem;
        padding: 5px 8px;
    }
}

/* ============ ДОБАВИТЬ В КОНЕЦ ФАЙЛА style.css ============ */

/* Дополнительные стили для карточек задач */
.task-card-finance-vertical,
.task-card-dates-vertical,
.task-card-documents-vertical {
    margin-top: 8px;
}

/* Контейнеры для финансовых сумм */
.task-finance-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.task-finance-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 5px 8px;
    background: rgba(42, 45, 46, 0.5);
    border-radius: 4px;
    border: 1px solid rgba(66, 73, 73, 0.7);
}

.finance-label {
    color: #B7B1A7;
    font-weight: 400;
}

.finance-value {
    font-weight: 500;
    font-family: 'Source Sans Pro', monospace;
    letter-spacing: 0.3px;
}

.finance-positive { color: #2B6E55; }
.finance-negative { color: #A03F45; }
.finance-pending { color: #9C6834; }
.finance-neutral { color: #B7B1A7; }

/* Стили для дат */
.task-dates-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.task-date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 5px 8px;
    background: rgba(42, 45, 46, 0.5);
    border-radius: 4px;
    border: 1px solid rgba(66, 73, 73, 0.7);
}

.date-label {
    color: #B7B1A7;
    font-weight: 400;
}

.date-value {
    font-weight: 500;
    color: #D1CDC7;
}

.date-overdue {
    color: #A03F45;
    font-weight: 500;
}

.date-today {
    color: #2B6E55;
    font-weight: 500;
}

.date-upcoming {
    color: #2C446E;
    font-weight: 500;
}

/* Стили для документов */
.task-documents-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.task-document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 5px 8px;
    background: rgba(42, 45, 46, 0.5);
    border-radius: 4px;
    border: 1px solid rgba(66, 73, 73, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-document-item:hover {
    background: rgba(66, 73, 73, 0.5);
    border-color: #D1CDC7;
    color: #D1CDC7;
}

.document-name {
    color: #D1CDC7;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 8px;
}

.document-icon {
    color: #5c6bc0;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Адаптивность */
@media (max-width: 480px) {
    .task-finance-total,
    .task-date-item,
    .task-document-item {
        font-size: 0.8rem;
        padding: 4px 6px;
    }
}

/* Обновленные стили для кнопок задач в карточке цели */
.goal-task-btn {
    background: rgba(66, 73, 73, 0.5);
    border: 1px solid rgba(66, 73, 73, 0.7);
    color: #D1CDC7;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
    border-left: 4px solid #B7B1A7; /* Цвет по умолчанию */
}

.goal-task-btn:hover {
    background: rgba(66, 73, 73, 0.5);
    border-color: #D1CDC7;
    color: #D1CDC7;
    transform: translateY(-1px);
}

.goal-task-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.goal-task-status {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 0px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Цвета статусов для текста */
.goal-task-btn .status-pending { background: #2C446E; }
.goal-task-btn .status-in-progress { background: #A03F45; }
.goal-task-btn .status-review { background: #9C6834; }
.goal-task-btn .status-completed { background: #2B6E55; }
.goal-task-btn .status-postponed { background: #5E4E86; }
.goal-task-btn .status-cancelled { background: #585967; }

/* Цветные границы для кнопок (соответствуют статусам) */
.goal-task-btn[data-status="В планах"] { border-left-color: #2C446E; }
.goal-task-btn[data-status="В работе"] { border-left-color: #A03F45; }
.goal-task-btn[data-status="На проверке"] { border-left-color: #9C6834; }
.goal-task-btn[data-status="Завершено"] { border-left-color: #2B6E55; }
.goal-task-btn[data-status="Отложено"] { border-left-color: #5E4E86; }
.goal-task-btn[data-status="Отменено"] { border-left-color: #585967; }

/* Адаптивность для новых кнопок */
@media (max-width: 768px) {
    .goal-task-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .goal-task-status {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
}

@media (max-width: 480px) {
    .goal-task-btn {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        white-space: normal;
    }
    
    .goal-task-name {
        white-space: normal;
        word-break: break-word;
    }
    
    .goal-task-status {
        align-self: flex-start;
    }
}

/* ==================== СТИЛИ ДЛЯ ВКЛАДКИ "КАТЕГОРИИ" ==================== */

/* Общие стили для карточек категорий */
.universal-card.category {
    border-left: 4px solid #3A3D3E;
    min-height: 220px;
}

.universal-card.category-finances,
.universal-card.category-documents {
    border-left-color: #3A3D3E; /* Серый цвет вместо цветного */
}

.universal-card.category:hover {
    border-left-color: #7986cb;
}

/* Общая финансовая сводка */
.finance-totals-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.finance-summary-item {
    display: flex;
    flex-direction: column; 
    gap: 3px;
    padding: 6px;
    background: rgba(42, 45, 46, 0.5);
    border-radius: 4px;
    border: 1px solid rgba(66, 73, 73, 0.3);
}

.finance-summary-label {
    font-size: 0.7rem;
    color: #D1CDC7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.finance-summary-value {
    font-size: 0.9rem;
    font-weight: 500;
  font-family: 'Source Sans Pro', monospace; 
    letter-spacing: 0.3px;
}

.finance-summary-value.positive { color: #2B6E55; }
.finance-summary-value.negative { color: #A03F45; }
.finance-summary-value.neutral { color: #B7B1A7; }
.finance-summary-value.pending { color: #9C6834; }

/* Списки задач в категориях */
.category-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.category-task-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(66, 73, 73, 0.3);
    border: 1px solid rgba(66, 73, 73, 0.5);
    color: #D1CDC7;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 400;
    text-align: left;
    border-left: 3px solid #5c6bc0;
}

.category-task-btn:hover {
    background: rgba(66, 73, 73, 0.5);
    border-color: #D1CDC7;
    transform: translateY(-1px);
}

.category-task-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.category-task-value {
    font-weight: 500;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
}

/* Специфичные стили для финансов */
.category-task-btn.finance {
    border-left-color: #2B6E55;
}

.category-task-btn.finance .category-task-value.positive {
    color: #2B6E55;
    background: rgba(43, 110, 85, 0.2);
}

.category-task-btn.finance .category-task-value.negative {
    color: #A03F45;
    background: rgba(160, 63, 69, 0.2);
}

.category-task-btn.finance .category-task-value.pending {
    color: #9C6834;
    background: rgba(156, 104, 52, 0.2);
}

/* Специфичные стили для документов */
.category-task-btn.document {
    border-left-color: #9C6834;
}

.category-task-btn.document .category-task-value {
    color: #5c6bc0;
    background: rgba(92, 107, 192, 0.2);
}

/* Пустое состояние */
.category-empty-state {
    text-align: center;
    color: #6B6B6B;
    font-style: italic;
    padding: 20px 15px;
    font-size: 0.85rem;
    background: rgba(42, 45, 46, 0.3);
    border-radius: 4px;
    border: 1px dashed #3A3D3E;
}

/* Полоса прокрутки */
.category-tasks-list::-webkit-scrollbar {
    width: 4px;
}

.category-tasks-list::-webkit-scrollbar-track {
    background: rgba(42, 45, 46, 0.3);
    border-radius: 2px;
}

.category-tasks-list::-webkit-scrollbar-thumb {
    background: #5c6bc0;
    border-radius: 2px;
}

.category-tasks-list::-webkit-scrollbar-thumb:hover {
    background: #7986cb;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .finance-totals-summary {
        grid-template-columns: 1fr;
    }
    
    .category-task-btn {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .category-task-name {
        white-space: normal;
        word-break: break-word;
    }
    
    .category-task-value {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .universal-card.category {
        min-height: 200px;
    }
    
    .category-tasks-list {
        max-height: 150px;
    }
}

/* Сводка по документам */
.documents-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.documents-summary-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px;
    background: rgba(42, 45, 46, 0.5);
    border-radius: 4px;
    border: 1px solid rgba(66, 73, 73, 0.3);
}

.documents-summary-label {
    font-size: 0.7rem;
    color: #D1CDC7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.documents-summary-value {
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Source Sans Pro', monospace;
    letter-spacing: 0.3px;
    color: #256d7b;
}

/* Списки целей и тем */
.category-goals-list,
.category-themes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
}

.category-goal-item,
.category-theme-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(66, 73, 73, 0.3);   
    border: 1px solid rgba(66, 73, 73, 0.5);
    color: #D1CDC7;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 400;
    text-align: left;
    border-left: 4px solid rgba(66, 73, 73, 0.5);
}

.category-goal-item:hover,
.category-theme-item:hover {
    background: rgba(66, 73, 73, 0.5);
    border-color: #D1CDC7;
    transform: translateY(-1px);
}

.category-goal-name,
.category-theme-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.category-goal-value,
.category-theme-value {
    font-weight: 500;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Стили для финансов */
.category-finances .category-goal-item .category-goal-value,
.category-finances .category-theme-item .category-theme-value {
 /*   background: rgba(255, 255, 255, 0.1); */
    color: #D1CDC7;
}

/* Стили для документов */
.category-documents .category-goal-item .category-goal-value,
.category-documents .category-theme-item .category-theme-value {
/*  background: rgba(92, 107, 192, 0.2); */
/*    color: #4285b4;*/
 background: #256d7b; 
   color: #ffffff;


}

/* Цвета для финансовых значений */
.finance-value-positive {
    color: #ffffff !important;
   /*    color: #2B6E55 !important;  */
 /*   background: rgba(43, 110, 85, 0.2) !important;*/
     background: #2B6E55 !important;
}

.finance-value-negative {
    color: #ffffff !important;
 /*   color: #A03F45 !important;   */
/*    background: rgba(160, 63, 69, 0.2) !important;*/
    background: #A03F45 !important;
}

.finance-value-pending {
        color: #ffffff !important;
  /*  color: #9C6834 !important;   */
/*    background: rgba(156, 104, 52, 0.2) !important;*/
    background: #9C6834 !important;
}

/* Полоса прокрутки */
.category-goals-list::-webkit-scrollbar,
.category-themes-list::-webkit-scrollbar {
    width: 4px;
}

.category-goals-list::-webkit-scrollbar-track,
.category-themes-list::-webkit-scrollbar-track {
    background: rgba(42, 45, 46, 0.3);
    border-radius: 2px;
}

.category-goals-list::-webkit-scrollbar-thumb,
.category-themes-list::-webkit-scrollbar-thumb {
    background: #5c6bc0;
    border-radius: 2px;
}

.category-goals-list::-webkit-scrollbar-thumb:hover,
.category-themes-list::-webkit-scrollbar-thumb:hover {
    background: #7986cb;
}

/* Пустое состояние */
.category-empty-state {
    text-align: center;
    color: #6B6B6B;
    font-style: italic;
    padding: 20px 15px;
    font-size: 0.85rem;
    background: rgba(42, 45, 46, 0.3);
    border-radius: 4px;
    border: 1px dashed #3A3D3E;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .finance-totals-summary,
    .documents-summary {
        grid-template-columns: 1fr;
    }
    
    .category-goal-item,
    .category-theme-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .category-goal-name,
    .category-theme-name {
        white-space: normal;
        word-break: break-word;
    }
    
    .category-goal-value,
    .category-theme-value {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .universal-card.category-finances,
    .universal-card.category-documents {
        min-height: 200px;
    }
    
    .category-goals-list,
    .category-themes-list {
        max-height: 150px;
    }
}


/* ==================== СТИЛИ ДЛЯ КОНТРАГЕНТОВ ==================== */

/* Стили для строк контрагентов в popup */
.counterparty-row {
    background: #2A2D2E;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 3px solid #B7B1A7;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr 1fr auto;
    gap: 10px;
    align-items: center;
}

.counterparty-name input,
.counterparty-contact input,
.counterparty-phone input,
.counterparty-email input {
    width: 100%;
    background: #1E2021;
    border: 1px solid #3A3D3E;
    color: #B7B1A7;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.counterparty-role select {
    width: 100%;
    background: #1E2021;
    border: 1px solid #3A3D3E;
    color: #B7B1A7;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23B7B1A7' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 8px;
    padding-right: 25px;
}

.remove-counterparty-btn {
    background: #3A3D3E;
    color: #B7B1A7;
    border: 1px solid #4A4D4E;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 30px;
    text-align: center;
}

.remove-counterparty-btn:hover {
    background: #4A4D4E;
    color: #D1CDC7;
}

/* Адаптивность для строк контрагентов */
@media (max-width: 1024px) {
    .counterparty-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .counterparty-row > *:nth-child(5) { grid-column: 1; }
    .counterparty-row > *:nth-child(6) { grid-column: 2; }
}

@media (max-width: 768px) {
    .counterparty-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .counterparty-row > *:nth-child(5),
    .counterparty-row > *:nth-child(6) {
        grid-column: 1;
    }
}

/* Стили для контрагентов в карточке задачи */
.task-counterparties-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.task-counterparty-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 5px 8px;
    background: rgba(42, 45, 46, 0.5);
    border-radius: 4px;
    border: 1px solid rgba(66, 73, 73, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-counterparty-item:hover {
    background: rgba(66, 73, 73, 0.5);
    border-color: #D1CDC7;
}

.counterparty-name {
    color: #D1CDC7;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 8px;
}

.counterparty-role {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(156, 104, 52, 0.3);
    color: #D1CDC7;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Общие стили для сводки контрагентов */
.counterparties-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.counterparties-summary-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px;
    background: rgba(42, 45, 46, 0.5);
    border-radius: 4px;
    border: 1px solid rgba(66, 73, 73, 0.3);
}

.counterparties-summary-label {
    font-size: 0.7rem;
    color: #D1CDC7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.counterparties-summary-value {
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Source Sans Pro', monospace;
    letter-spacing: 0.3px;
    color: #256d7b;
}

/* ==================== ПЛАНИРОВЩИК НА ДЕНЬ ==================== */

/* Селектор даты */
.planner-date-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-nav-btn {
    background: #3A3D3E;
    color: #B7B1A7;
    border: 1px solid #4A4D4E;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    font-size: 13px;
    transition: all 0.3s ease;
    min-width: 40px;
}

.date-nav-btn:hover {
    background: #4A4D4E;
    color: #D1CDC7;
}

.planner-date-input {
    background: #2A2D2E;
    border: 1px solid #3A3D3E;
    color: #B7B1A7;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    min-width: 140px;
}

.planner-date-input:focus {
    outline: none;
    border-color: #B7B1A7;
}

#todayBtn {
    background: #3A3D3E;
    color: #B7B1A7;
    border: 1px solid #4A4D4E;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
    font-weight: 300;
    font-size: 13px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#todayBtn:hover {
    background: #4A4D4E;
    color: #D1CDC7;
}

#todayBtn.active {
    background: #2A2D2E;
    color: #D1CDC7;
    border-color: #B7B1A7;
}

/* Основной контейнер планировщика */
.planner-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    height: 900px;
    overflow: hidden;
}

/* Временная шкала */
.planner-timeline {
    flex: 3;
    background: #2A2D2E;
    border-radius: 8px;
    border: 1px solid #3A3D3E;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.timeline-header {
    display: flex;
    background: #3A3D3E;
    border-bottom: 1px solid #4A4D4E;
    min-height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.timeline-time {
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B7B1A7;
    font-size: 0.9rem;
    font-weight: 400;
    border-right: 1px solid #4A4D4E;
    flex-shrink: 0;
    background: #3A3D3E;
}

.timeline-day-title {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D1CDC7;
    font-size: 1.1rem;
    font-weight: 400;
    padding: 0 20px;
}

/* Сетка временных слотов (24 часа) */
.timeline-grid {
    flex: 1;
    overflow-y: auto;
    min-height: 800px;
    position: relative;
}

.timeline-hour {
    display: flex;
    height: 60px;
    border-bottom: 1px solid #3A3D3E;
    position: relative;
}

.time-label {
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B7B1A7;
    font-size: 0.85rem;
    border-right: 1px solid #3A3D3E;
    background: rgba(42, 45, 46, 0.5);
    flex-shrink: 0;
    position: sticky;
    left: 0;
    z-index: 50;
}

.time-slot {
    flex: 1;
    border-right: 1px solid #3A3D3E;
    background: #2A2D2E;
    position: relative;
}

.time-slot:last-child {
    border-right: none;
}

/* События на временной шкале */
.timeline-event {
    position: absolute;
    border-radius: 4px;
    padding: 6px 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    box-sizing: border-box;
    font-size: 0.8rem;
    line-height: 1.2;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 40px;
}

.timeline-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

.event-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.event-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    font-size: 0.75rem;
}

.event-time {
    font-size: 0.7rem;
    opacity: 0.9;
    margin-top: 0;
}

/* Цвета для разных типов событий */
.timeline-event.meeting {
    background-color: rgba(92, 107, 192, 0.9);
    border-color: #5c6bc0;
    color: #fff;
}

.timeline-event.deadline {
    background-color: rgba(183, 177, 167, 0.9);
    border-color: #B7B1A7;
    color: #181A1B;
}

/* Блок задач планировщика */
.planner-tasks {
    flex: 1;
    min-width: 300px;
    background: #2A2D2E;
    border-radius: 8px;
    border: 1px solid #3A3D3E;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.planner-tasks-header {
    padding: 15px;
    border-bottom: 1px solid #3A3D3E;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #3A3D3E;
}

.planner-tasks-header h3 {
    color: #D1CDC7;
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0;
}

.tasks-count {
    font-size: 0.85rem;
    color: #B7B1A7;
    padding: 4px 8px;
    background: rgba(42, 45, 46, 0.5);
    border-radius: 4px;
}

.planner-tasks-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.planner-day-task {
    background: rgba(42, 45, 46, 0.7);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(66, 73, 73, 0.5);
    border-left: 4px solid #B7B1A7;
    cursor: pointer;
    transition: all 0.3s ease;
}

.planner-day-task:hover {
    background: rgba(42, 45, 46, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.planner-day-task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.planner-day-task-title {
    flex: 1;
    font-size: 0.95rem;
    color: #D1CDC7;
    font-weight: 400;
    line-height: 1.3;
    word-break: break-word;
    margin-right: 8px;
}

.planner-day-task-status {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    color: #fff;
}

.planner-day-task-time {
    font-size: 0.8rem;
    color: #B7B1A7;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.planner-day-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.planner-day-task-theme,
.planner-day-task-goal {
    background: rgba(66, 73, 73, 0.5);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #D1CDC7;
}

/* Легенда планировщика */
.planner-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: #2A2D2E;
    border-radius: 6px;
    border: 1px solid #3A3D3E;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.meeting-color {
    background-color: #5c6bc0;
}

.legend-color.deadline-color {
    background-color: #B7B1A7;
}

.legend-item span {
    font-size: 0.85rem;
    color: #B7B1A7;
}

/* Полоса прокрутки для временной шкалы */
.timeline-grid::-webkit-scrollbar {
    width: 8px;
}

.timeline-grid::-webkit-scrollbar-track {
    background: #2A2D2E;
}

.timeline-grid::-webkit-scrollbar-thumb {
    background: #5c6bc0;
    border-radius: 4px;
}

.timeline-grid::-webkit-scrollbar-thumb:hover {
    background: #7986cb;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .planner-container {
        flex-direction: column;
        height: auto;
    }
    
    .planner-tasks {
        width: 100%;
        min-width: auto;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .planner-date-selector {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .planner-date-input {
        min-width: 120px;
    }
    
    .timeline-hour {
        height: 50px;
    }
    
    .time-label {
        width: 70px;
        font-size: 0.8rem;
    }
    
    .timeline-event {
        padding: 4px 6px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .planner-date-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-nav-btn,
    .planner-date-input,
    #todayBtn {
        width: 100%;
        text-align: center;
    }
    
    .timeline-hour {
        height: 60px;
    }
    
    .time-label {
        width: 80px;
        font-size: 0.75rem;
    }
    
    .planner-container {
    height: 1400px;
}
    
    
    .planner-tasks {
}
    
    .planner-tasks-header {
        flex-direction: column;
      gap: 10px;
        align-items: flex-start;
    }
    
    .tasks-count {
        align-self: flex-start;
    }
}

/* Стили для drag and drop */
.universal-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.universal-card.drag-over {
    border: 2px dashed #A03F45;
    background-color: rgba(160, 63, 69, 0.05);
    transform: scale(1.02);
}

/* Индикатор перетаскивания */
.drag-ghost {
    opacity: 0.8;
    transform: rotate(5deg);
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    transition: none;
}

/* Контейнер для сортировки */
.sortable-container {
    min-height: 100px;
    transition: all 0.3s ease;
}

.date-completed {
    color: #2B6E55 !important; /* Зеленый цвет для завершенных задач */
    font-weight: 500;
}

/* Стили для поля имени и даты платежа */
.finance-name-date {
    display: flex;
    gap: 10px;
    width: 100%;
}

.finance-name-date input[type="text"] {
    flex: 1;
    min-width: 0;
}

.finance-name-date input[type="date"] {
    flex: 1;
    min-width: 0;
    background: #383838;
    border: 1px solid #4a4a4a;
    color: #E6E1D8;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.finance-name-date input[type="date"]:focus {
    outline: none;
    border-color: #A03F45;
}

/* Стили для списка финансовых операций в карточке */
.task-finance-operations {
    margin-top: 8px;
    border-top: 1px solid #383838;
    padding-top: 8px;
}

.finance-operation-item {
    margin-bottom: 6px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(66, 73, 73, 0.7);
    border-radius: 4px;
    border-left: 4px solid transparent;
}

.finance-operation-item.finance-pending {
    border-left-color: #9C6834;
}

.finance-operation-item.finance-completed {
    border-left-color: #2B6E55;
}

.finance-operation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.finance-operation-name {
    font-size: 12px;
    color: #E6E1D8;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.finance-operation-date {
    font-size: 11px;
    color: #9C9C9C;
    margin-left: 8px;
    white-space: nowrap;
}

.finance-operation-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.finance-operation-type {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.finance-operation-type.finance-income {
    background: rgba(42, 157, 143, 0.2);
    color: #2a9d8f;
}

.finance-operation-type.finance-expense {
    background: rgba(231, 111, 81, 0.2);
    color: #e76f51;
}

.finance-operation-amount {
    font-size: 12px;
    font-weight: 500;
    color: #E6E1D8;
}

/* Добавьте в файл style.css */
/* Стили для фильтра периода */
.custom-period {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.period-date-input {
    background: #1E2021;
    border: 1px solid #3A3D3E;
    color: #B7B1A7;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Source Sans Pro', 'Myriad Pro Light', 'Segoe UI Light', Arial, sans-serif;
}

.period-date-input:focus {
    outline: none;
    border-color: #B7B1A7;
}

.period-separator {
    color: #B7B1A7;
    font-weight: 500;
}

/* Специфичные стили для фильтров в категориях */
#categories .tasks-filters {
    margin-top: 10px;
}

#categories .filter-group {
    flex: 1;
}