/* Main container layout */
.main-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    background-color: #f8f9fa;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Balance content layout */
.balance-content {
    display: flex;
    flex-direction: row;
    padding: 2em;
    width: 80%;
    background-color: #f8f9fa;
    overflow: visible;
}

.balance-content h1 {
    color: #2c3e50;
    margin-bottom: 1.5em;
    font-size: 2em;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5em;
}

/* Grid layout for balance items */
.a0 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5em;
    width: 100%;
    margin: 0;
}

/* Category styling */
.category {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 0.5em;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}
/**
* Category header styling
* This is the header for the category
* It contains the category name and the total value
* It is used to display the category name and the total value
* It was added on 18.10 to accomodate sums on each financial statement category
*/
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0.4em;
    margin-top: 0.4em;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 0.5em;
}

.category-header:hover {
    background-color: #f8f9fa;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.category h2 {
    color: #2c3e50;
    font-size: 1.3em;
    margin: 0;
}

.category-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

/* Main category styling */
.main-category {
    margin: 1em 0;
    width: 100%;
}

/**
* Main category header styling
* This is the header for the main category
* It contains the main category name and the total value
* It is used to display the main category name and the total value
* It was added on 18.10 to accomodate sums on each financial statement category
*/
.main-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
    cursor: pointer;
    border-radius: 0.5em;
}

.main-category-header:hover {
    background-color: #f8f9fa;
}

.main-category h3 {
    color: #34495e;
    font-size: 1.1em;
    margin: 0;
}

.main-category-value {
    font-weight: 600;
    color: #34495e;
    font-size: 1em;
}


/* Sub-category styling */

.sub-category {
    background-color: #f4f6fb;
    border-radius: 6px;
    padding: 0.5em;
    margin: 0.5em 0;
    transition: background-color 0.2s ease;
    overflow: visible;
    cursor: pointer;
}

.sub-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sub-category:hover {
    background-color: #e9ecef;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1em;
}

.sub-category-header h4 {
    color: #34495e;
    font-size: 1em;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.expand-icon {
    color: #bdc3c7;
    font-size: 0.8em;
    transition: transform 0.2s ease;
    display: inline-block;
    transform: rotate(90deg);
}

.category-content {
    margin-top: 1em;
    padding-left: 1.5em;
}

.sub-category-content {
    margin-top: 1em;
    padding-top: 1em;
    padding-left: 1em;
    border-top: 1px solid #e9ecef;
    overflow: visible;
}

/* Detail styling */
.detail {
    margin: 0.7em 0;
}

.detail h4 {
    color: #7f8c8d;
    font-size: 1em;
    margin-bottom: 0.4em;
}



/* Individual item styling */
.item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4em 0.7em;
    background-color: #fff;
    border-radius: 4px;
    margin-bottom: 0.2em;
    border: 1px solid #e9ecef;
    min-width: 200px;
}

/* Form input styling */
input:read-only {
    background: #e3f2fd;
}

input:read-only:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

/* Accounts list styling */
.accounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    margin: 1em 0;
}

.account-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.account-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em;
    cursor: pointer;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.account-header:hover {
    background-color: #e9ecef;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

.account-number {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

.account-description {
    color: #6c757d;
    font-size: 0.9em;
}

.account-summary {
    display: flex;
    align-items: center;
    gap: 1em;
}

.account-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

.account-items {
    padding: 0;
    background-color: #fff;
}

.transaction-item {
    padding: 0.75em 1em;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.transaction-item:hover {
    background-color: #f8f9fa;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5em;
}

.transaction-date {
    font-weight: 500;
    color: #495057;
}

.transaction-value {
    font-weight: 600;
    color: #2c3e50;
}

.transaction-details {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
}

.detail-item {
    font-size: 0.85em;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 0.25em 0.5em;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    align-items: left;
    height: 100%;
    overflow: hidden;
    white-space: nowrap;
}

table {
    width: 100%;
}

.table-header tr {
    display: flex;
    justify-content: space-between;
    background-color: #fff;
    border-spacing: 0.3em;
    padding: 0.4em 0.7em;
}

.table-header th {
    flex: 1;
}

.table-details {
    display: flex;
    justify-content: space-between;
    padding: 0.4em 0.7em;
    background-color: #fff;
    border-spacing: 0.3em;
    gap: 1em
}

.table-details td {
    flex: 1;
}

/* Ensure the parent container doesn't clip content */
.balance-content {
    overflow: visible;
}

.category {
    overflow: visible;
}

.sub-category {
    overflow: visible;
}

.sub-category-content {
    overflow: visible;
}

.balance-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.loading-message, .error-message, .no-data-message {
    padding: 20px;
    text-align: center;
    font-size: 16px;
}

.error-message {
    color: #d32f2f;
    background-color: #ffebee;
    border-radius: 4px;
}

.balance-content h1 {
    margin-bottom: 30px;
    color: #333;
}

.flexbox-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
}

.balance-section,
.pnl-section {
    flex: 1;
    min-width: 0; /* Prevents flex items from overflowing */
    padding: 1.5em;
    width: 50%;
}

.section-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

/* Responsive design - stack vertically on smaller screens */
@media (max-width: 1200px) {
    .flexbox-container {
        flex-direction: column;
    }
}