/* =========================================================== */
/* ========== СТРАНИЦА "СУДЕЙСКИЕ ОТЧЕТЫ" — СТИЛИ ========== */
/* =========================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #F5F5F5;
}
.main-content {
    margin-top: 80px;
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
}
.add-report-btn {
    width: 264px;
    height: 51px;
    background-color: #00B509;
    color: #FFFFFF;
    border: none;
    border-radius: 2px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    margin-bottom: 20px;
}
.add-report-btn:hover {
    background-color: #009A07;
}
.search-wrapper {
    position: relative;
    width: 264px;
    height: 51px;
    margin-bottom: 20px;
}
.search-input {
    width: 100%;
    height: 100%;
    background-color: transparent;
    border: 1px solid #000744;
    border-radius: 2px;
    padding: 0 15px 0 35px;
    font-size: 14px;
    color: #000744;
    outline: none;
    text-align: center;
    background-image: url('img_musorka/zalupina.svg');
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 12px 12px;
}
.search-input::placeholder {
    color: #000744;
    font-size: 14px;
}
.search-icon {
    display: none;
}
.reports-actions {
    position: absolute;
    left: calc(50% + 333px + 20px);
    top: 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 2;
}
.reports-actions .add-report-btn {
    margin-bottom: 0;
}
.reports-actions .search-wrapper {
    margin-bottom: 0;
}
.reports-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    width: 666px;
}
.reports-empty__text {
    font-size: 16px;
    color: #000744;
    line-height: 1.5;
    margin: 0;
}
.reports-form {
    position: absolute;
    top: 60px;
    left: calc(50% - 333px);
    width: 666px;
    min-height: 400px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.back-to-list-btn {
    position: absolute;
    left: calc(50% - 333px - 103px);
    top: 60px;
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.back-to-list-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.form-input--full {
    width: calc(100% - 40px);
    height: 59px;
    background-color: #000744;
    color: #FFFFFF;
    border: none;
    border-radius: 2px;
    font-size: 16px;
    text-align: left;
    padding-left: 15px;
    padding-right: 15px;
    cursor: pointer;
    outline: none;
    margin: 0 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.form-input--full::placeholder {
    color: #FFFFFF;
    font-size: 16px;
    opacity: 1;
}
.form-input--full:focus {
    background-color: #FFFFFF;
    color: #000744;
    border: 1px solid #00B509;
}
.form-row {
    display: flex;
    gap: 20px;
    width: calc(100% - 40px);
    margin: 0 20px;
}
.form-date {
    position: relative;
    flex: 1;
    height: 59px;
}
.form-date__icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    z-index: 2;
    cursor: pointer;
    pointer-events: auto;
    border-radius: 4px;
}
.form-date__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.form-input--date {
    width: 100%;
    height: 100%;
    background-color: #000744;
    color: #FFFFFF;
    border: none;
    border-radius: 2px;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    outline: none;
    padding-left: 44px;
    padding-right: 10px;
}
.form-input--date::placeholder {
    color: #FFFFFF;
    font-size: 16px;
    opacity: 1;
}
.form-submit-btn {
    width: calc(100% - 40px);
    height: 59px;
    background-color: #000744;
    color: #FFFFFF;
    border: none;
    border-radius: 2px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    margin: 0 20px;
}
.form-submit-btn:hover {
    background-color: #009A07;
}
.scroll-inner::before,
.scroll-inner::after {
    content: '';
    position: absolute;
    top: 60px;
    bottom: 60px;
    width: 1px;
    background-color: #000744;
    z-index: 1;
    pointer-events: none;
}
.scroll-inner::before {
    left: calc(50% - 333px);
}
.scroll-inner::after {
    left: calc(50% + 333px);
}
.main-content.form-active .scroll-inner::before,
.main-content.form-active .scroll-inner::after {
    display: none;
}
/* ========== НОВЫЕ ЛИНИИ (222px) ПРИ АКТИВНОЙ ФОРМЕ ========== */
.main-content.form-active .form-wrapper {
    position: relative;
    width: 666px;
    margin: 0 auto;
}

.main-content.form-active .form-wrapper::before,
.main-content.form-active .form-wrapper::after {
    content: '';
    position: absolute;
    width: 1px;
    background-color: #000744;
    z-index: 10;
    height: 222px;
    top: 50%;
    transform: translateY(-50%);
}

.main-content.form-active .form-wrapper::before {
    left: 0;
}

.main-content.form-active .form-wrapper::after {
    right: 0;
}
.main-content.form-active .reports-form {
    top: 50%;
    transform: translateY(-50%);
    height: auto;
    justify-content: center;
}
.main-content.form-active .back-to-list-btn {
    top: 50%;
    transform: translateY(-50%);
    margin-top: -90px;
}
.reports-list {
    position: absolute;
    top: 60px;
    left: calc(50% - 333px);
    width: 666px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 2;
    padding: 0 20px;
    transform: none;
}
.report-card {
    width: 100%;
    height: 51px;
    background-color: #000744;
    border-radius: 2px;
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    margin: 0;
    box-sizing: border-box;
}
.report-card:hover {
    background-color: #1a1a6e;
}
.report-card__title {
    color: #FFFFFF;
    font-size: 14px;
    padding-left: 15px;
    padding-right: 5px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 20px - 40px - 40px - 40px - 40px);
}
.report-card__divider {
    position: absolute;
    right: 187px;
    width: 1px;
    height: 31px;
    background-color: #FFFFFF;
}
.report-card__icons {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    gap: 40px;
    padding-right: 40px;
}
.report-card__icon {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.report-card__icon--export {
    width: 17px;
    height: 17px;
}
.report-card__icon--pdf {
    width: 17px;
    height: 11px;
}
.report-card__icon--delete {
    width: 12px;
    height: 17px;
}
.report-card__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.report-card__icon:hover {
    opacity: 0.7;
}
.confirm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}
.confirm-overlay.visible {
    display: flex;
}
.confirm-box {
    width: 161px;
    height: 103px;
    padding: 10px;
    background-color: #FFFFFF;
    border: 1px solid #000744;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.confirm-text {
    font-size: 10px;
    color: #000744;
    margin: 0 0 9px 0;
    padding: 0;
    text-align: center;
    line-height: 1.3;
}
.confirm-actions {
    display: flex;
    gap: 7px;
    justify-content: center;
}
.confirm-delete-btn {
    width: 67px;
    height: 40px;
    padding: 0;
    background-color: #00B509;
    color: #FFFFFF;
    border: none;
    border-radius: 2px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.confirm-delete-btn:hover {
    background-color: #009A07;
}
.confirm-cancel-btn {
    width: 67px;
    height: 40px;
    padding: 0;
    background-color: #000744;
    color: #FFFFFF;
    border: none;
    border-radius: 2px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.confirm-cancel-btn:hover {
    background-color: #1a1a6e;
}
.scroll-container {
    width: 100%;
    height: calc(100vh - 160px);
    overflow-x: auto;
    position: relative;
    transform-origin: center center;
}
.scroll-inner {
    min-width: 1500px;
    position: relative;
    display: inline-block;
    width: 100%;
    height: 100%;
}
.scroll-container::-webkit-scrollbar:horizontal {
    height: 8px;
}
.scroll-container::-webkit-scrollbar-track:horizontal {
    background: #ffffff;
}
.scroll-container::-webkit-scrollbar-thumb:horizontal {
    background: #000744;
    border-radius: 4px;
}
.main-content.form-active::before {
    left: calc(50% - 333px);
}
.main-content.form-active::after {
    left: calc(50% + 333px);
}

/* ========== АДАПТИВ (меньше 1285px) ========== */
@media (max-width: 1285px) {
    .scroll-inner {
        min-width: auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
    }
    
    .scroll-inner::before,
    .scroll-inner::after {
        display: block;
        top: 60px;
        bottom: 60px;
    }
    
    .scroll-inner::before {
        left: calc(50% - 333px);
    }
    
    .scroll-inner::after {
        left: calc(50% + 333px);
    }
    
    .scroll-container {
        overflow-x: hidden;
    }
    
    .reports-actions {
        position: static !important;
        left: auto !important;
        top: auto !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
        gap: 20px;
        width: 100% !important;
        max-width: 666px;
        margin: 60px auto 20px auto;
        padding: 0 20px;
        z-index: 2;
        box-sizing: border-box;
    }
    
    .main-content.form-active .reports-actions {
        display: none !important;
    }

    .reports-actions .add-report-btn {
        margin-bottom: 0;
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .reports-actions .search-wrapper {
        margin-bottom: 0;
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .reports-list {
        position: static !important;
        left: auto !important;
        top: auto !important;
        width: 100%;
        max-width: 666px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 0 20px;
        transform: none !important;
        box-sizing: border-box;
    }
    
    .report-card {
        margin: 0;
        width: 100%;
    }
    
    .reports-empty {
        position: static !important;
        transform: none !important;
        width: 626px;
        margin: 0 auto;
        left: auto !important;
        top: auto !important;
    }
    
    .reports-form {
        position: static !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100%;
        max-width: 626px;
        margin: 60px auto;
        padding: 0 20px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .form-input--full {
        width: 100%;
        margin: 0;
        font-size: 12px;
    }
    
    .form-input--full::placeholder {
        font-size: 12px;
    }

    .form-row {
        width: 100%;
        margin: 0;
        gap: 15px;
    }

    .form-date {
        height: 50px;
    }

    .form-input--date {
        font-size: 12px;
        padding-left: 40px;
    }
    
    .form-input--date::placeholder {
        font-size: 12px;
    }

    .form-submit-btn {
        width: 100%;
        margin: 0;
        height: 50px;
        font-size: 12px;
    }
    
    .back-to-list-btn {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 35px;
        height: 35px;
        margin: 0 0 5px 0;
        background-color: transparent;
        border-radius: 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        align-self: flex-start;
        border: none;
    }

    .back-to-list-btn img {
        filter: none;
        width: 35px;
        height: 35px;
    }
}

/* ========== УЗЕНЬКИЙ ЭКРАН (меньше 688px) ========== */
@media (max-width: 688px) {
    .scroll-inner {
        min-width: auto;
        width: 100%;
        display: block;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .scroll-inner::before,
    .scroll-inner::after {
        display: block;
        top: 0;
        bottom: 40px;
    }
    
    .scroll-inner::before {
        left: 10px;
    }
    
    .scroll-inner::after {
        left: auto;
        right: 10px;
    }
    
    .scroll-container {
        overflow-x: hidden;
        height: calc(100vh - 120px);
        margin-top: 20px !important;
    }
    
.reports-actions {
    max-width: calc(100% - 40px);
    padding: 0;
    margin: 0 20px 20px 20px !important;
    width: auto;
}
    
    .reports-actions .add-report-btn {
        height: 35px;
        font-size: 10px;
    }
    
    .reports-actions .search-wrapper {
        height: 35px;
    }
    
    .reports-actions .search-input {
        font-size: 10px;
        background-size: 10px 10px;
        background-position: 8px center;
        padding: 0 10px 0 25px;
    }
    
    .reports-actions .search-input::placeholder {
        font-size: 10px;
    }
    
    .reports-list {
        max-width: calc(100% - 40px);
        padding: 0;
        margin: 0 20px;
        width: calc(100% - 40px);
        gap: 10px;
        box-sizing: border-box;
    }
    
    .report-card {
        height: 35px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .report-card__title {
        font-size: 10px;
        padding-left: 10px;
    }
    
    .report-card__divider {
        right: 130px;
    }
    
    .report-card__icons {
        gap: 15px;
        padding-right: 15px;
    }
    
    .report-card__icon--export,
    .report-card__icon--pdf {
        width: 12px !important;
        height: 12px !important;
    }
    
    .report-card__icon--export img,
    .report-card__icon--pdf img {
        width: 12px !important;
        height: 12px !important;
    }
    
    .report-card__icon--delete {
        width: 9px;
        height: 12px;
    }
    
    .reports-empty {
        max-width: calc(100% - 40px);
        width: auto;
        margin: 0 20px;
    }
    
    .reports-empty__text {
        font-size: 12px;
    }
    
    .reports-form {
        max-width: calc(100% - 40px);
        margin: 40px 20px;
        padding: 0;
        gap: 8px;
    }
    
    .form-input--full {
        font-size: 10px;
        height: 40px;
    }
    
    .form-input--full::placeholder {
        font-size: 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-date {
        height: 40px;
        flex: none;
    }
    
    .form-input--date {
        font-size: 10px;
        padding-left: 35px;
        height: 100%;
        box-sizing: border-box;
    }
    
    .form-input--date::placeholder {
        font-size: 10px;
    }
    
    .form-date__icon {
        width: 18px;
        height: 18px;
    }
    
    .form-date__icon img {
        width: 18px;
        height: 18px;
    }
    
    .form-submit-btn {
        height: 40px;
        font-size: 10px;
    }
    
    .back-to-list-btn {
        width: 30px;
        height: 30px;
        margin: 0 0 3px 0;
    }
    
    .back-to-list-btn img {
        width: 30px;
        height: 30px;
    }
}