﻿.year-month-page {
    padding: 30px 20px 60px 20px;
    background-color: black;
    color: white;
    min-height: calc(100vh - 110px);
}

.year-month-box {
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 10px;
    color: white;
}

.page-subtitle {
    color: #bfbfbf;
    margin-bottom: 25px;
}

.form-error {
    color: #ff6b6b;
    margin-bottom: 15px;
}

.year-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.year-input {
    width: 180px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #444;
    background-color: #151515;
    color: white;
    font-size: 18px;
}

    .year-input:focus {
        outline: none;
        border-color: #6fcf97;
    }

.year-button {
    padding: 14px 22px;
    border: none;
    border-radius: 12px;
    background-color: #6fcf97;
    color: #111;
    font-weight: bold;
    cursor: pointer;
}

    .year-button:hover {
        background-color: #5fbd87;
    }

.page-top-line {
    margin-bottom: 18px;
}

.page-top-year {
    color: #6fcf97;
    font-size: 28px;
    font-weight: bold;
    text-transform: capitalize;
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.year-card {
    display: block;
    position: relative;
    background-color: #171717;
    border: 1px solid #2f2f2f;
    border-radius: 16px;
    padding: 24px;
    color: white;
    transition: 0.2s;
}

    .year-card:hover {
        background-color: #1d1d1d;
        border-color: #6fcf97;
        transform: translateY(-2px);
        color: white;
    }

.year-card-number {
    font-size: 42px;
    font-weight: bold;
    color: #6fcf97;
    margin-bottom: 6px;
}

.year-card-text {
    color: #bfbfbf;
    font-size: 14px;
}

.year-card-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    color: #8f8f8f;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.month-card {
    background-color: #171717;
    border: 1px solid #2f2f2f;
    border-radius: 14px;
    padding: 18px;
    color: white;
    min-height: 154px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: 0.2s;
    text-transform: capitalize;
    overflow: hidden;
}

    .month-card:hover {
        background-color: #1d1d1d;
        border-color: #6fcf97;
        color: white;
        transform: translateY(-2px);
    }

.month-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.month-card-name {
    display: block;
    font-size: 19px;
    font-weight: bold;
    color: white;
}

.month-card-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #8f8f8f;
    text-transform: none;
}

.month-card-arrow {
    font-size: 24px;
    color: #8f8f8f;
    line-height: 1;
}

.month-card:hover .month-card-arrow {
    color: #6fcf97;
}

.month-card-report {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    opacity: 0;
    transform: translateY(8px);
    transition: 0.2s;
}

.month-card:hover .month-card-report,
.month-card:focus .month-card-report {
    opacity: 1;
    transform: translateY(0);
}

.month-card:hover .month-card-hint,
.month-card:focus .month-card-hint {
    color: #6fcf97;
}

.month-card-stat {
    background-color: #111;
    border: 1px solid #2b2b2b;
    border-radius: 10px;
    padding: 9px;
    text-transform: none;
}

.month-card-stat span {
    display: block;
    color: #9f9f9f;
    font-size: 11px;
    margin-bottom: 4px;
}

.month-card-stat strong {
    display: block;
    font-size: 12px;
    line-height: 1.25;
    word-break: break-word;
}

.month-stat-income,
.month-stat-positive {
    color: #6fcf97 !important;
}

.month-stat-expense,
.month-stat-negative {
    color: #ff7b7b !important;
}

.month-stat-saving {
    color: #74c0fc !important;
}

.months-report-box {
    max-width: 1240px;
    display: grid;
    grid-template-columns: minmax(0, 780px) 380px;
    gap: 28px;
    align-items: start;
}

.months-main-panel {
    min-width: 0;
}

.year-report-panel {
    margin-top: 92px;
    background-color: #141414;
    border: 1px solid #303030;
    border-radius: 16px;
    padding: 26px;
    box-sizing: border-box;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.year-report-title {
    color: #6fcf97;
    font-size: 26px;
    font-weight: bold;
    margin: 0 0 8px 0;
}

.year-report-text {
    color: #bfbfbf;
    margin: 0 0 22px 0;
}

.year-report-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.year-report-row {
    background-color: #1a1a1a;
    border: 1px solid #2f2f2f;
    border-radius: 12px;
    padding: 15px 16px;
    color: #dcdcdc;
}

.year-report-row:last-child {
    border-bottom: 1px solid #2f2f2f;
}

.year-report-row strong {
    display: block;
    color: white;
    margin-top: 7px;
    font-size: 18px;
    line-height: 1.25;
    word-break: break-word;
}

.year-report-income {
    color: #6fcf97 !important;
}

.year-report-expense {
    color: #ff7b7b !important;
}

.year-report-saving {
    color: #74c0fc !important;
}

@media (max-width: 900px) {
    .months-report-box {
        grid-template-columns: 1fr;
        max-width: 800px;
    }

    .year-report-panel {
        margin-top: 8px;
    }

    .month-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

    .month-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .month-card-report {
        opacity: 1;
        transform: none;
    }

    .page-title {
        font-size: 34px;
    }
}

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

    .year-input,
    .year-button {
        width: 100%;
    }
}
