/* --- SCOPED CSS FOR BUDGET SUBMISSIONS --- */
/* --- Alert Banner Section --- */
.bs-rejection-alert {
    background-color: #fef2f2; /* Light red background */
    color: #b91c1c; /* Dark red text */
    padding: 16px 24px;
    border-radius: 8px; 
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    margin-top: 24px; 
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.bs-rejection-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bs-rejection-text {
    line-height: 1.5;
}

    .bs-rejection-text strong {
        font-weight: 600;
        margin-right: 4px;
    }
/* --- Header Section --- */
.bs-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    font-family: 'Inter', sans-serif;
}

.bs-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .bs-header-text h1 {
        margin: 0;
        font-size: 24px;
        font-weight: 700;
        color: #334155;
    }

    .bs-header-text p {
        margin: 0;
        font-size: 14px;
        color: #475569;
    }

/* --- Statistics Grid (5 Columns) --- */
.bs-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    font-family: 'Inter', sans-serif;
    margin-bottom: 24px;
}

/* Adapting your LC card metrics for the new top-border Figma design */
.bs-stat-card {
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-top-width: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    background-color: #ffffff;
    overflow: hidden;
}

.bs-card-body {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex: 1;
}

.bs-stat-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .bs-stat-text h2 {
        font-size: 24px;
        font-weight: 700;
        color: #1e293b;
        margin: 0;
        line-height: 1.1;
    }

    .bs-stat-text p {
        font-size: 13px;
        color: #64748b;
        font-weight: 500;
        margin: 0;
    }

.bs-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid;
    background-color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

    .bs-stat-icon svg {
        width: 20px;
        height: 20px;
    }

.bs-card-footer {
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .bs-card-footer:hover {
        color: #64748b;
    }

/* Themes for the 5 Cards (Top Borders + Gradients + Footers) */
.bs-theme-blue {
    border-top-color: #3b82f6;
}

    .bs-theme-blue .bs-card-body {
        background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    }

    .bs-theme-blue .bs-stat-icon {
        border-color: #e0e7ff;
        color: #3b82f6;
    }

    .bs-theme-blue .bs-card-footer {
        background-color: #f4f8ff;
        border-top: 1px solid #eef2ff;
    }

.bs-theme-green {
    border-top-color: #10b981;
}

    .bs-theme-green .bs-card-body {
        background: linear-gradient(180deg, #ffffff 0%, #f4fdf8 100%);
    }

    .bs-theme-green .bs-stat-icon {
        border-color: #d1fae5;
        color: #10b981;
    }

    .bs-theme-green .bs-card-footer {
        background-color: #ebfbf2;
        border-top: 1px solid #ecfdf5;
    }

.bs-theme-orange {
    border-top-color: #f59e0b;
}

    .bs-theme-orange .bs-card-body {
        background: linear-gradient(180deg, #ffffff 0%, #fffbf2 100%);
    }

    .bs-theme-orange .bs-stat-icon {
        border-color: #fef3c7;
        color: #f59e0b;
    }

    .bs-theme-orange .bs-card-footer {
        background-color: #fff9ea;
        border-top: 1px solid #fffbeb;
    }

.bs-theme-red {
    border-top-color: #ef4444;
}

    .bs-theme-red .bs-card-body {
        background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%);
    }

    .bs-theme-red .bs-stat-icon {
        border-color: #fee2e2;
        color: #ef4444;
    }

    .bs-theme-red .bs-card-footer {
        background-color: #fff0f0;
        border-top: 1px solid #fef2f2;
    }

.bs-theme-gray {
    border-top-color: #94a3b8;
}

    .bs-theme-gray .bs-card-body {
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    }

    .bs-theme-gray .bs-stat-icon {
        border-color: #e2e8f0;
        color: #64748b;
    }

    .bs-theme-gray .bs-card-footer {
        background-color: #f1f5f9;
        border-top: 1px solid #f8fafc;
    }


/* --- Filters Section --- */
.bs-filter-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 24px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.bs-filter-header {
    background-color: #f8fafc;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #e2e8f0;
}

.bs-filter-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.bs-filter-body {
    padding: 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bs-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns for this design */
    gap: 16px 20px;
}

.bs-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bs-form-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.bs-form-control, .bs-form-select {
    appearance: none;
    background-color: #fafafa;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #94a3b8;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

.bs-form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

.bs-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.bs-form-control:focus, .bs-form-select:focus {
    border-color: #3b82f6;
}

.bs-input-icon {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.bs-filter-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.bs-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.bs-btn-outline {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #64748b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

    .bs-btn-outline:hover {
        background-color: #f8fafc;
        border-color: #94a3b8;
        color: #334155;
    }

.bs-btn-solid {
    background-color: #3b82f6;
    border: 1px solid #3b82f6;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

    .bs-btn-solid:hover {
        background-color: #2563eb;
    }


/* --- Table Section --- */
.bs-table-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: 'Inter', sans-serif;
    max-width: 100%;
    overflow: hidden;
}

.bs-table-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

    .bs-table-top h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        color: #334155;
    }

.bs-search-input {
    appearance: none;
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 10px 16px 10px 38px;
    font-size: 13px;
    color: #334155;
    width: 280px;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
    transition: border-color 0.2s;
    max-width: 100%;
}

    .bs-search-input:focus {
        border-color: #3b82f6;
    }

.bs-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.bs-main-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

    .bs-main-table th {
        background-color: #f8fafc;
        color: #475569;
        font-weight: 600;
        font-size: 13px;
        padding: 14px 16px;
        text-align: center;
        white-space: nowrap;
        border-bottom: 1px solid #e2e8f0;
    }

    .bs-main-table td {
        padding: 16px;
        text-align: center;
        border-bottom: 1px solid #f1f5f9;
        font-size: 13px;
        color: #334155;
        vertical-align: middle;
    }

        .bs-main-table th:first-child,
        .bs-main-table td:first-child {
            width: 50px;
        }

    .bs-main-table tr:last-child td {
        border-bottom: none;
    }

.bs-checkbox {
    width: 16px;
    height: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

    .bs-checkbox:checked {
        background-color: #3b82f6;
        border-color: #3b82f6;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
        background-position: center;
        background-repeat: no-repeat;
    }

/* Badges (Figma matches) */
.bs-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.bs-badge-approved {
    background-color: #dcfce7;
    color: #16a34a;
}

.bs-badge-validated {
    background-color: #fef3c7;
    color: #d97706;
}

.bs-badge-rejected {
    background-color: #fee2e2;
    color: #dc2626;
}

.bs-badge-submitted {
    background-color: #e0e7ff;
    color: #4f46e5;
}

.bs-badge-draft {
    background-color: #f1f5f9;
    color: #64748b;
}

/* Action Buttons inside Table */
.bs-actions-cell {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.bs-action-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: opacity 0.2s;
}

    .bs-action-btn:hover {
        opacity: 0.7;
    }

.bs-icon-view {
    color: #3b82f6;
}

.bs-icon-approve {
    color: #16a34a;
}

.bs-icon-validate {
    color: #d97706;
}

.bs-icon-reject {
    color: #dc2626;
}

.bs-icon-submit {
    color: #6366f1;
}

.bs-icon-draft {
    color: #64748b;
}

.bs-icon-delete {
    color: #ef4444;
}


/* --- Pagination --- */
.bs-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 4px;
}

.bs-page-size {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #334155;
    font-weight: 500;
}

.bs-page-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.bs-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    border-radius: 6px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

    .bs-page-btn:hover:not(.dots) {
        background-color: #f8fafc;
    }

    .bs-page-btn.active {
        background-color: #f1f5f9;
        border-color: #e2e8f0;
        font-weight: 600;
        color: #1e293b;
    }

    .bs-page-btn.dots {
        border: none;
        background: transparent;
        cursor: default;
    }

/* --- Responsive Queries --- */
@media (max-width: 1280px) {
    .bs-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .bs-filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .bs-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bs-header-container, .bs-table-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .bs-search-input {
        width: 100%;
    }

    .bs-stats-grid {
        grid-template-columns: 1fr;
    }

    .bs-filter-grid {
        grid-template-columns: 1fr;
    }

    .bs-filter-actions {
        flex-direction: column;
        width: 100%;
    }

        .bs-filter-actions .bs-btn {
            width: 100%;
            justify-content: center;
        }

    .bs-pagination {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .bs-page-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

