﻿.button-control-reports {
    width: 100%;
    min-height: 50px;
    background-color: #F3F4F5 !important;
    border: 0.5px solid #C5C5C5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.reports-left-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.financial-statement-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.financial-statement-container {
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    border: 0.5px solid #e0e0e0;
    background: white;
}

.financial-grid {
    display: flex;
    flex-direction: row;
    flex: 1;
    width: 100%;
    min-width: fit-content;
    height: 100%;
}

.grid-column {
    display: flex;
    height: 100%;
    flex: 1;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
    min-width: 120px;
    flex-shrink: 0;
}

    .grid-column.description-column {
        flex: 0 0 200px;
        min-width: 200px;
        position: sticky;
        left: 0;
        background: white;
        z-index: 10;
        flex-shrink: 0;
    }

    .grid-column.total-column {
        flex: 0 0 130px;
        min-width: 130px;
        background: #fafafa;
        flex-shrink: 0;
    }

.grid-header-cell {
    padding: 12px 8px;
    font-weight: 600;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    text-align: center;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    flex-shrink: 0;
}

    .grid-header-cell.description-header {
        text-align: left;
        background: #f0f2f5;
    }

.grid-row-cell {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    text-align: right;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .grid-row-cell.description-cell {
        text-align: left;
        justify-content: flex-start;
        font-weight: 500;
        padding-left: 12px;
    }

        .grid-row-cell.description-cell span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            flex: 1;
            min-width: 0;
        }

    .grid-row-cell.sub-item {
        padding-left: 25px;
        color: #666;
        font-weight: normal;
    }

    .grid-row-cell.calculated-row {
        background-color: #f5f5f5;
        font-weight: 600;
        border-top: 1px solid #d0d0d0;
        border-bottom: 1px solid #d0d0d0;
    }

    .grid-row-cell.profit-loss-row {
        background-color: #e8e8e8;
        font-weight: 700;
        border-top: 2px solid #888;
        border-bottom: 2px solid #888;
    }

/*.positive-value {
    color: #28a745;
}

.negative-value {
    color: #dc3545;
}*/

.percentage-cell {
    font-style: italic;
}

/*income statement, balance sheet and trail balance*/
.report-container {
    width: 100%;
    background-color: white;
    padding: 30px;
    overflow: auto;
}

.report-header {
    text-align: center;
    margin-bottom: 30px;
}

.report-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.report-subtitle {
    font-size: 18px;
    color: #666;
}


.report-table {
    width: 100%;
    max-width: 1400px;
    margin: 20px auto 0 auto;
    font-size: 14px;
}

.report-header-row {
    display: flex;
    border-bottom: 1px solid #eee;
}

.date-header {
    text-align: right;
    padding: 10px 15px;
    font-weight: 500;
    color: #666;
    width: 150px;
    flex: 0 0 150px;
}

    .date-header.label-column {
        text-align: left;
        padding-left: 0;
        padding-right: 0;
        width: 1100px;
        flex: 0 0 1100px;
    }

.report-row {
    display: flex;
    border-bottom: 1px solid #f5f5f5;
    align-items: center;
}

    .report-row.main-category {
        font-weight: bold;
    }

    .report-row.total-row {
        border-top: 2px solid #333;
        border-bottom: 2px solid #333;
        font-weight: bold;
    }

    .report-row.subtotal-row {
        border-top: 1px solid #ccc;
        font-weight: bold;
        background-color: #f9f9f9;
    }

.label-cell {
    padding: 6px 0;
    text-align: left;
    color: #333;
    width: 1100px;
    flex: 0 0 1100px;
    font-family: var(--bs-body-font-family);
}

    .label-cell.columns {
        font-weight: normal;
        width: 800px;
        flex: 0 0 800px;
    }

    .label-cell.detail-item {
        padding-left: 20px;
        color: #666;
        font-size: 16px;
        font-weight: normal;
    }

        .label-cell.detail-item.columns {
            font-weight: normal;
            width: 800px;
            flex: 0 0 800px;
        }

    .label-cell.main-item {
        font-weight: bold;
    }

        .label-cell.main-item.columns {
            font-weight: bold;
            width: 800px;
            flex: 0 0 800px;
        }

    .label-cell.total-item {
        font-weight: bold;
    }

    .label-cell.final-total-item.columns {
        font-weight: normal;
        width: 800px;
        flex: 0 0 800px;
    }


.level-gl .label-cell.detail-item {
    padding-left: 20px;
}

.level-t1 .label-cell.detail-item {
    padding-left: 40px;
}

.level-t2 .label-cell.detail-item {
    padding-left: 60px;
}

.level-t3 .label-cell.detail-item {
    padding-left: 80px;
}

.final-total-row {
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    font-weight: bold;
    margin-top: 10px;
    background-color: #f0f0f0;
}

    .final-total-row .label-cell {
        font-weight: bold;
        color: #000;
    }

        .final-total-row .label-cell.columns {
            width: 800px;
            flex: 0 0 800px;
        }

    .final-total-row .amount-cell {
        font-weight: bold;
        color: #000;
    }

.report-spacing {
    height: 10px;
}

.amount-cell {
    padding: 6px 15px;
    text-align: right;
    color: #333;
    font-family: var(--bs-body-font-family);
    white-space: nowrap;
    width: 150px;
    flex: 0 0 150px;
    font-size: 18px;
}

    .amount-cell.total {
        font-weight: bold;
    }

    .amount-cell.detail {
        width: 0px;
        flex: 0 0 0px;
    }

.compare-mode .report-table {
    max-width: 950px;
}

.report-table.compare-mode.columns {
    max-width: 1400px;
}

.report-table.columns {
    max-width: 1400px;
}

.compare-mode .label-cell {
    width: 1100px;
    flex: 0 0 1100px;
}

.compare-mode.columns .label-cell {
    width: 760px;
    flex: 0 0 760px;
}

.compare-mode .amount-cell {
    width: 150px;
    flex: 0 0 150px;
}

.debit-credit .amount-cell {
}

.compare-mode .date-header.label-column {
    width: 1100px;
    flex: 0 0 1100px;
}

.compare-mode.columns .date-header.label-column {
    width: 750px;
    flex: 0 0 750px;
}

.compare-column {
    display: none;
    width: 150px;
    flex: 0 0 150px;
}

.compare-mode .compare-column {
    display: flex;
    width: 150px;
    flex: 0 0 150px;
}

.debitHeader {
    width: 50px;
    margin-left: 1060px;
    font-family: var(--bs-body-font-family);
}

.compare-mode .debitHeader {
    margin-left: 850px
}

.creditHeader {
    width: 50px;
    margin-left: 270px;
    font-family: var(--bs-body-font-family);
}

.compare-mode .creditHeader {
    margin-left: 120px
}

.priorYearDebitHeader {
    width: 50px;
    margin-left: 130px;
}

.priorYearCreditHeader {
    width: 50px;
    margin-left: 122px;
}

.compare-mode .date-header {
    width: 150px;
    flex: 0 0 150px;
}
/*
.amount-cell {
    margin-right: 150px;
    margin-left: 0px;
}*/

.amount-cell:not(.compare-column) {
    margin-left: 150px;
}
/*.amount-cell.compare-column {
    margin-right: 150px;
}*/
.compare-mode .amount-cell:not(.compare-column) {
    margin-left: 0;
}

.date-header:not(.compare-column) {
    margin-left: 70px;
}

.date-header-columns:not(.compare-column) {
    margin-left: 191px;
}

.date-header-columns-previous:not(.compare-column) {
    margin-left: 270px;
}

.compare-mode .current-year {
    margin-left: 0;
}

.compare-mode .amount-cell {
    margin-left: 0;
}

.compare-mode .date-header {
    margin-left: 0;
}

.date-header-columns.no-prior {
    margin-left: 50px;
}

.compare-column {
    display: none;
}

.detail-row {
    display: flex;
}

.hide-details .label-cell.main-item {
    font-weight: normal;
}

.label-cell.main-item.hide-details {
    font-weight: normal;
}

.section-spacing {
    height: 10px;
}

.hide {
    display: none !important;
}


.content-layout {
    display: flex;
    flex: 1;
    height: calc(100vh - 50px);
    transition: all 0.3s ease;
    min-height: 0;
}

    .content-layout.with-format-panel {
        /* Adjust when format panel is visible */
    }

.format-panel {
    width: 350px;
    background: white;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    transition: margin-left 0.3s ease;
    position: relative;
    z-index: 10;
    /*box-shadow: 2px 0 8px rgba(0,0,0,0.1);*/
}

    .format-panel.hidden {
        margin-left: -350px;
    }

    .format-panel.visible {
        margin-left: 0;
    }

.format-panel-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

    .format-panel-header h3 {
        font-size: 18px;
        font-weight: 600;
        color: #374151;
        margin: 0 0 4px 0;
    }

    .format-panel-header p {
        font-size: 14px;
        color: #6b7280;
        margin: 0;
    }

.format-panel-content {
    padding: 20px;
}


.format-section {
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.format-section-header {
    background: #f9fafb;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

    .format-section-header:hover {
        background: #f3f4f6;
    }

.format-section-content {
    padding: 16px;
}

.collapse-icon {
    transition: transform 0.2s ease;
    font-size: 12px;
}

    .collapse-icon.collapsed {
        transform: rotate(-90deg);
    }

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

    .form-group label {
        display: block;
        font-weight: 500;
        margin-bottom: 6px;
        color: #374151;
        font-size: 14px;
    }

    .form-group select,
    .form-group input[type="text"],
    .form-group input[type="range"] {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #d1d5db;
        border-radius: 4px;
        font-size: 14px;
        background: white;
    }

        .form-group select:focus,
        .form-group input:focus {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

    .checkbox-item input[type="checkbox"] {
        width: 16px;
        height: 16px;
        margin: 0;
    }

    .checkbox-item label {
        margin: 0;
        font-weight: normal;
        cursor: pointer;
    }

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .color-picker-wrapper input[type="color"] {
        width: 40px;
        height: 32px;
        border: 1px solid #d1d5db;
        border-radius: 4px;
        cursor: pointer;
        padding: 0;
    }

    .color-picker-wrapper span {
        font-size: 12px;
        color: #6b7280;
    }

.option-name {
    font-weight: 500;
    color: #374151;
}

.option-description {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-button {
    width: 100% !important;
}


.report-content-area {
    flex: 1;
    overflow: auto;
    transition: all 0.3s ease;
    background: #f8f9fa;
    min-height: 0px;
}

.content-layout.with-format-panel .report-container {
    max-width: none;
    margin: 10px auto;
    width: calc(100% - 40px);
}

.content-layout:not(.with-format-panel) .report-container {
    max-width: 1000px;
    margin: 10px auto;
}


@media print {
    .format-panel {
        display: none !important;
    }

    .content-layout {
        display: block !important;
    }

    .report-content-area {
        width: 100% !important;
        margin: 0 !important;
    }

    .report-container {
        max-width: none !important;
        margin: 0 !important;
        box-shadow: none !important;
        width: 100% !important;
    }
}


@media (max-width: 1200px) {
    .format-panel {
        width: 300px;
    }

        .format-panel.hidden {
            margin-left: -300px;
        }
}

@media (max-width: 768px) {
    .format-panel {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        z-index: 1000;
        box-shadow: 0 0 20px rgba(0,0,0,0.3);
    }

        .format-panel.visible {
            margin-left: 0;
        }

    .content-layout.with-format-panel .report-content-area {
        margin-left: 0;
    }
}


.report-container,
.report-title,
.report-table,
.label-cell,
.amount-cell {
    transition: all 0.2s ease;
}


.format-panel::-webkit-scrollbar {
    width: 6px;
}

.format-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.format-panel::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

    .format-panel::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

.filter-overlay {
    position: fixed;
    top: 315px;
    left: 385px;
    width: 500px;
    height: 500px;
    display: flex;
    z-index: 1000;
}

.filter-config-panel {
    position: relative;
    flex: 1;
    border: 0.5px solid #c5c5c5;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    flex-direction: column;
    max-width: 500px;
    min-width: 300px;
    background: white;
}

.filter-config-panel-body {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    padding-right: 0.5rem;
}

.filter-config-panel-header {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
}

    .filter-close-btn:hover {
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 4px;
    }

.filter-toggle-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
}

.filter-config-footer {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    /*    border-top: 1px solid #ddd;*/
    flex-shrink: 0;
}

    .filter-config-footer > * {
        flex: 1;
    }

/* Filter Config Section (Accordion) */
.filter-config-section {
    /*border: 1px solid #e5e7eb;*/
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
    min-width: 457px;
}

.filter-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f9fafb;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .filter-config-header:hover {
        background-color: #f3f4f6;
    }

.filter-config-title {
    font-weight: 500;
    color: #111827;
}

.filter-config-toggle {
    color: #6b7280;
    font-size: 12px;
}

.filter-config-content {
    padding: 16px;
    background-color: white;
    /* border-top: 1px solid #e5e7eb;*/
}

.filter-config-row {
    margin-bottom: 16px;
}

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

.filter-config-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.filter-config-select,
.filter-config-input {
    width: 100%;
    height: auto;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    background-color: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .filter-config-select:focus,
    .filter-config-input:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

.filter-selected-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fafafa;
}

.filter-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background-color: #3B5EDA;
    color: white;
    border-radius: 4px;
    font-size: 0.875rem;
}

.filter-selected-chip-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
}

    .filter-selected-chip-remove:hover {
        color: #ffcccc;
    }

.filter-value-chip.selected {
    background-color: #3B5EDA;
    color: white;
    border-color: #0056b3;
}

/* Quick Select Values */
.filter-config-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fafafa;
}

.filter-value-chip {
    padding: 6px 12px;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

    .filter-value-chip:hover {
        background-color: #e5e7eb;
        border-color: #d1d5db;
    }

/* Modal Footer */
.filter-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}

.filter-modal-button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.filter-modal-button-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

    .filter-modal-button-secondary:hover {
        background-color: #f9fafb;
    }

.filter-modal-button-primary {
    background-color: #2563eb;
    color: white;
}

    .filter-modal-button-primary:hover {
        background-color: #1d4ed8;
    }

.filter-value-chip.unavailable {
    opacity: 0.5;
    color: #999;
}

.filter-value-count {
    margin-left: 4px;
    font-size: 0.85em;
    color: #666;
}

.not-editable {
    background-color: #e9ecef !important;
    opacity: 0.75;
}

    .not-editable:hover {
        background-color: #e9ecef !important;
        opacity: 0.75;
    }



.compare-mode .label-cell.detail-item {
    width: 1070px;
    flex: 0 0 1070px;
}


.compare-mode .label-cell.main-item {
    font-weight: bold;
}
