.msb-fi-wrapper {
    max-width: 1366px;
    margin: 0 auto;
    /* padding: 24px 24px; */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.msb-fi-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.msb-fi-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

.msb-fi-year-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.msb-fi-year-label {
    margin: 0;
    font-weight: 500;
    color: #374151;
}

.msb-fi-year-select {
    min-width: 140px;
    padding: 8px 32px 8px 12px;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #1f2937;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

@keyframes msb-fi-shimmer {
    0% { background-position: -468px 0; }
    100% { background-position: 468px 0; }
}

.msb-fi-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.msb-fi-content.msb-fi-loading {
    min-height: 400px;
}

.msb-fi-content.msb-fi-loading .msb-fi-tables-inner {
    display: none;
}

.msb-fi-skeleton-container {
    display: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    margin-bottom: 32px;
}

.msb-fi-content.msb-fi-loading .msb-fi-skeleton-container {
    display: block;
}

.msb-fi-skeleton-header {
    height: 88px;
    background: #233140;
    width: 100%;
}

.msb-fi-skeleton-row {
    display: flex;
    gap: 20px;
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.msb-fi-skeleton-row:last-child {
    border-bottom: none;
}

.msb-fi-skeleton-bar {
    height: 16px;
    background: #f6f7f8;
    background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
    background-repeat: no-repeat;
    background-size: 800px 104px;
    animation: msb-fi-shimmer 1.5s linear infinite forwards;
    border-radius: 4px;
}

.msb-fi-table-section {
    display: block;
    width: 100%;
    margin-bottom: 16px;
    text-transform: none;
}

.msb-fi-table-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    overflow-x: auto;
    overflow-y: hidden;
    display: inline-block;
    width: 100%;
    vertical-align: top;
}

.msb-fi-table-wrap .msb-fi-table {
    border: none;
}

.msb-fi-table-wrap .msb-fi-table th,
.msb-fi-table-wrap .msb-fi-table td {
    border-top: none;
    border-left: none;
    border-right: 1px solid #e5e7eb;
}

.msb-fi-table-wrap .msb-fi-table th:last-child,
.msb-fi-table-wrap .msb-fi-table td:last-child {
    border-right: none;
}

.msb-fi-download-wrap {
    display: block;
    width: 100%;
    margin-top: 16px;
}

.msb-fi-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    min-width: 600px;
    text-transform: none;
}

.msb-fi-table th,
.msb-fi-table td {
    padding: 12px 10px;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
    text-transform: none;
}

.msb-fi-table thead th {
    background: #233140;
    color: #fff;
    font-weight: 600;
    text-transform: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.msb-fi-table thead th:last-child {
    border-right: none;
}

.msb-fi-table thead th.msb-fi-col-label {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 2;
    background: #233140;
    min-width: 200px;
    box-shadow: 2px 0 0 0 rgba(255,255,255,0.1);
    height: 88px;
}

.msb-fi-table thead th.msb-fi-col-num {
    text-align: center;
}

.msb-fi-table tbody td.msb-fi-col-label {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    font-weight: 400;
    color: #374151;
    min-width: 200px;
    box-shadow: 2px 0 0 0 #e5e7eb;
}

.msb-fi-table tbody td.msb-fi-col-num {
    text-align: right;
    color: #374151;
    background: #fff;
}

.msb-fi-empty {
    padding: 48px 20px;
    text-align: center;
    color: #091E42;
}

.msb-fi-empty-icon {
    display: block;
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    object-fit: contain;
}

.msb-fi-empty-title {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 600;
    color: #091E42;
}

.msb-fi-empty p {
    margin: 0 0 4px;
}

.msb-fi-empty-hint {
    font-size: 0.9em;
    color: #091E42;
}

.msb-fi-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 20px;
    background: #fff;
    color: #f37021;
    text-decoration: none;
    border: 1px solid #f37021;
    border-radius: 6px;
    font-weight: 500;
    text-transform: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.msb-fi-download-btn:hover {
    border-color: #e65a0f;
    color: #e65a0f;
    background: #fff;
}

.msb-fi-download-icon {
    width: 18px;
    height: 18px;
    color: #f37021;
}

.msb-fi-download-icon svg {
    width: 100%;
    height: 100%;
}

.msb-fi-download-disabled {
    background: #f9fafb;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    pointer-events: none;
}

.msb-fi-download-disabled .msb-fi-download-icon {
    color: #9ca3af;
}

/* Mobile: giới hạn cột tiêu đề để hiển thị được các cột dữ liệu khác */
@media (max-width: 768px) {
    .msb-fi-table thead th.msb-fi-col-label,
    .msb-fi-table tbody td.msb-fi-col-label {
        max-width: 264px;
        white-space: normal;
        word-wrap: break-word;
    }
}
