/* IP Tax Calculator Styles */

/* Основные стили контейнера */
.ip-calculator-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ip-calculator-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Уведомление о сохранении данных */
.data-notice {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border: 2px solid #ff8c42;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.2);
    animation: slideDown 0.5s ease-out;
}

.notice-content {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 15px;
}

.notice-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notice-text {
    flex-grow: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #8b4513;
}

.notice-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #8b4513;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.notice-close:hover {
    background-color: rgba(139, 69, 19, 0.1);
    transform: scale(1.1);
}

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

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

.data-notice.hidden {
    display: none;
}

/* Стили формы */
.ip-calculator-form {
    
    background: #fafbfc;
}

.ip-calculator-form-group {
    margin-bottom: 30px;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ip-calculator-form-group h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.ip-calculator-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.ip-calculator-form-control {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.ip-calculator-form-control label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #34495e;
    font-size: 14px;
}

.ip-calculator-form-control input,
.ip-calculator-form-control select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-sizing: border-box;
}

.ip-calculator-form-control input:focus,
.ip-calculator-form-control select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Подсказки - ВАЖНЫЕ СТИЛИ */
.input-hint {
    position: relative;
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

.hint-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    transition: all 0.3s ease;
    user-select: none;
}

.hint-icon:hover {
    background-color: #0056b3;
    transform: scale(1.15);
}

.hint-text {
    visibility: hidden;
    opacity: 0;
    width: 320px;
    background-color: #2c3e50;
    color: #ffffff;
    text-align: left;
    border-radius: 8px;
    padding: 15px;
    position: absolute;
    z-index: 9999;
    bottom: 130%;
    left: 50%;
    margin-left: -160px;
    transition: all 0.3s ease;
    font-size: 13px;
    line-height: 1.6;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid #34495e;
    pointer-events: none;
}

.hint-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
}

.input-hint:hover .hint-text {
    visibility: visible;
    opacity: 1;
    transform: translateY(-5px);
    pointer-events: auto;
}

/* Управление данными */
.data-management-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.data-management-section h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
}

.data-info {
    margin-bottom: 18px;
    font-size: 15px;
    opacity: 0.95;
    line-height: 1.4;
}

.data-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.data-save {
    background-color: #28a745 !important;
    border: 2px solid #28a745;
    color: white !important;
    font-weight: bold;
    animation: pulse-save 2s infinite;
}

.data-save:hover {
    background-color: #218838 !important;
    transform: scale(1.05);
    animation: none;
}

.data-load {
    background-color: #17a2b8 !important;
    border: 2px solid #17a2b8;
    color: white !important;
    font-weight: bold;
}

.data-load:hover {
    background-color: #138496 !important;
    transform: scale(1.05);
}

@keyframes pulse-save {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* Секция экспорта */
.export-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.export-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    font-size: 18px;
    text-align: center;
    font-weight: 600;
}

.export-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Кнопки */
.ip-calculator-button {
    margin: 5px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.ip-calculator-button.primary {
    background-color: #007bff;
    color: white;
    font-size: 18px;
    padding: 18px 35px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    margin-bottom: 20px;
}

.ip-calculator-button.primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.ip-calculator-button:not(.primary):not(.data-save):not(.data-load) {
    background-color: #6c757d;
    color: white;
}

.ip-calculator-button:not(.primary):not(.data-save):not(.data-load):hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

.ip-calculator-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

/* Новые правила */
.new-rules-notice {
    background-color: #e7f3ff;
    border: 2px solid #b3d7ff;
    border-radius: 8px;
    padding: 18px;
    margin-top: 20px;
}

.new-rules-notice h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #0056b3;
    font-size: 16px;
}

.new-rules-notice ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.new-rules-notice li {
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Результаты */
.ip-calculator-results {
    background: white;
    padding: 30px;
}

.ip-calculator-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 25px;
    background: #f1f3f4;
    padding: 4px;
    border-radius: 8px;
}

.tab-link {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    transition: all 0.3s ease;
}

.tab-link.active {
    background: #007bff;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.tab-link:hover:not(.active) {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.tab-content {
    display: none;
}

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

/* Таблицы */
.responsive-table {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Сводные блоки */
.summary-box {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.summary-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.summary-box p {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.summary-box span {
    font-weight: bold;
    color: #007bff;
}

/* Рекомендации */
.recommended {
    background-color: #e8f5e8;
    border: 2px solid #c3e6c3;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.recommended h3 {
    color: #155724;
    margin-top: 0;
    margin-bottom: 15px;
}

.payment-due {
    color: #dc3545;
    font-weight: bold;
}

.ip-calculator-warning {
    color: #dc3545;
    font-weight: bold;
}

/* Информация о зачете */
.deduction-box {
    background-color: #e3f2fd;
    border: 2px solid #90caf9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.deduction-box h3 {
    color: #0d47a1;
    margin-top: 0;
    margin-bottom: 15px;
}

.deduction-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
}

.deduction-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
}

.deduction-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Информационные блоки */
.new-rules-info {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
}

.new-rules-info h4 {
    color: #495057;
    margin-top: 0;
    margin-bottom: 15px;
}

.new-rules-info ol {
    padding-left: 20px;
}

.new-rules-info li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.important-dates {
    background-color: #fff3cd;
    border: 2px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.important-dates h4 {
    color: #856404;
    margin-top: 0;
    margin-bottom: 15px;
}

.important-dates ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.important-dates li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.ip-calculator-payment-summary {
    background-color: #f8f9fa;
    border-left: 4px solid #28a745;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
}

.ip-calculator-payment-summary ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.ip-calculator-payment-summary li {
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Адаптивность */
@media (max-width: 768px) {
    .ip-calculator-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .ip-calculator-form-control {
        min-width: auto;
    }
    
    .hint-text {
        width: 280px;
        margin-left: -140px;
        font-size: 12px;
        padding: 12px;
    }
    
    .data-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .export-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .ip-calculator-button {
        width: 100%;
        max-width: 300px;
    }
    
    .ip-calculator-tabs {
        flex-wrap: wrap;
    }
    
    .tab-link {
        flex: 1 1 45%;
        min-width: 120px;
    }
    
    .responsive-table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 10px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .ip-calculator-wrapper {
        padding: 10px;
    }
    
    .ip-calculator-form {
        padding: 20px;
    }
    
    .ip-calculator-form-group {
        padding: 20px;
    }
    
    .hint-text {
        width: 250px;
        margin-left: -125px;
        left: 50%;
        right: auto;
    }
    
    .notice-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .tab-link {
        flex: 1 1 100%;
        margin-bottom: 2px;
    }
}

/* Анимации для успешных сообщений */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}







/* Улучшенные стили для калькулятора ИП */

/* Основные стили для таблиц */
.ip-calculator table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.ip-calculator th,
.ip-calculator td {
    padding: 12px 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.ip-calculator th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

/* Стили для квартальной таблицы */
#quarterly-table {
    overflow-x: auto;
}

#quarterly-table th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
}

.row-highlight {
    background-color: #e3f2fd !important;
    transition: background-color 0.2s;
}

/* Стили для сумм к доплате */
.tax-due {
    color: #d32f2f;
    font-weight: bold;
}

.tax-paid {
    color: #388e3c;
}

.debt-amount {
    color: #d32f2f;
    font-weight: bold;
}

/* Стили для информации о зачете */
.deduction-amount {
    cursor: help;
    border-bottom: 1px dashed #666;
    position: relative;
}

.deduction-amount:hover {
    color: #1976d2;
}

.deduction-amount small {
    color: #666;
    font-size: 11px;
}

/* Всплывающая подсказка */
.deduction-tooltip {
    background: #333;
    color: white;
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-size: 12px;
    max-width: 250px;
    display: none;
}

.tooltip-header {
    font-weight: bold;
    margin-bottom: 8px;
    border-bottom: 1px solid #555;
    padding-bottom: 4px;
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.tooltip-row:last-child {
    margin-bottom: 0;
}

/* Стили для детальной информации о зачете */
.quarterly-deduction-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.quarter-deduction {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
}

.quarter-deduction.current-quarter {
    border-color: #1976d2;
    background: #e3f2fd;
}

.quarter-deduction h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.current-quarter h4 {
    color: #1976d2;
}

.deduction-table {
    width: 100%;
    font-size: 13px;
}

.deduction-table td:first-child {
    font-weight: 500;
}

.deduction-table td:last-child {
    text-align: right;
    font-weight: 500;
}

/* Стили для правил зачета */
.deduction-rules {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.rule-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #1976d2;
}

.rule-item h5 {
    margin: 0 0 10px 0;
    color: #1976d2;
    font-size: 14px;
}

.rule-item ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
}

.rule-item li {
    margin-bottom: 5px;
}

/* Стили для примера расчета */
.calculation-example {
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.example-calculation {
    font-size: 14px;
}

.example-calculation ul {
    margin: 10px 0;
    padding-left: 20px;
}

.example-calculation li {
    margin-bottom: 5px;
}

/* Стили для анализа платежей */
.payment-analysis {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.insurance-analysis,
.tax-analysis {
    margin-bottom: 25px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.analysis-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.analysis-item.debt {
    background: #ffebee;
    border-color: #ffcdd2;
}

.analysis-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analysis-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* Стили для рекомендаций */
.payment-recommendations {
    margin-top: 25px;
}

.urgent-recommendation {
    background: #ffebee;
    border: 2px solid #f44336;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.urgent-recommendation h5 {
    color: #d32f2f;
    margin: 0 0 10px 0;
}

.quarterly-recommendation {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.quarterly-recommendation h5 {
    color: #1976d2;
    margin: 0 0 10px 0;
}

.strategy-recommendation {
    background: #f3e5f5;
    border: 1px solid #9c27b0;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.strategy-recommendation h5 {
    color: #7b1fa2;
    margin: 0 0 10px 0;
}

/* Новые стили для уведомлений */
.new-rules-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.new-rules-notice h4 {
    color: white;
    margin: 0 0 15px 0;
}

.deduction-info-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #856404;
}

/* Адаптивность */
@media (max-width: 768px) {
    .quarterly-deduction-info {
        grid-template-columns: 1fr;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
    
    .analysis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ip-calculator table {
        font-size: 12px;
    }
    
    .ip-calculator th,
    .ip-calculator td {
        padding: 8px 4px;
    }
}

@media (max-width: 480px) {
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .deduction-tooltip {
        position: fixed !important;
        bottom: 20px !important;
        left: 20px !important;
        right: 20px !important;
        top: auto !important;
        max-width: none !important;
    }
}

/* Анимации */
.quarter-deduction {
    transition: all 0.3s ease;
}

.quarter-deduction:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.analysis-item {
    transition: all 0.2s ease;
}

.analysis-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Улучшенные стили для вкладок */
.tab-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Стили для календаря дат */
.important-dates {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.dates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.date-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.2s ease;
}

.date-item:hover {
    border-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.date-label {
    font-weight: bold;
    color: #1976d2;
    font-size: 14px;
    margin-bottom: 5px;
}

.date-event {
    color: #333;
    font-size: 13px;
    line-height: 1.4;
}

/* Стили для финальных напоминаний */
.final-reminders {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    color: #333;
}

.final-reminders h4 {
    color: #333;
    margin: 0 0 15px 0;
}

.final-reminders ul {
    margin: 0;
    padding-left: 20px;
}

.final-reminders li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.final-reminders strong {
    color: #d32f2f;
}

/* Дополнительные стили для адаптивности календаря */
@media (max-width: 768px) {
    .dates-grid {
        grid-template-columns: 1fr;
    }
    
    .date-item {
        padding: 12px;
    }
    
    .date-label {
        font-size: 13px;
    }
    
    .date-event {
        font-size: 12px;
    }
}

/* Стили для индикаторов состояния */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.status-indicator.paid {
    background-color: #4caf50;
}

.status-indicator.due {
    background-color: #ff9800;
}

.status-indicator.overdue {
    background-color: #f44336;
}

/* Улучшенные стили для таблиц с индикаторами */
.ip-calculator .status-cell {
    text-align: center;
    vertical-align: middle;
}

/* Анимации для привлечения внимания к важным элементам */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.urgent-recommendation {
    animation: pulse 2s infinite;
}

.debt-amount {
    animation: pulse 2s infinite;
}

/* Стили для печатной версии календаря */
@media print {
    .dates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .date-item {
        break-inside: avoid;
        padding: 10px;
    }
    
    .final-reminders {
        break-inside: avoid;
    }
}



/* Стили для анализа оптимальных взносов */
.analysis-item.highlight {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    padding: 15px;
    border-radius: 8px;
}

.analysis-item.highlight .analysis-label {
    font-weight: bold;
    color: #856404;
}

.analysis-item.highlight .analysis-value {
    font-size: 18px;
    color: #856404;
    font-weight: bold;
}

.optimal-insurance-breakdown {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.optimal-insurance-breakdown h5 {
    color: #495057;
    margin-top: 0;
    margin-bottom: 10px;
}

.strategy-explanation {
    font-style: italic;
    color: #6c757d;
    margin-bottom: 15px;
}

.optimal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.optimal-table thead {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.optimal-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.optimal-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e9ecef;
}

.optimal-table tbody tr:hover {
    background-color: #f8f9fa;
}

.optimal-table .recommended-amount {
    background-color: #d4edda;
    font-weight: bold;
    color: #155724;
}

.optimal-table .shortage {
    color: #dc3545;
    font-weight: bold;
}

.optimal-table .overpaid {
    color: #856404;
    font-style: italic;
}

.optimal-table .exact {
    color: #28a745;
    font-weight: bold;
}

.action-recommendation {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
}

.action-recommendation.urgent {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left-color: #dc3545;
}

.action-recommendation.urgent h6 {
    color: #c82333;
    margin-top: 0;
}

.action-recommendation.info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left-color: #2196f3;
}

.action-recommendation.info h6 {
    color: #0056b3;
    margin-top: 0;
}

.action-recommendation.success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left-color: #28a745;
}

.action-recommendation.success h6 {
    color: #155724;
    margin-top: 0;
}

.action-recommendation p {
    margin: 8px 0;
}

.action-recommendation strong {
    font-size: 16px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .optimal-table {
        font-size: 12px;
    }
    
    .optimal-table th,
    .optimal-table td {
        padding: 8px 6px;
    }
    
    .analysis-item.highlight {
        padding: 12px;
    }
    
    .optimal-insurance-breakdown {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .optimal-table {
        font-size: 10px;
    }
    
    .optimal-table th,
    .optimal-table td {
        padding: 6px 4px;
    }
    
    .analysis-item.highlight .analysis-value {
        font-size: 16px;
    }
}


/* Стили для анализа оптимальных взносов */
.analysis-item.highlight {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    padding: 15px;
    border-radius: 8px;
}

.analysis-item.highlight .analysis-label {
    font-weight: bold;
    color: #856404;
}

.analysis-item.highlight .analysis-value {
    font-size: 18px;
    color: #856404;
    font-weight: bold;
}

.analysis-item .analysis-note {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    margin-top: 5px;
}

/* Блок информации об экономии */
.savings-alert {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 3px solid #28a745;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.savings-alert h6 {
    color: #155724;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
}

.savings-alert p {
    margin: 10px 0;
    color: #155724;
    line-height: 1.6;
}

.savings-highlight-text {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    font-size: 16px !important;
}

.optimal-insurance-breakdown {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.optimal-insurance-breakdown h5 {
    color: #495057;
    margin-top: 0;
    margin-bottom: 10px;
}

.strategy-explanation {
    font-style: italic;
    color: #6c757d;
    margin-bottom: 15px;
}

.optimal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.optimal-table thead {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.optimal-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.optimal-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e9ecef;
}

.optimal-table tbody tr:hover {
    background-color: #f8f9fa;
}

.optimal-table .recommended-amount {
    background-color: #d4edda;
    font-weight: bold;
    color: #155724;
}

.optimal-table .shortage {
    color: #dc3545;
    font-weight: bold;
}

.optimal-table .overpaid {
    color: #856404;
    font-style: italic;
}

.optimal-table .exact {
    color: #28a745;
    font-weight: bold;
}

.action-recommendation {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
}

.action-recommendation.urgent {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left-color: #dc3545;
}

.action-recommendation.urgent h6 {
    color: #c82333;
    margin-top: 0;
}

.action-recommendation.info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left-color: #2196f3;
}

.action-recommendation.info h6 {
    color: #0056b3;
    margin-top: 0;
}

.action-recommendation.success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left-color: #28a745;
}

.action-recommendation.success h6 {
    color: #155724;
    margin-top: 0;
}

.action-recommendation p {
    margin: 8px 0;
}

.action-recommendation strong {
    font-size: 16px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .optimal-table {
        font-size: 12px;
    }
    
    .optimal-table th,
    .optimal-table td {
        padding: 8px 6px;
    }
    
    .analysis-item.highlight {
        padding: 12px;
    }
    
    .optimal-insurance-breakdown {
        padding: 15px;
    }
    
    .savings-alert {
        padding: 15px;
    }
    
    .savings-highlight-text {
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .optimal-table {
        font-size: 10px;
    }
    
    .optimal-table th,
    .optimal-table td {
        padding: 6px 4px;
    }
    
    .analysis-item.highlight .analysis-value {
        font-size: 16px;
    }
    
    .savings-alert h6 {
        font-size: 16px;
    }
}recommendation strong {
    font-size: 16px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .optimal-table {
        font-size: 12px;
    }
    
    .optimal-table th,
    .optimal-table td {
        padding: 8px 6px;
    }
    
    .analysis-item.highlight {
        padding: 12px;
    }
    
    .optimal-insurance-breakdown {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .optimal-table {
        font-size: 10px;
    }
    
    .optimal-table th,
    .optimal-table td {
        padding: 6px 4px;
    }
    
    .analysis-item.highlight .analysis-value {
        font-size: 16px;
    }
}