/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f7fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Page container and title */
.page-container {
    padding: 25px;
    background-color: #f4f7fa;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.page-title {
    color: #2b3e50;
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 15px 20px;
    padding-bottom: 8px;
}

/* Tab Navigation */
.tabs {
    display: flex;
    gap: 4px;
    padding: 0 15px;
    border-bottom: 1px solid #ddd;
    background-color: #f4f7fa;
    margin: 35px 0 20px 0;
    overflow-x: auto;
    overflow-y: hidden;
    min-height: 52px;
    align-items: center;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #00bec8 transparent;
    position: relative;
    z-index: 1;
    clear: both;
}

/* Style the scrollbar for webkit browsers */
.tabs::-webkit-scrollbar {
    height: 4px;
    background: transparent;
}

.tabs::-webkit-scrollbar-thumb {
    background: #00bec8;
    border-radius: 4px;
}

.tab {
    padding: 10px 18px;
    border: none;
    background-color: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 20px;
    margin: 6px 0;
    white-space: nowrap;
    min-height: 40px;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.tab:focus {
    outline: none;
}

.tab.active {
    background-color: #00bec8;
    color: white;
    box-shadow: 0 2px 8px rgba(64, 224, 208, 0.3);
}

.tab:hover:not(.active) {
    background-color: rgba(64, 224, 208, 0.1);
    color: #00bec8;
}

/* Tab Content */
.tab-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding: 15px;
    background-color: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-radius: 0 0 12px 12px;
}

.tab-panel {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    display: none;
    padding: 0;
    background-color: white;
    font-size: 16px;
    line-height: 1.6;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Entity List Heading (used for tab panel titles) */
.entity-list-heading {
    color: #2b3e50;
    font-size: 22px;
    margin: 10px 0 15px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid #00bec8;
    font-weight: 500;
    line-height: 1.3;
}

/* Button Group */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

/* Action Buttons */
.action-button {
    background-color: #00bec8;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 4px;
    font-size: 14px;
}

.action-button:hover {
    background-color: #0078a3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 153, 204, 0.2);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    color: #666;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-container {
        padding: 10px;
    }
    .page-title {
        font-size: 24px;
        margin: 0 0 12px 10px;
    }
    .tabs {
        min-height: 48px;
        padding: 0 10px;
        margin: 30px 0 15px 0;
    }
    .tab {
        padding: 8px 14px;
        font-size: 13px;
        min-height: 36px;
    }
    .tab-content {
        padding: 10px;
    }
    .entity-list-heading {
        font-size: 20px;
        margin: 8px 0 12px 0;
    }
    .action-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 20px;
        text-align: center;
        margin: 0 0 10px 0;
    }
    .tabs {
        min-height: 44px;
        padding: 0 8px;
        margin: 25px 0 12px 0;
    }
    .tab {
        padding: 6px 12px;
        font-size: 12px;
        min-height: 34px;
    }
    .entity-list-heading {
        font-size: 18px;
        text-align: center;
    }
    .button-group {
        flex-direction: column;
    }
    .action-button {
        width: 100%;
        text-align: center;
    }
}

/* iPhone-specific adjustments */
@media (max-width: 390px) {
    .page-container {
        padding: 8px !important;
    }
}

/* Dashboard Layout */
.primary-action-container {
    margin: 20px 0;
    padding: 0 20px;
}

.settings-buttons-container {
    margin: 20px 0;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
}

.settings-buttons-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.current-budgets-section {
    margin: 30px 0;
    padding: 0 20px;
}

.current-budgets-section h3 {
    color: #2b3e50;
    font-size: 18px;
    margin-bottom: 15px;
}

/* Table Styles */
.budget-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.budget-table th,
.budget-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.budget-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 500;
}

.budget-table tr:last-child td {
    border-bottom: none;
}

/* Section Visibility */
.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

/* Section Content */
.section-content {
    padding: 20px;
    width: 100%;
}

/* Action Buttons */
.action-btn {
    padding: 6px 12px;
    margin-right: 8px;
    border: 1px solid #00bec8;
    background: transparent;
    color: #00bec8;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #00bec8;
    color: white;
}

/* Primary Action Button */
.admin-action-button.primary {
    background-color: #00bec8;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(64, 224, 208, 0.2);
}

.admin-action-button.primary:hover {
    background-color: #00bec8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(64, 224, 208, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .admin-buttons-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .settings-buttons-container {
        justify-content: stretch;
    }

    .settings-buttons-group {
        width: 100%;
        flex-direction: column;
    }

    .admin-action-button {
        width: 100%;
    }
}

/* Budget Administration Styles */
.primary-action-button {
    background-color: #00bec8;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.primary-action-button:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.admin-actions-container {
    margin: 20px 0 30px;
    padding: 20px;
}

/* New class for the row containing all buttons */
.admin-buttons-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
}

.admin-buttons-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.admin-action-button {
    background-color: #f5f5f5;
    color: #333;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-action-button:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
}

.admin-action-button.active {
    background-color: #e3f2fd;
    border-color: #00bec8;
    color: #1976D2;
}

.admin-content-area {
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.section-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 16px 24px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3 {
    color: #2b3e50;
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

.back-to-dashboard {
    color: #00bec8;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.2s ease;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
}

.back-to-dashboard:hover {
    color: #007399;
}

.back-to-dashboard i {
    font-size: 16px;
    margin-right: 8px;
}

.fiscal-params-content {
    padding: 24px;
    background-color: #ffffff;
    border-radius: 0 0 8px 8px;
}

.fiscal-params-actions {
    margin: 0 0 24px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

#set-fiscal-params {
    background-color: #00bec8;
    padding: 12px 24px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#set-fiscal-params i {
    font-size: 16px;
}

.fiscal-params-table {
    width: 100%;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 0;
}

.fiscal-params-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 500;
    padding: 14px 16px;
    border-bottom: 2px solid #e9ecef;
}

.fiscal-params-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

.fiscal-params-table tr:last-child td {
    border-bottom: none;
}

.fiscal-params-table .action-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Style for the primary action button */
.admin-action-button.primary {
    background-color: #00bec8;
    color: white;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 500;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.admin-action-button.primary:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.admin-action-button.primary i {
    font-size: 1.2em;
    margin-right: 10px;
}

/* Fiscal Parameters Styles */
.fiscal-params-actions {
    margin: 20px 0;
}

.fiscal-params-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

.fiscal-params-table th,
.fiscal-params-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.fiscal-params-table th {
    background-color: #f5f5f5;
    font-weight: 500;
}

.fiscal-params-table .action-btn {
    padding: 6px 12px;
    margin-right: 8px;
    border: 1px solid #00bec8;
    background: transparent;
    color: #00bec8;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.fiscal-params-table .action-btn:hover:not([disabled]) {
    background: #00bec8;
    color: white;
}

.fiscal-params-table .action-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: #999;
    color: #999;
}

.fiscal-params-table .action-btn i {
    font-size: 14px;
}

/* Style for the top action button */
#set-fiscal-params {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #00bec8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#set-fiscal-params:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1200;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 8px;
    width: 98%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2b3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
    background-color: #f8f9fa;
}

/* Form Styles */
.params-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Specific styles for fiscal params form */
#fiscal-params-form {
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
}

#fiscal-params-form .form-group {
    margin-bottom: 12px;
    gap: 5px;
}

#fiscal-params-modal .modal-content {
    max-width: 900px;
}

#fiscal-params-modal .form-actions {
    margin-bottom: 0;
}

#general-params-form {
    margin: 0 auto;
    width: 50%;
}

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

.form-group label {
    font-size: 14px;
    color: #666;
}

.form-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-input:focus {
    border-color: #00bec8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 224, 208, 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.save-params {
    background-color: #00bec8;
}

.cancel-params {
    background-color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

/* File Upload Styles */
.file-upload-container {
    border: 2px dashed #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.file-upload-container:hover {
    border-color: #0099cc;
    background-color: #f0f9ff;
}

.selected-files-list {
    margin-top: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.files-list-header {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 100px 120px 100px;
    gap: 10px;
    padding: 10px 15px;
    background-color: #f5f5f5;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
}

.file-item {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 100px 120px 100px;
    gap: 10px;
    padding: 10px 15px;
    align-items: center;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

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

.file-item:hover {
    background-color: #f8f8f8;
}

.file-item.new {
    background-color: #f0f9ff;
}

.file-item-name {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-width: 0; /* Allows text-overflow to work */
}

.file-item-name i {
    font-size: 16px;
}

.file-item-name i.fa-file-pdf {
    color: #dc3545;
}

.file-item-name i.fa-file-excel {
    color: #28a745;
}

.file-item-name i.fa-file-word {
    color: #0066cc;
}

.file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0; /* Allows text-overflow to work in flex container */
}

.file-size {
    color: #666;
    font-size: 0.9em;
    text-align: right;
    padding-right: 15px;
}

.file-date {
    color: #666;
    font-size: 0.9em;
    text-align: right;
}

.file-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-right: 5px;
}

.file-action-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    color: #666;
    transition: all 0.2s;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Update media queries for better responsive behavior */
@media (max-width: 768px) {
    .files-list-header, .file-item {
        grid-template-columns: minmax(150px, 1fr) 80px auto;
        padding: 10px;
    }
    
    .file-date-header, .file-date {
        display: none;
    }
}

@media (max-width: 480px) {
    .files-list-header, .file-item {
        grid-template-columns: minmax(120px, 1fr) auto;
        gap: 5px;
    }
    
    .file-size-header, .file-size {
        display: none;
    }
    
    .file-item-name {
        gap: 5px;
    }
}

/* Files List Modal Styles */
.files-list {
    max-height: 400px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

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

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

.file-item-actions {
    display: flex;
    gap: 8px;
}

.file-action-btn {
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.file-action-btn.delete {
    color: #00858e;
    border: 1px solid #00858e;
}

.file-action-btn.download {
    color: #00bec8;
    border: 1px solid #00bec8;
}

/* Voter Registration Grid Styles */
#voter-registration-grid {
    margin-top: 20px;
}

.k-grid {
    border-color: #e9ecef;
}

.k-grid th {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    padding: 12px 16px;
    font-weight: 500;
}

.k-grid td {
    padding: 12px 16px;
    border-color: #e9ecef;
}

.voter-input {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.voter-input:focus {
    border-color: #00bec8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 153, 204, 0.1);
}

.k-grid-search {
    margin-bottom: 10px;
    width: 250px;
}

.k-grid-search .k-textbox {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Budget Details Modal Styles */
.budget-details {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.details-section {
    margin-bottom: 0;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.section-title {
    color: #2b3e50;
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.detail-row {
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.detail-row strong {
    min-width: 180px;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

.detail-row span {
    color: #212529;
    flex: 1;
    font-size: 14px;
}

/* Make the first section span full width */
.details-section:first-child {
    grid-column: 1 / -1;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .budget-details {
        grid-template-columns: 1fr;
    }
    
    .details-section:first-child {
        grid-column: auto;
    }
}

/* Budget Grid Styles */
#current-budgets-grid {
    margin-top: 20px;
}

.budget-title-link {
    color: #0099cc;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-block;
}

.budget-title-link:hover {
    background-color: rgba(64, 224, 208, 0.1);
    color: #00bec8;
}

.budget-title-link:active {
    background-color: rgba(64, 224, 208, 0.2);
}

.budget-title-link::before {
    content: '\f06e';  /* Font Awesome eye icon */
    font-family: 'Font Awesome 5 Free';
    margin-right: 6px;
    font-weight: 900;
    font-size: 14px;
    opacity: 0.7;
}

.k-grid-content {
    min-height: 200px;
}

.k-grid td {
    line-height: 2;
    vertical-align: middle;
}

.k-grid .action-btn {
    padding: 4px 8px;
    margin-right: 6px;
}

.k-grid .action-btn i {
    margin-right: 4px;
}

.k-grid .action-btn.delete-budget {
    color: #00858e;
    border-color: #00858e;
}

.k-grid .action-btn.delete-budget:hover {
    background-color: #00858e;
    color: white;
}

/* Budget Form Styles */
.budget-form {
    width: 100%;
    padding: 20px;
}

/* Budget Form Steps Navigation */
.budget-form-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
    overflow-x: auto;
}

.step-tab {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin-right: 10px;
    min-width: 150px;
    opacity: 0.7;
}

.step-tab:last-child {
    margin-right: 0;
}

.step-tab.active {
    background-color: rgba(64, 224, 208, 0.1);
    opacity: 1;
}

.step-tab.completed {
    opacity: 1;
}

.step-tab.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #495057;
    font-weight: 600;
    margin-right: 10px;
    transition: all 0.2s ease;
}

.step-tab.active .step-number {
    background-color: #00bec8;
    color: white;
}

.step-tab.completed .step-number {
    background-color: #28a745;
    color: white;
}

.step-tab.completed .step-number::after {
    content: '✓';
    font-size: 14px;
    margin-left: 1px;
}

.step-title {
    font-weight: 500;
    color: #495057;
}

.step-tab.active .step-title {
    color: #00bec8;
    font-weight: 600;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.form-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.form-subsection {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.form-subsection:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.subsection-title {
    color: #495057;
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 15px 0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 15px;
}

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

.form-group:last-child {
    margin-bottom: 0;
}

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

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #00bec8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 224, 208, 0.1);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.checkbox-group {
    margin: 15px 0;
    display: flex;
    gap: 10px;
}

.checkbox-group-forms {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    flex-direction: column;
    align-items: flex-start !important;
}


.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
}

.checkbox-label span {
    color: #495057;
    font-size: 14px;
    line-height: 1.4;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }
}

/* Required field indicator */
.required {
    color: #f5871f;
    margin-left: 2px;
}

/* Form intro text */
.form-intro {
    margin-bottom: 20px;
    color: #495057;
    font-size: 16px;
    line-height: 1.5;
}

/* Initial selection actions */
.initial-actions {
    margin-top: 30px;
    justify-content: center;
    padding: 15px;
}

/* Selected parameters summary */
.selected-params-summary {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.selected-param {
    display: flex;
    align-items: center;
    gap: 10px;
}

.param-label {
    font-weight: 500;
    color: #495057;
}

.param-value {
    font-weight: 600;
    color: #00bec8;
}

.edit-selection-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.edit-selection-btn:hover {
    color: #00bec8;
    background-color: rgba(0, 153, 204, 0.1);
}

/* Form validation styles */
.form-input.error {
    border-color: #f5871f;
}

.error-message {
    color: #f5871f;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Funding Sources Styles */
.unallocated-funds-container {
    background-color: #f8f9fa;
    border-left: 4px solid #00bec8;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.unallocated-funds-label {
    font-weight: 500;
    color: #495057;
    font-size: 16px;
}

.unallocated-funds-amount {
    font-weight: 700;
    color: #00bec8;
    font-size: 18px;
}

.funding-sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.funding-source-item {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px 15px;
    transition: all 0.2s ease;
}

.funding-source-item:hover {
    border-color: #00bec8;
    box-shadow: 0 2px 8px rgba(0, 153, 204, 0.1);
}

.funding-source-label {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

.funding-source-number {
    font-weight: 600;
    color: #495057;
    margin-right: 10px;
    min-width: 30px;
}

.funding-source-name {
    color: #495057;
    flex: 1;
}

/* Selected funding sources */
.selected-funding-sources {
    margin-top: 30px;
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
}

.selected-sources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.selected-source-tag {
    background-color: #e3f2fd;
    color: #00bec8;
    border: 1px solid #00bec8;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.remove-source {
    background: none;
    border: none;
    color: #00bec8;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.remove-source:hover {
    background-color: rgba(0, 153, 204, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .funding-sources-grid {
        grid-template-columns: 1fr;
    }
    
    .unallocated-funds-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Funding Parts */
.funding-part {
    display: none;
}

.funding-part.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Budget Allocation Styles */
.budget-allocation-header {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 25px;
}

.budget-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.budget-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.budget-info-label {
    font-weight: 500;
    color: #495057;
    font-size: 16px;
}

.budget-info-value {
    font-weight: 700;
    color: #00bec8;
    font-size: 18px;
}

.allocation-instructions {
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.allocation-table {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.allocation-table-header {
    display: grid;
    grid-template-columns: 150px 1fr;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 15px;
    font-weight: 600;
    color: #495057;
}

.allocation-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 15px;
    align-items: center;
}

.allocation-row:last-child {
    border-bottom: none;
}

.allocation-amount {
    position: relative;
}

.allocation-amount-input {
    width: 100%;
    max-width: 120px;
    padding: 8px 8px 8px 24px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.allocation-amount-input:focus {
    border-color: #00bec8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 224, 208, 0.1);
}

.allocation-amount::before {
    content: '$';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-weight: 500;
}

.allocation-source {
    display: flex;
    align-items: center;
    gap: 10px;
}

.allocation-source-number {
    font-weight: 600;
    color: #495057;
    min-width: 30px;
}

.allocation-source-name {
    color: #495057;
}

.allocation-validation-message {
    color: #f5871f;
    font-size: 14px;
    padding: 10px;
    background-color: rgba(245, 135, 31, 0.1);
    border-radius: 4px;
    margin-top: 15px;
}

.allocation-validation-message.success {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.action-button.secondary {
    background-color: #6c757d;
}

.action-button.secondary:hover {
    background-color: #5a6268;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .budget-info-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .allocation-table-header,
    .allocation-row {
        grid-template-columns: 120px 1fr;
    }
}

#fiscal-params-form .file-upload-container {
    padding: 12px;
    margin-top: 0;
}

#fiscal-params-form .form-actions {
    margin-top: 10px;
    padding: 15px;
}

/* Distribution Styles */
.distribution-part {
    display: none;
}

.distribution-part.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.budget-info-container {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 25px;
}

.distribution-table-container {
    margin-top: 20px;
    overflow-x: auto;
}

.distribution-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.distribution-table th,
.distribution-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.distribution-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 500;
}

.distribution-table tbody tr:hover {
    background-color: rgba(0, 153, 204, 0.05);
}

.distribution-table tfoot tr {
    background-color: #f8f9fa;
}

.distribution-table tfoot td {
    font-weight: 500;
}

.distribute-funds-btn {
    padding: 6px 12px;
    white-space: nowrap;
}

/* Distribution Detail Styles */
.distribution-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.distribution-source-title {
    font-size: 18px;
    font-weight: 500;
    color: #2b3e50;
    margin: 0;
}

.distribution-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.distribution-detail-table-container {
    margin-top: 20px;
    overflow-x: auto;
}

.distribution-detail-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.distribution-detail-table th,
.distribution-detail-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.distribution-detail-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 500;
}

.distribution-detail-table tbody tr:hover {
    background-color: rgba(0, 153, 204, 0.05);
}

.distribution-detail-table tfoot tr {
    background-color: #f8f9fa;
}

.distribution-detail-table tfoot td {
    font-weight: 500;
}

.no-records-message {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-style: italic;
}

/* Add Source Form */
.add-source-form {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.form-header h5 {
    margin: 0;
    color: #2b3e50;
    font-size: 16px;
    font-weight: 500;
}

.form-body {
    padding: 20px;
}

/* Action buttons for distribution detail table */
.action-btn-group {
    display: flex;
    gap: 8px;
}

.edit-distribution-btn,
.delete-distribution-btn {
    padding: 4px 8px;
    font-size: 13px;
}

.edit-distribution-btn {
    color: #00bec8;
    border-color: #00bec8;
}

.delete-distribution-btn {
    color: #00858e;
    border-color: #00858e;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .distribution-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .distribution-table th,
    .distribution-table td,
    .distribution-detail-table th,
    .distribution-detail-table td {
        padding: 10px;
    }
    
    .distribute-funds-btn {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* Publish Step Styles */
.publish-summary-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

.summary-header {
    margin-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 15px;
}

.summary-header h5 {
    font-size: 18px;
    color: #2b3e50;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.summary-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.summary-section {
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 25px;
    overflow: hidden;
}

.summary-section-header {
    background-color: #e9ecef;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-section-header h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2b3e50;
}

.edit-section-btn {
    background: none;
    border: none;
    color: #00bec8;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.edit-section-btn:hover {
    background-color: rgba(0, 153, 204, 0.1);
}

.summary-content {
    padding: 20px;
}

.summary-row {
    display: flex;
    margin-bottom: 12px;
}

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

.summary-label {
    width: 180px;
    min-width: 180px;
    font-weight: 500;
    color: #495057;
}

.summary-value {
    flex: 1;
    color: #212529;
}

.funding-sources-summary,
.distribution-summary {
    margin-top: 20px;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.summary-table th,
.summary-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.summary-table th {
    background-color: #f1f3f5;
    font-weight: 500;
    color: #495057;
}

.summary-table tr:last-child td {
    border-bottom: none;
}

.summary-table tr:hover td {
    background-color: rgba(0, 153, 204, 0.05);
}

.distribution-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.distribution-chart-container {
    flex: 1;
    min-width: 300px;
    height: 300px;
}

.distribution-details {
    flex: 2;
    min-width: 400px;
}

.publish-options {
    margin-top: 30px;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.publish-option {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f3f5;
}

.publish-option:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.option-description {
    margin-top: 5px;
    margin-left: 25px;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.publish-action {
    margin-top: 30px;
    text-align: center;
}

.publish-btn {
    background-color: #28a745;
    padding: 12px 30px;
    font-size: 16px;
}

.publish-btn:hover {
    background-color: #218838;
}

.publish-note {
    margin-top: 15px;
    font-size: 13px;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .summary-row {
        flex-direction: column;
    }
    
    .summary-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .distribution-summary {
        flex-direction: column;
    }
    
    .distribution-chart-container,
    .distribution-details {
        width: 100%;
    }
    
    .publish-action {
        flex-direction: column;
    }
}

/* Distribution actions */
.distribution-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

/* Distribution Form Styles */
.distribution-form {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.allocation-method-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.method-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.radio-label:hover {
    background-color: rgba(0, 153, 204, 0.1);
}

.radio-label input[type="radio"] {
    margin: 0;
}

.method-specific-input {
    margin-top: 15px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.method-specific-input label {
    font-weight: 500;
    color: #495057;
    min-width: 150px;
}

.method-specific-input input {
    flex: 1;
    max-width: 200px;
}

.allocation-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #00bec8;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.summary-label {
    font-size: 14px;
    color: #495057;
}

.summary-value {
    font-size: 18px;
    font-weight: 600;
    color: #00bec8;
}

.summary-value.over-allocated {
    color: #f5871f;
}

#allocation-grid {
    margin: 20px 0;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.allocation-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.allocation-input:focus {
    border-color: #00bec8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 224, 208, 0.1);
}

.allocation-input.invalid {
    border-color: #f5871f;
    background-color: rgba(245, 135, 31, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .allocation-method-section {
        padding: 10px;
    }
    
    .method-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .allocation-summary {
        flex-direction: column;
        gap: 15px;
    }
    
    .method-specific-input {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .method-specific-input label {
        min-width: auto;
    }
    
    .method-specific-input input {
        max-width: none;
    }
}

/* Distribution Summary Table Styles */
.distribution-summary .summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.distribution-summary .summary-table th,
.distribution-summary .summary-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.distribution-summary .summary-table th {
    background-color: #f8f9fa;
    font-weight: 500;
    color: #495057;
}

/* Source Header Styles */
.distribution-summary .source-header td {
    background-color: #e3f2fd;
    color: #0d47a1;
    font-weight: 500;
    padding: 12px 15px;
    border-bottom: 1px solid #bbdefb;
}

/* Source Distribution Row Styles */
.distribution-summary .source-distribution td {
    background-color: #ffffff;
    padding-left: 30px; /* Indent distribution rows */
}

/* Source Subtotal Styles */
.distribution-summary .source-subtotal td {
    background-color: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 500;
}

/* Final Total Row Styles */
.distribution-summary .final-total td {
    background-color: #f8f9fa;
    border-top: 2px solid #dee2e6;
    border-bottom: none;
    font-weight: 600;
    color: #2b3e50;
}

/* No Records Message */
.distribution-summary .no-records-message {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-style: italic;
}

/* Hover Effects */
.distribution-summary .source-distribution:hover td {
    background-color: #f8f9fa;
}

/* Amount Columns Alignment */
.distribution-summary .summary-table td:nth-child(3),
.distribution-summary .summary-table td:nth-child(4),
.distribution-summary .summary-table th:nth-child(3),
.distribution-summary .summary-table th:nth-child(4) {
    text-align: right;
}

/* Review Budget Styles */
.review-budget-content {
    padding: 20px;
}

.review-budget-filters {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.filter-group {
    flex: 1;
}

.filter-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
}

.radio-group {
    display: flex;
    gap: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.radio-label:hover {
    background-color: rgba(0, 153, 204, 0.1);
}

.budget-list-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

/* Kendo Grid Customization */
.k-grid {
    border-color: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.k-grid th {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    padding: 12px 16px;
    font-weight: 500;
    color: #495057;
}

.k-grid td {
    padding: 12px 16px;
    border-color: #e9ecef;
    vertical-align: middle;
}

.k-grid tr:hover {
    background-color: #f8f9fa;
}

.k-grid .k-pager-wrap {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    padding: 8px;
}

.budget-title-link {
    color: #0099cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.budget-title-link:hover {
    color: #00bec8;
    text-decoration: underline;
}

/* Back button styles */
.back-to-list-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: none;
    border-radius: 4px;
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto; /* Pushes button to the right */
}

.back-to-list-btn:hover {
    background-color: #e9ecef;
    color: #212529;
}

.back-to-list-btn i {
    font-size: 14px;
}

/* Content header styles */
.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

#selected-budget-title {
    margin: 0;
    font-size: 24px;
    color: #2b3e50;
    font-weight: 500;
    order: -1; /* Ensures title is first */
}

.placeholder-message {
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .review-budget-filters {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .content-header {
        flex-direction: column-reverse; /* Reverses order on mobile to keep title on top */
        align-items: flex-start;
        gap: 15px;
    }

    .back-to-list-btn {
        margin-left: 0; /* Reset margin on mobile */
        align-self: flex-start;
    }
}

/* Form input styles */
.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    color: #495057;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    border-color: #00bec8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 224, 208, 0.1);
}

/* Budget Review Details Styles */
.budget-info-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-row {
    display: flex;
    gap: 30px;
    margin-bottom: 15px;
}

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

.info-group {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.info-group.full-width {
    flex: 1;
}

.info-group label {
    color: #495057;
    font-weight: 500;
    min-width: 120px;
}

.info-group span {
    color: #212529;
}

.action-link {
    color: #0099cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    margin-right: 20px;
}

.action-link:hover {
    color: #007399;
    text-decoration: underline;
}

.search-container {
    margin-bottom: 20px;
}

.search-input-group {
    position: relative;
    max-width: 300px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

#chapter-search {
    padding-left: 35px;
}

.agency-panels {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.agency-panel {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

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

.agency-panel.active .panel-header {
    background-color: #e3f2fd;
    border-left-color: #00bec8;
}

.panel-header h4 {
    margin: 0;
    color: #2b3e50;
    font-size: 16px;
    font-weight: 500;
}

.panel-header i {
    color: #495057;
    transition: transform 0.3s ease;
}

.agency-panel.active .panel-header i {
    transform: rotate(180deg);
    color: #00bec8;
}

.agency-panel.active .panel-header h4 {
    color: #00bec8;
}

.panel-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #fff;
    border-top: 1px solid #e9ecef;
}

.agency-panel.active .panel-content {
    max-height: 2000px; /* Large enough to show content */
    transition: max-height 0.5s ease-in;
    padding: 20px;
}

.review-actions {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
    margin-top: 20px;
}

.submit-review-btn {
    background-color: #00bec8;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-review-btn:hover {
    background-color: #007399;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 153, 204, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .info-row {
        flex-direction: column;
        gap: 15px;
    }

    .info-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .info-group label {
        min-width: auto;
    }

    .panel-header {
        padding: 12px 15px;
    }
}

/* Chapter Link and Action Links Styles */
.chapter-link {
    color: #0099cc;
    font-weight: 500;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-block;
    background-color: rgba(0, 153, 204, 0.08);
    margin-bottom: 8px;
}

.chapter-link:hover {
    background-color: rgba(0, 153, 204, 0.15);
    color: #0078a3;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chapter-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #555;
}

.info-item .amount {
    font-weight: 600;
    color: #333;
}

/* Action Links */
.action-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-links a {
    color: #0099cc;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-block;
}

.action-links a:hover {
    background-color: rgba(0, 153, 204, 0.08);
    color: #0078a3;
}

.action-links a.history-link {
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-links a.history-link:before {
    content: '\f1da'; /* Font Awesome history icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 14px;
}

.action-links a.chapter-view-link {
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-links a.chapter-view-link:before {
    content: '\f02e'; /* Font Awesome bookmark icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 14px;
}

/* Media Queries */
@media (max-width: 768px) {
    .action-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .action-links a {
        font-size: 13px;
        padding: 5px 8px;
    }
    
    .chapter-link {
        font-size: 13px;
        padding: 5px 8px;
    }
    
    .info-item {
        font-size: 12px;
    }
}

/* Chapter Forms Modal Styles */
.chapter-forms-modal-content {
    max-width: 650px;
}

.chapter-forms-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.chapter-title {
    color: #00bec8;
    font-size: 24px;
    margin-bottom: 12px;
    font-weight: 500;
}

.chapter-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-item {
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
}

.meta-item strong {
    font-weight: 500;
    color: #2b3e50;
    margin-right: 5px;
}

.export-section {
    padding: 16px 0;
}

.export-section h5 {
    color: #2b3e50;
    font-size: 16px;
    margin-bottom: 16px;
}

.export-format-selector {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.export-format-selector label {
    font-weight: 500;
    color: #495057;
}

.export-format-selector select {
    width: 120px;
}

.form-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-list li {
    margin: 0;
}

.form-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: rgba(0, 153, 204, 0.08);
    border-radius: 6px;
    color: #0099cc;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.form-link:before {
    content: '\f1c1'; /* PDF icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    font-size: 16px;
}

.excel-format .form-link:before {
    content: '\f1c3'; /* Excel icon */
    color: #1d6f42; /* Excel green color */
}

.pdf-format .form-link:before {
    content: '\f1c1'; /* PDF icon */
    color: #ff0000; /* PDF red color */
}

.form-link:hover {
    background-color: rgba(0, 153, 204, 0.15);
    color: #0078a3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.generate-all-container {
    margin-top: 20px;
    text-align: center;
}

.generate-all-btn {
    background-color: #00bec8;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.generate-all-btn:before {
    content: '\f56e'; /* File download icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    font-size: 16px;
}

.generate-all-btn:hover {
    background-color: #0078a3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 153, 204, 0.2);
}

@media (max-width: 768px) {
    .chapter-forms-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .chapter-title {
        font-size: 20px;
    }
    
    .meta-item {
        font-size: 13px;
    }
    
    .export-format-selector {
        margin-bottom: 16px;
    }
    
    .form-link {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .generate-all-btn {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
}

/* Comment History Modal Styles */
.comment-history-modal-content {
    max-width: 900px;
    width: 90%;
}

.comment-history-container {
    padding: 0;
    margin: 0;
}

.comment-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    font-size: 14px;
}

.comment-history-table th {
    background-color: #2b3e50;
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    border: none;
}

.comment-history-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

.comment-history-table tbody tr:last-child td {
    border-bottom: none;
}

.comment-history-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Status cell styles */
.status-cell {
    font-weight: 500;
}

.status-cell.pending {
    color: #00bec8; /* App's blue color */
}

.status-cell.approved {
    color: #28a745; /* Keep green for approved */
}

.status-cell.rejected {
    color: #ff9800; /* Orange color instead of red */
}

/* Column widths */
.comment-history-table th:nth-child(1),
.comment-history-table td:nth-child(1) {
    width: 10%;
}

.comment-history-table th:nth-child(2),
.comment-history-table td:nth-child(2) {
    width: 50%;
}

.comment-history-table th:nth-child(3),
.comment-history-table td:nth-child(3) {
    width: 20%;
}

.comment-history-table th:nth-child(4),
.comment-history-table td:nth-child(4) {
    width: 20%;
}

/* Empty reason cell style */
.reason-cell:empty::after {
    content: "—";
    color: #ced4da;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .comment-history-modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .comment-history-table {
        font-size: 13px;
    }
    
    .comment-history-table th,
    .comment-history-table td {
        padding: 10px 12px;
    }
    
    /* Stack the table on mobile */
    .comment-history-table, 
    .comment-history-table thead, 
    .comment-history-table tbody, 
    .comment-history-table th, 
    .comment-history-table td, 
    .comment-history-table tr {
        display: block;
    }
    
    .comment-history-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .comment-history-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    
    .comment-history-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 40%;
        min-height: 30px;
    }
    
    .comment-history-table td:last-child {
        border-bottom: none;
    }
    
    .comment-history-table td::before {
        position: absolute;
        top: 10px;
        left: 12px;
        width: 35%;
        white-space: nowrap;
        font-weight: 600;
        color: #2b3e50;
    }
    
    .comment-history-table td:nth-child(1)::before { content: "Status"; }
    .comment-history-table td:nth-child(2)::before { content: "Comments"; }
    .comment-history-table td:nth-child(3)::before { content: "Date"; }
    .comment-history-table td:nth-child(4)::before { content: "Name"; }
    
    .comment-history-table th:nth-child(1),
    .comment-history-table td:nth-child(1),
    .comment-history-table th:nth-child(2),
    .comment-history-table td:nth-child(2),
    .comment-history-table th:nth-child(3),
    .comment-history-table td:nth-child(3),
    .comment-history-table th:nth-child(4),
    .comment-history-table td:nth-child(4) {
        width: 100%;
    }
}

/* Fund Balance Table Styles */
.fund-balance-table-container {
    margin: 20px 0;
    overflow-x: auto;
}

.fund-balance-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.fund-balance-table th,
.fund-balance-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.fund-balance-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 500;
}

.fund-balance-table tr:hover {
    background-color: rgba(0, 153, 204, 0.05);
}

.fund-balance-table tr:last-child td {
    border-bottom: none;
}

.chapter-fund-link {
    color: #0099cc;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: 4px;
}

.chapter-fund-link:hover {
    background-color: rgba(0, 153, 204, 0.1);
    color: #0078a3;
}

/* Add a note about required action */
.fund-balance-table tr.needs-action td {
    background-color: rgba(245, 135, 31, 0.1);
}

.fund-balance-table tr.needs-action td:first-child {
    border-left: 3px solid #f5871f;
}

.panel-header i {
    transition: transform 0.3s ease;
}

.panel-header i.fa-rotate-180 {
    transform: rotate(180deg);
}

/* Fund Balance Form Styles */
.fund-balance-modal-content {
    max-width: 90%;
    width: 1200px;
}

.form-instructions, .chapter-form-instructions {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #00bec8;
}

.form-instructions p, .chapter-form-instructions p {
    margin: 0 0 10px;
    font-size: 14px;
    color: #495057;
}

.form-instructions .example, .chapter-form-instructions .example {
    font-style: italic;
    color: #666;
}

.compliance-status, .chapter-compliance-status {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.compliance-status span {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
}

.out-of-compliance, .chapter-out-of-compliance {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.in-compliance, .chapter-in-compliance {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.fund-balance-form-container, .chapter-fund-balance-form-container {
    overflow-x: auto;
}

.fund-balance-form-table, .chapter-fund-balance-form-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.fund-balance-form-table th, .chapter-fund-balance-form-table th,
.fund-balance-form-table td, .chapter-fund-balance-form-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
    font-size: 14px;
}

.fund-balance-form-table th, .chapter-fund-balance-form-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 10;
    text-align: center;
    vertical-align: top;
    min-width: 70px;
}

.fund-balance-form-table th:first-child {
    width: 80px;
}

.fund-balance-form-table th:nth-child(2) {
    width: 200px;
}

.fund-balance-form-table td:nth-child(2) {
    white-space: nowrap;
}

/* Add matching styles for chapter version */
.chapter-fund-balance-form-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chapter-fund-balance-form-table th,
.chapter-fund-balance-form-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
    font-size: 14px;
}

.chapter-fund-balance-form-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 10;
    text-align: center;
    vertical-align: top;
    min-width: 70px;
}

.chapter-fund-balance-form-table th:first-child {
    width: 80px;
}

.chapter-fund-balance-form-table th:nth-child(2) {
    width: 200px;
}

.chapter-fund-balance-form-table td:nth-child(2) {
    white-space: nowrap;
}

/* Add styles for subtotal and total rows */
.chapter-subtotal-row td,
.chapter-total-row td {
    font-weight: 600;
    background-color: #f8f9fa;
}

.chapter-total-row td {
    background-color: #e9ecef;
}

.chapter-subtotal,
.chapter-subtotal-2,
.chapter-total {
    text-align: right;
    padding-right: 15px !important;
}

/* Input styling */
.fund-input, .chapter-fund-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    text-align: right;
}

.fund-input:focus, .chapter-fund-input:focus {
    outline: none;
    border-color: #00bec8;
    box-shadow: 0 0 3px rgba(0, 153, 204, 0.3);
}

.fund-input.disabled, .chapter-fund-input.disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Add matching styles for chapter-fund-input */
.chapter-fund-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    text-align: right;
}

.chapter-fund-input:focus {
    outline: none;
    border-color: #00bec8;
    box-shadow: 0 0 3px rgba(0, 153, 204, 0.3);
}

.chapter-fund-input.disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.chapter-fund-input.error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.form-navigation, .chapter-form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.fiscal-year-navigation, .chapter-fiscal-year-navigation {
    display: flex;
    gap: 10px;
}

.fiscal-year-navigation a {
    padding: 8px 15px;
    text-decoration: none;
    font-size: 14px;
}

#submit-fund-balance, #chapter-submit-fund-balance {
    padding: 10px 20px;
    font-size: 15px;
}

.other-fund-input-container {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.other-fund-name {
    width: calc(100% - 30px);
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.remove-other-fund {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-other-fund:hover {
    opacity: 1;
}

.other-fund-row {
    background-color: rgba(0, 153, 204, 0.03);
}

/* Fix for proper display of disabled textboxes */
.fund-input.disabled,
.fund-input[disabled] {
    background-color: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.7;
}

.back-to-fund-balances-list {
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
    color: #00bec8;
    font-size: 14px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 10px;
    border-radius: 4px;
}

.back-to-fund-balances-list:hover {
    background-color: rgba(0, 153, 204, 0.1);
    color: #0078a3;
}

.back-to-fund-balances-list i {
    margin-right: 6px;
}

.fund-balances-form-view .section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.fund-balances-form-view .section-header h2 {
    flex: 1;
    margin: 0;
}

/* Make the fund balance form table more responsive */
.fund-balance-form-container {
    margin-top: 20px;
    max-width: 100%;
    overflow-x: auto;
}

.fund-balance-form-table {
    min-width: 1200px;
}

/* Fund Balances Chapter View Styles */
.fund-balances-chapter-view-content {
    padding: 20px 0;
}

/* Chapter Tabs */
.chapter-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    padding: 0 15px;
}

.chapter-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.chapter-tab:hover {
    color: #00bec8;
    border-bottom-color: rgba(64, 224, 208, 0.3);
}

.chapter-tab.active {
    color: #00bec8;
    border-bottom-color: #00bec8;
}

.chapter-tab-panel {
    display: none;
    padding: 20px 0;
}

.chapter-tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Budget List Styles */
.instruction-text {
    background-color: #f8f9fa;
    border-left: 4px solid #00bec8;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.instruction-text p {
    margin: 0;
    line-height: 1.5;
    color: #495057;
}

.budget-list-container {
    margin-top: 20px;
    overflow-x: auto;
    padding-top: 20px;
}

.budget-list-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.budget-list-table th,
.budget-list-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.budget-list-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.budget-list-table tr:last-child td {
    border-bottom: none;
}

.budget-list-table tr:hover {
    background-color: rgba(0, 153, 204, 0.05);
}

.budget-link {
    color: #0099cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.budget-link:hover {
    color: #00bec8;
    text-decoration: underline;
}

.status-link {
    color: #0099cc;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.status-link.pending {
    color: #ff9800;
    background-color: rgba(255, 152, 0, 0.1);
}

.status-link.approved {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.status-link:hover {
    text-decoration: underline;
    opacity: 0.9;
}

.status-indicator {
    width: 50px;
    text-align: center;
}

.status-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-icon.pending {
    background-color: #ff9800;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

.status-icon.approved {
    background-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.placeholder-content {
    padding: 40px;
    background-color: #f8f9fa;
    border: 1px dashed #ced4da;
    border-radius: 6px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Chapter View Budget Styles */
.chapter-view-budget-content {
    padding: 20px 0;
}

.budget-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    justify-content: space-between;
}

.back-button {
    background: none;
    border: none;
    color: #00bec8;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    margin-right: 20px;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.back-button:hover {
    background-color: rgba(0, 153, 204, 0.1);
}

.budget-title {
    margin: 0;
    color: #2b3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.budget-view-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    padding: 0 15px;
}

.budget-view-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.budget-view-tab:hover {
    color: #00bec8;
    border-bottom-color: rgba(64, 224, 208, 0.3);
}

.budget-view-tab.active {
    color: #00bec8;
    border-bottom-color: #00bec8;
}

.budget-view-tab-panel {
    display: none;
    padding: 20px 0;
}

.budget-view-tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .chapter-tabs,
    .budget-view-tabs {
        padding: 0 5px;
    }
    
    .chapter-tab,
    .budget-view-tab {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .budget-list-table {
        font-size: 14px;
    }
    
    .budget-list-table th,
    .budget-list-table td {
        padding: 10px;
    }
    
    .instruction-text {
        padding: 10px;
    }
    
    .back-button {
        padding: 6px 12px;
        margin-right: 10px;
    }
    
    .budget-title {
        font-size: 1.2rem;
    }
}

.back-to-review {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 15px;
    color: #0056b3;
    background-color: transparent;
    border: 1px solid #0056b3;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-to-review:hover {
    background-color: #e6f0fa;
    text-decoration: none;
}

.back-to-review i {
    margin-right: 6px;
    font-size: 16px;
}

/* Review Agency Panels - mirroring agency panels styling */
.review-agency-panels {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.review-agency-panel {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.review-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.review-agency-panel.active .review-panel-header {
    background-color: #e9ecef;
    border-bottom: 1px solid #ddd;
}

.review-panel-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.review-panel-header i {
    transition: transform 0.2s ease;
}

.review-agency-panel.active .review-panel-header i {
    transform: rotate(180deg);
}

.review-agency-panel.active .review-panel-header h4 {
    color: #0056b3;
}

.review-panel-content {
    display: none;
    padding: 20px;
    background-color: #fff;
}

.review-agency-panel.active .review-panel-content {
    display: block;
}

/* Original agency panels styling for reference */
.agency-panels {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.agency-panel {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.agency-panel.active .panel-header {
    background-color: #e9ecef;
    border-bottom: 1px solid #ddd;
}

.panel-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.panel-header i {
    transition: transform 0.2s ease;
}

.agency-panel.active .panel-header i {
    transform: rotate(180deg);
}

.agency-panel.active .panel-header h4 {
    color: #0056b3;
}

.panel-content {
    display: none;
    padding: 20px;
    background-color: #fff;
}

.agency-panel.active .panel-content {
    display: block;
}

.back-to-review-chapter {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    margin-bottom: 20px;
    background-color: transparent;
    border: 1px solid #00bec8;
    border-radius: 4px;
    color: #00bec8;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-to-review-chapter:hover {
    background-color: #e6f3f8;
    color: #0078a3;
    border-color: #0078a3;
}

.back-to-review-chapter i {
    margin-right: 8px;
    font-size: 16px;
}

@media (max-width: 768px) {
    .back-to-review-chapter {
        padding: 6px 12px;
        font-size: 13px;
        margin-bottom: 15px;
    }
}

.return-to-dashboard-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin: 15px 0;
    background-color: #00bec8;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.return-to-dashboard-btn:hover {
    background-color: #007aa3;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.return-to-dashboard-btn i {
    font-size: 16px;
}

@media (max-width: 768px) {
    .return-to-dashboard-btn {
        padding: 8px 12px;
        font-size: 14px;
        margin: 10px 0;
    }
}

/* Modern Tooltip Styles */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.modern-tooltip {
    position: absolute;
    visibility: hidden;
    z-index: 10000;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 230px;
    padding: 12px 16px;
    background-color: #00bec8;
    color: white;
    text-align: left;
    border-radius: 6px;
    font-size: 14px;
    font-weight: normal;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    margin-bottom: 8px;
    white-space: normal;
    line-height: 1.4;
}

.modern-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: #00bec8 transparent transparent transparent;
}

.tooltip-wrapper:hover .modern-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Specific styles for allocation method tooltips */
.allocation-method-section .radio-label.tooltip-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.allocation-method-section .radio-label.tooltip-wrapper .modern-tooltip {
    min-width: 250px;
}

/* Specific styles for budget list tooltips */
.budget-list-table .tooltip-wrapper {
    display: inline-flex;
}

/* Tooltip media query for responsive design */
@media (max-width: 768px) {
    .modern-tooltip {
        min-width: 180px;
        font-size: 12px;
        padding: 10px 12px;
    }
}

/* Chapter Fund Balances Panel Styles */
.chapter-agency-panels {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.chapter-agency-panel {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chapter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

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

.chapter-agency-panel.active .chapter-panel-header {
    background-color: #e3f2fd;
    border-left-color: #00bec8;
}

.chapter-panel-header h4 {
    margin: 0;
    color: #2b3e50;
    font-size: 16px;
    font-weight: 500;
}

.chapter-panel-header i {
    color: #495057;
    transition: transform 0.3s ease;
}

.chapter-agency-panel.active .chapter-panel-header i {
    transform: rotate(180deg);
    color: #00bec8;
}

.chapter-agency-panel.active .chapter-panel-header h4 {
    color: #00bec8;
}

.chapter-panel-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #fff;
    border-top: 1px solid #e9ecef;
}

.chapter-agency-panel.active .chapter-panel-content {
    max-height: 2000px; /* Large enough to show content */
    transition: max-height 0.5s ease-in;
    padding: 20px;
}

.chapter-fund-balance-table-container {
    overflow-x: auto;
}

.chapter-fund-balance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.chapter-fund-balance-table th,
.chapter-fund-balance-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.chapter-fund-balance-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.chapter-fund-balance-table tr:hover {
    background-color: #f8f9fa;
}

.chapter-view-fund-link {
    color: #0099cc;
    text-decoration: none;
    font-weight: 500;
}

.chapter-view-fund-link:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chapter-panel-header {
        padding: 12px 15px;
    }
    
    .chapter-panel-header h4 {
        font-size: 15px;
    }
    
    .chapter-fund-balance-table th,
    .chapter-fund-balance-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Month status toggle styling */
.month-status {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: normal;
}

.month-status a {
    display: inline-block;
    padding: 2px 6px;
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.month-status a.closed {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.month-status a:hover {
    opacity: 0.8;
}

/* Chapter View Comment Modal Styles */
.chapter-view-comment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1200;
    justify-content: center;
    align-items: center;
}

.chapter-view-comment-modal.active {
    display: flex;
}

.chapter-view-comment-modal-content {
    background-color: white;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
}

.chapter-view-comment-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chapter-view-comment-modal-header h3 {
    margin: 0;
    color: #2b3e50;
    font-size: 20px;
    font-weight: 500;
}

.chapter-view-comment-modal-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.chapter-view-comment-modal-close:hover {
    color: #343a40;
    background-color: #e9ecef;
}

.chapter-view-comment-modal-body {
    padding: 20px;
}

.chapter-view-comment-form {
    margin-bottom: 30px;
}

.chapter-view-comment-input-group {
    margin-bottom: 20px;
}

.chapter-view-comment-input-group label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 500;
}

.chapter-view-comment-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.chapter-view-comment-textarea:focus {
    outline: none;
    border-color: #00bec8;
    box-shadow: 0 0 0 2px rgba(64, 224, 208, 0.1);
}

.chapter-view-comment-actions {
    display: flex;
    justify-content: flex-end;
}

.chapter-view-comment-submit {
    background-color: #00bec8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chapter-view-comment-submit:hover {
    background-color: #0078a3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 153, 204, 0.2);
}

.chapter-view-comment-history {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
}

.chapter-view-comment-history h4 {
    color: #2b3e50;
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 15px 0;
}

.chapter-view-comment-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chapter-view-comment-table th,
.chapter-view-comment-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.chapter-view-comment-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

.chapter-view-comment-table td {
    font-size: 14px;
    color: #212529;
}

.chapter-view-comment-table tbody tr:last-child td {
    border-bottom: none;
}

.chapter-view-comment-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Status cell styles */
.chapter-view-comment-status {
    font-weight: 500;
}

.chapter-view-comment-status.pending {
    color: #ff9800;
}

.chapter-view-comment-status.approved {
    color: #28a745;
}

.chapter-view-comment-status.rejected {
    color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chapter-view-comment-modal-content {
        width: 95%;
        margin: 20px;
    }

    .chapter-view-comment-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .chapter-view-comment-modal-header h3 {
        font-size: 18px;
    }

    .chapter-view-comment-table th,
    .chapter-view-comment-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Review Budget Chapter View Styles */
.review-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: #495057;
    min-width: 120px;
}

.filter-group select {
    min-width: 200px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.chapter-list-header {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.chapter-list-body {
    display: flex;
    flex-direction: column;
}

.chapter-list-header > div,
.chapter-item > div {
    padding: 12px;
}

.chapter-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    background-color: white;
}

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

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

.col-chapter {
    flex: 2;
    min-width: 200px;
}

.col-status {
    flex: 1;
    min-width: 150px;
}

.col-reports {
    flex: 3;
    min-width: 300px;
}

.col-actions {
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.chapter-name {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #212529;
}

.chapter-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.quarter-checkboxes {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.quarter-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    cursor: pointer;
}

.quarter-checkbox input[type="checkbox"] {
    margin: 0;
}

.quarter-checkbox.select-all {
    margin-left: 4px;
    padding-left: 4px;
    border-left: 1px solid #dee2e6;
}

.regenerate-btn {
    padding: 6px 12px;
    font-size: 13px;
}

@media (max-width: 1024px) {
    .chapter-item {
        flex-wrap: wrap;
    }

    .col-chapter,
    .col-status {
        flex: 1;
        min-width: 0;
    }

    .col-reports {
        flex: 100%;
        order: 3;
    }

    .col-actions {
        flex: 1;
        min-width: 0;
    }

    .quarter-checkboxes {
        padding-top: 8px;
    }
}

@media (max-width: 768px) {
    .chapter-list-header {
        display: none;
    }

    .chapter-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .chapter-item > div {
        width: 100%;
        padding: 4px 12px;
    }

    .col-actions {
        text-align: left;
    }

    .regenerate-btn {
        width: 100%;
    }
}

.funding-sources-table-container {
    margin: 20px 0;
    border-radius: 4px;
    overflow: hidden;
}

.funding-sources-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.funding-sources-table th,
.funding-sources-table td {
    padding: 12px 16px;
    text-align: left;
    border: 1px solid #dee2e6;
}

.funding-sources-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.funding-sources-table td {
    color: #212529;
}

.funding-sources-table tr:hover:not(.total-row) {
    background-color: #f8f9fa;
}

.funding-sources-table .total-row {
    background-color: #f8f9fa;
    font-weight: 600;
}

.funding-sources-table .total-row td {
    border-top: 2px solid #dee2e6;
}

/* Column specific styles */
.funding-sources-table td:nth-child(3),
.funding-sources-table td:nth-child(4) {
    text-align: right;
}

.funding-sources-table th:nth-child(3),
.funding-sources-table th:nth-child(4) {
    text-align: right;
}

@media (max-width: 768px) {
    .funding-sources-table {
        font-size: 14px;
    }

    .funding-sources-table th,
    .funding-sources-table td {
        padding: 8px 12px;
    }
}

/* Chapter Fund Balance Form View Styles */
.chapter-fund-balance-form-view {
    margin-top: 20px;
}

.back-to-chapter-fund-balances-list {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    margin-bottom: 20px;
    background-color: transparent;
    border: 1px solid #00bec8;
    border-radius: 4px;
    color: #00bec8;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-to-chapter-fund-balances-list:hover {
    background-color: #e6f3f8;
    color: #0078a3;
    border-color: #0078a3;
}

.back-to-chapter-fund-balances-list i {
    margin-right: 8px;
    font-size: 16px;
}

@media (max-width: 768px) {
    .back-to-chapter-fund-balances-list {
        padding: 6px 12px;
        font-size: 13px;
        margin-bottom: 15px;
    }
}

/* Chapter Review Budget styles */
.review-budget-chapter-view-content {
    width: 100%;
    margin-bottom: 30px;
}

.review-budget-chapter-filters {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chapter-budget-list-container {
    background-color: #fff;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#chapter-budget-review-content {
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.chapter-back-to-list-btn {
    display: inline-flex;
    align-items: center;
    background-color: transparent;
    color: #3477eb;
    border: none;
    padding: 8px 12px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.chapter-back-to-list-btn:hover {
    background-color: rgba(52, 119, 235, 0.1);
    color: #2c67d3;
}

.chapter-back-to-list-btn i {
    margin-right: 8px;
}

.chapter-budget-title-link {
    color: #3477eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.chapter-budget-title-link:hover {
    color: #2c67d3;
    text-decoration: underline;
}

.chapter-review-agency-panels {
    margin-top: 25px;
}

.chapter-review-agency-panel {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.chapter-review-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f5f7fa;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.chapter-review-panel-header:hover {
    background-color: #eaeef5;
}

.chapter-review-agency-panel.active .chapter-review-panel-header {
    background-color: #e5eaf3;
}

.chapter-review-panel-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #444;
}

.chapter-review-panel-header i {
    transition: transform 0.3s ease;
}

.chapter-review-agency-panel.active .chapter-review-panel-header i {
    transform: rotate(180deg);
}

.chapter-review-panel-content {
    display: none;
    padding: 15px;
    background-color: #fff;
    border-top: 1px solid #ddd;
}

.chapter-review-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.chapter-submit-review-btn {
    background-color: #3477eb;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.chapter-submit-review-btn:hover {
    background-color: #2c67d3;
}

@media (max-width: 768px) {
    .review-budget-chapter-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .chapter-review-actions {
        justify-content: center;
    }
    
    .chapter-submit-review-btn {
        width: 100%;
    }
    
    .chapter-back-to-list-btn {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        text-align: center;
    }
}

/* --- Budget Justification Tab Styles --- */
.budget-justification-header {
    margin-bottom: 12px;
    font-size: 16px;
    color: #222;
    display: flex;
    align-items: center;
    gap: 16px;
}

.budget-justification-header img {
    vertical-align: middle;
}

.budget-justification-table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 18px 24px 24px 24px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

.budget-justification-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    color: #222;
}

.budget-justification-table th {
    background: #f5f6fa;
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 2px solid #e0e0e0;
    text-align: left;
}

.budget-justification-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ececec;
    vertical-align: middle;
}

.budget-justification-table tr:last-child td {
    border-bottom: none;
}

.budget-justification-table td strong {
    font-weight: 600;
}

.budget-justification-table td[style*="color: red"] {
    color: #d32f2f !important;
    font-weight: 600;
}

.budget-justification-table td[style*="font-weight: bold"] {
    font-weight: 700 !important;
}

.budget-justification-table .distribute-link {
    color: #00bcd4;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s;
}

.budget-justification-table .distribute-link:hover {
    color: #007c91;
    text-decoration: underline;
}

/* Modal Styles for Chart of Accounts */
#chart-of-accounts-modal.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.25);
    justify-content: center;
    align-items: center;
}
#chart-of-accounts-modal.active {
    display: flex;
}
#chart-of-accounts-modal .modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    padding: 0 0 24px 0;
    position: relative;
}
#chart-of-accounts-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 0 24px;
    border-bottom: 1px solid #e0e0e0;
}
#chart-of-accounts-modal .modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}
#chart-of-accounts-modal .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}
#chart-of-accounts-modal .modal-close:hover {
    color: #d32f2f;
}
#chart-of-accounts-modal .modal-body {
    padding: 24px;
    font-size: 15px;
    color: #333;
}

@media (max-width: 600px) {
    .budget-justification-table-container {
        padding: 8px 2px 16px 2px;
    }
    #chart-of-accounts-modal .modal-content {
        max-width: 98vw;
        padding: 0 0 12px 0;
    }
    #chart-of-accounts-modal .modal-header, #chart-of-accounts-modal .modal-body {
        padding-left: 10px;
        padding-right: 10px;
    }
}

.budget-details-wizard {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 24px 32px 32px 32px;
    max-width: 100%;
    width: 100%;
    margin: 24px auto;
    font-family: 'Segoe UI', 'Arial', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.wizard-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: #222;
}

.wizard-steps {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 64px;
    margin-bottom: 32px;
    justify-content: flex-start;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px;
    position: relative;
}

.wizard-step .step-label {
    font-size: 1rem;
    font-weight: 500;
    color: #00bec8;
    margin-bottom: 6px;
    text-align: center;
}

.wizard-step .step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #888;
    margin-bottom: 0;
}

.wizard-step.active .step-icon,
.wizard-step .step-icon.complete {
    background: #009966;
    color: #fff;
}

.wizard-step .step-x {
    color: #888;
    font-size: 1.2rem;
}

.wizard-step .step-check {
    color: #fff;
    font-size: 1.2rem;
}

.wizard-step.active .step-label {
    color: #00bec8;
    font-weight: 600;
}

.wizard-step .step-label span {
    color: #222;
    font-weight: 400;
    font-size: 0.98rem;
}

.wizard-form-panel {
    margin-top: 12px;
}

.form-group-wizard {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 18px;
    gap: 18px;
}
.form-group-wizard label {
    min-width: 140px;
    max-width: 180px;
    font-size: 1rem;
    font-weight: 500;
    color: #222;
    margin-bottom: 0;
    flex-shrink: 0;
}
.form-group-wizard .form-input {
    flex: 1 1 0%;
    width: auto;
    font-size: 1rem;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    margin-bottom: 0;
}


@media (max-width: 900px) {
    .budget-details-wizard {
        padding: 12px 4px 18px 4px;
    }
    .wizard-steps {
        gap: 12px;
    }
    .wizard-step {
        min-width: 110px;
    }
}

.wizard-step-nav {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #00bec8;
    margin-bottom: 10px;
    text-align: center;
    padding: 0;
    transition: color 0.2s, text-decoration 0.2s;
}
.wizard-step-nav span {
    color: #222;
    font-weight: 400;
    font-size: 0.98rem;
}
.wizard-step-nav:hover, .wizard-step-nav:focus {
    color: #007c91;
    text-decoration: underline;
}
.wizard-step.active .wizard-step-nav {
    color: #00bec8;
    font-weight: 600;
    text-decoration: underline;
}

.performance-form-selector label {
    font-size: 1rem;
    font-weight: 400;
    color: #222;
    margin-right: 12px;
}
.performance-char-limit {
    font-size: 1rem;
    margin-bottom: 12px;
}
.performance-table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 18px 18px 24px 18px;
    margin-top: 12px;
    margin-bottom: 12px;
    overflow-x: auto;
}
.performance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    color: #222;
    background: #fff;
}
.performance-table th {
    background: #f5f6fa;
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 2px solid #e0e0e0;
    text-align: center;
    font-size: 1rem;
}
.performance-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ececec;
    vertical-align: middle;
    text-align: center;
}
.performance-table .criteria-label {
    text-align: left;
    min-width: 320px;
    background: #f5f6fa;
}
.performance-measure-input {
    width: 98%;
    margin-top: 6px;
}
.performance-goal-input {
    width: 80px;
}
.performance-actual-input {
    width: 80px;
    background: #f3f3f3;
    color: #888;
    cursor: not-allowed;
}
.performance-table tr:nth-child(even) td {
    background: #fafbfc;
}
.performance-table tr:nth-child(odd) td {
    background: #fff;
}
.performance-submit-btn {
    margin-top: 18px;
    min-width: 180px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
@media (max-width: 900px) {
    .performance-table-container {
        padding: 8px 2px 16px 2px;
    }
    .performance-table th, .performance-table td {
        padding: 6px 4px;
        font-size: 0.95rem;
    }
    .performance-measure-input, .performance-goal-input, .performance-actual-input {
        width: 98%;
    }
}

.personnel-changes-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 24px 0 0 0;
}
.personnel-changes-form .form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.personnel-changes-form label {
    font-size: 1rem;
    font-weight: 500;
    color: #222;
    margin-bottom: 4px;
}
.personnel-changes-form .form-input {
    width: 100%;
    font-size: 1rem;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    margin-bottom: 0;
}
.personnel-changes-form select.form-input {
    min-width: 120px;
}
.personnel-submit-btn {
    margin-top: 18px;
    min-width: 180px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.wizard-content-area {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e0e0e0;
    padding: 32px 40px 24px 40px;
    margin: 0 24px 24px 24px;
    width: auto;
    max-width: none;
}
@media (max-width: 900px) {
    .wizard-content-area {
        padding: 12px 4vw 12px 4vw;
        margin: 0 2vw 16px 2vw;
    }
}

/* Budget Forms Tab Styles */
.forms-content-area {
    max-width: 800px;
    margin: 0 auto;
}

.forms-section {
    padding: 16px 0;
}

.forms-section h5 {
    color: #2b3e50;
    font-size: 16px;
    margin-bottom: 16px;
}

.forms-format-selector {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.forms-format-selector label {
    font-weight: 500;
    color: #495057;
}

.forms-format-selector select {
    width: 120px;
}

.budget-forms-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.budget-forms-list li {
    margin: 0;
}

.budget-form-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: rgba(0, 153, 204, 0.08);
    border-radius: 6px;
    color: #0099cc;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.budget-form-link:before {
    content: '\f1c1'; /* PDF icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    font-size: 16px;
    color: #ff0000; /* PDF red color */
}

.budget-forms-list.excel-format .budget-form-link:before {
    content: '\f1c3'; /* Excel icon */
    color: #1d6f42; /* Excel green color */
}

.budget-forms-list.pdf-format .budget-form-link:before {
    content: '\f1c1'; /* PDF icon */
    color: #ff0000; /* PDF red color */
}

.budget-form-link:hover {
    background-color: rgba(0, 153, 204, 0.15);
    color: #0078a3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.generate-all-forms-container {
    margin-top: 20px;
    text-align: center;
}

.generate-all-forms-btn {
    background-color: #00bec8;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.generate-all-forms-btn:before {
    content: '\f56e'; /* File download icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    font-size: 16px;
}

.generate-all-forms-btn:hover {
    background-color: #0078a3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 153, 204, 0.2);
}

@media (max-width: 600px) {
    .forms-content-area {
        padding: 12px 10px;
    }
    
    .forms-format-selector {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .budget-form-link {
        padding: 10px 12px;
    }
}

/* Budget Forms Styles */
.budget-forms-content {
    padding: 20px;
}

.forms-description {
    margin-bottom: 20px;
    font-size: 16px;
    color: #555;
}

.forms-section {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.forms-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.format-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.format-selector label {
    font-weight: bold;
}

.format-selector select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: white;
}

.budget-forms-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.budget-forms-list li {
    margin-bottom: 10px;
}

.budget-form-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.budget-form-link:hover {
    background-color: #f0f0f0;
    border-color: #aaa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.budget-form-link i {
    margin-right: 10px;
    font-size: 18px;
}

.budget-form-link .fa-file-excel-o {
    color: #1D6F42;  /* Excel green color */
}

.budget-form-link .fa-file-pdf-o {
    color: #F40F02;  /* PDF red color */
}

.pdf-format .fa-file-excel-o {
    display: none;
}

.excel-format .fa-file-pdf-o {
    display: none;
}

.budget-forms-list.pdf-format .budget-form-link i.fa-file-excel-o {
    display: none;
}

.budget-forms-list.pdf-format .budget-form-link i.fa-file-pdf-o {
    display: inline-block;
}

.budget-forms-list.excel-format .budget-form-link i.fa-file-pdf-o {
    display: none;
}

.budget-forms-list.excel-format .budget-form-link i.fa-file-excel-o {
    display: inline-block;
}

.generate-all-forms-btn {
    padding: 12px 20px;
    background-color: #006CB7;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.generate-all-forms-btn:hover {
    background-color: #005394;
}

/* Submit Budget Tab Styles */
.submit-budget-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.submit-budget-container h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

.budget-summary-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.summary-item {
    flex: 1;
    min-width: 200px;
    margin: 10px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.summary-label {
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 1.1rem;
    color: #333;
}

.validation-message {
    background-color: #ffebcc; /* Light orange background */
    border-left: 4px solid #ff9800; /* Orange border */
    color: #995c00; /* Dark orange text */
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 5px 5px 0;
    font-weight: 500;
}

.submit-actions {
    margin-top: 30px;
    text-align: center;
}

.submit-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    background-color: #009966;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover:not([disabled]) {
    background-color: #008855;
}

.submit-btn[disabled] {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .budget-summary-info {
        flex-direction: column;
    }
    
    .summary-item {
        min-width: 100%;
        margin: 5px 0;
    }
    
    .submit-btn {
        width: 100%;
    }
}

/* Chapter Resolution Upload Styles */
.chapter-resolution-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 24px 28px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.chapter-resolution-steps {
    margin-bottom: 24px;
    padding-left: 18px;
    color: #222;
    font-size: 1.08rem;
    font-weight: 500;
}
.chapter-resolution-steps li {
    margin-bottom: 10px;
    line-height: 1.6;
}
.resolution-link {
    color: #00bec8;
    text-decoration: underline;
    font-weight: 600;
}
.chapter-resolution-upload-section {
    margin-bottom: 32px;
    padding: 18px 0 0 0;
    border-top: 1px solid #eee;
}
.form-label {
    display: block;
    margin: 18px 0 6px 0;
    font-weight: 600;
    color: #444;
}
.chapter-resolution-upload-section .form-input {
    width: 100%;
    max-width: 100%;
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background: #fafbfc;
}
.upload-files-row {
    margin: 18px 0 10px 0;
}
.upload-files-row .action-button {
    background: #00bec8;
    color: #fff;
    font-weight: 600;
    padding: 8px 22px;
    border-radius: 4px;
    border: none;
    cursor: not-allowed;
    opacity: 0.7;
}
.current-documents-section {
    margin-top: 10px;
    color: #333;
    font-size: 1.04rem;
    font-weight: 500;
}
.current-documents-label {
    font-weight: 600;
    color: #009966;
}
.chapter-resolution-submit-section {
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid #eee;
    font-size: 1.08rem;
    color: #222;
    font-weight: 500;
}
.chapter-resolution-submit-section .step-number {
    display: inline-block;
    background: #00bec8;
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    text-align: center;
    line-height: 28px;
    font-weight: 700;
    margin-right: 10px;
    font-size: 1.1rem;
}
.submit-info-row {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.submit-info-btn {
    background: #00bcd4;
    color: #fff;
    font-weight: 700;
    padding: 10px 32px;
    border-radius: 4px;
    border: none;
    font-size: 1.08rem;
    cursor: not-allowed;
    opacity: 0.7;
}
.already-uploaded-msg {
    color: #444;
    font-size: 1.02rem;
    margin-left: 8px;
}
@media (max-width: 768px) {
    .chapter-resolution-container {
        padding: 12px 4px;
    }
    .submit-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Carry Over Budget Main View Styles */
.carry-over-budget-main-content {
    padding: 20px;
}

.carry-over-main-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

/* Agency Panels */
.main-agency-panels {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.main-agency-panel {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.main-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.main-agency-panel.active .main-panel-header {
    background-color: #e9ecef;
}

.main-panel-header h4 {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

.main-panel-header i {
    transition: transform 0.3s;
}

.main-agency-panel.active .main-panel-header i {
    transform: rotate(180deg);
}

.main-panel-content {
    display: none;
    padding: 15px;
    background-color: #fff;
}

.main-agency-panel.active .main-panel-content {
    display: block;
}

/* Chapter List */
.main-chapter-list {
    width: 100%;
}

.main-chapter-list-header {
    display: grid;
    grid-template-columns: 2fr 3fr 1fr 1fr;
    gap: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    font-weight: bold;
    border-bottom: 2px solid #dee2e6;
}

.main-chapter-list-body {
    display: flex;
    flex-direction: column;
}

.main-chapter-item {
    display: grid;
    grid-template-columns: 2fr 3fr 1fr 1fr;
    gap: 10px;
    padding: 15px 10px;
    border-bottom: 1px solid #dee2e6;
    align-items: center;
}

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

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

.main-chapter-name {
    margin: 0;
    font-size: 1em;
    color: #333;
}

/* Quarter Checkboxes */
.main-quarter-checkboxes {
    display: flex;
    gap: 15px;
    align-items: center;
}

.main-quarter-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.main-quarter-checkbox input[type="checkbox"] {
    margin: 0;
}

.main-quarter-checkbox.select-all {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid #dee2e6;
}

/* Action Buttons */
.main-regenerate-btn {
    padding: 6px 12px;
    background-color: #20c997;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
}

.main-regenerate-btn:hover:not([disabled]) {
    background-color: #15967a;
}

.main-regenerate-btn[disabled] {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Status Styles */
.main-chapter-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    text-align: center;
}

.main-chapter-status.approved {
    background-color: #d4edda;
    color: #155724;
}

.main-chapter-status.missing {
    background-color: #f8d7da;
    color: #721c24;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .main-chapter-list-header,
    .main-chapter-item {
        grid-template-columns: 2fr 2fr 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .carry-over-main-filters {
        flex-direction: column;
        gap: 10px;
    }

    .main-chapter-list-header,
    .main-chapter-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .main-quarter-checkboxes {
        flex-wrap: wrap;
    }

    .main-regenerate-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Filter Group Styles */
.carry-over-main-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.carry-over-main-filters .filter-group label {
    font-weight: bold;
    color: #495057;
}

.carry-over-main-filters .form-input {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    min-width: 200px;
}

.carry-over-main-filters .form-input:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Reports Styles */
.reports-container {
    padding: 20px;
}

.reports-list {
    margin-top: 20px;
}

.report-item {
    margin-bottom: 15px;
}

.report-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.report-link:hover {
    background-color: #e9ecef;
    border-color: #20c997;
    color: #20c997;
}

.report-link i {
    font-size: 1.2em;
    color: #20c997;
}

/* Forms action selector styles */
.forms-action-selector {
    margin-bottom: 20px;
}

.action-toggle-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 450px;
}

.action-toggle-group {
    display: flex;
    border-radius: 4px;
    border: 1px solid #ddd;
    overflow: hidden;
}

.action-toggle-btn {
    flex: 1;
    padding: 10px 12px;
    background-color: #f5f5f5;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-toggle-btn:hover {
    background-color: #e8e8e8;
}

.action-toggle-btn.active {
    background-color: #0099cc;
    color: white;
    font-weight: 600;
}

.action-toggle-btn i {
    font-size: 14px;
}

.action-description {
    font-size: 13px;
    color: #666;
    padding-left: 4px;
}

/* Form preview modal styles */
#form-preview-modal .modal-content {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
}

.form-preview-container {
    position: relative;
    min-height: 400px;
}

.preview-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #666;
}

.preview-loading i {
    margin-right: 8px;
    color: #0099cc;
}

.preview-content {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid #eee;
}

@media (max-width: 768px) {
    .action-toggle-container {
        max-width: 100%;
    }
    
    .action-toggle-btn {
        padding: 8px 5px;
        font-size: 13px;
    }
    
    #form-preview-modal .modal-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .action-button {
        width: 100%;
    }
}

/* Specific styles for allocation method tooltips */
.radio-label.tooltip-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.radio-label.tooltip-wrapper .modern-tooltip {
    white-space: normal;
    text-align: left;
}

.main-forms-content-area {
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-forms-section {
    margin-bottom: 30px;
}

.main-forms-section h5 {
    margin-bottom: 20px;
    color: #333;
}

.main-forms-action-selector {
    margin-bottom: 24px;
}

.main-action-toggle-container {
    background-color: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
}

.main-action-toggle-group {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.main-action-toggle-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.main-action-toggle-btn:hover {
    background-color: #f0f0f0;
}

.main-action-toggle-btn.active {
    background-color: #00bec8;
    color: white;
    border-color: #00bec8;
}

.main-action-toggle-btn i {
    font-size: 14px;
}

.main-action-description {
    color: #666;
    font-size: 14px;
}

.main-budget-forms-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.main-budget-forms-list li {
    margin-bottom: 12px;
}

.main-budget-form-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.main-budget-form-link:hover {
    background-color: #e9ecef;
    transform: translateX(4px);
}

.main-budget-form-link i {
    margin-right: 12px;
    font-size: 18px;
}

.main-generate-all-forms-container {
    margin-top: 24px;
    text-align: center;
}

.main-generate-all-forms-btn {
    padding: 12px 24px;
    background-color: #00bec8;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.main-generate-all-forms-btn:hover {
    background-color: #3bcdc0;
}

/* Preview Modal Styles */
.main-form-preview-container {
    min-height: 400px;
    position: relative;
}

.main-preview-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
}

.main-preview-loading i {
    font-size: 24px;
    margin-bottom: 8px;
}

.main-preview-content {
    display: none;
}

@media (max-width: 768px) {
    .main-action-toggle-container {
        padding: 12px;
    }
    
    .main-action-toggle-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .main-generate-all-forms-btn {
        width: 100%;
    }
}

.funding-validation-message {
    color: #d9534f;
    font-size: 14px;
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}

.funding-validation-message.error-message {
    font-weight: 500;
}

/* Funding Sources Section */
.funding-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
}

.funding-sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.funding-source-item {
    background: #f5f5f5;
    border-radius: 4px;
    padding: 0.75rem;
}

.funding-source-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.funding-source-number {
    font-weight: bold;
    color: #666;
}

.funding-source-name {
    color: #333;
}

/* Selected Sources */
.selected-funding-sources {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.selected-sources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.selected-source-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #e9ecef;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.875rem;
}

.remove-source {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0;
    font-size: 1.25rem;
    line-height: 1;
}

.remove-source:hover {
    color: #dc3545;
}

/* Allocation Section */
.allocation-section {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 1.5rem;
}

.allocation-section.show-allocation {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    z-index: auto !important;
}

.allocation-instructions {
    margin-bottom: 1rem;
    color: #666;
}

.allocation-table {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.allocation-table-header {
    display: grid;
    grid-template-columns: 1fr 2fr;
    background: #e9ecef;
    padding: 0.75rem;
    font-weight: bold;
}

.allocation-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    align-items: center;
}

.allocation-row:first-child {
    border-top: none;
}

.allocation-amount input {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.allocation-source {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.allocation-source-number {
    font-weight: bold;
    color: #666;
}

.allocation-validation-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    background: #fff3cd;
    color: #856404;
}

/* Unallocated Funds Display */
.unallocated-funds-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #e9ecef;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.unallocated-funds-label {
    font-weight: bold;
    color: #495057;
}

.unallocated-funds-amount {
    color: #0d6efd;
    font-weight: bold;
}

/* CSV Upload Styles */
.csv-upload-section {
    margin-bottom: 1.5rem;
}

.csv-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.csv-upload-btn:hover {
    background-color: #0056b3;
}

.csv-upload-btn i {
    font-size: 1rem;
}

#csv-upload-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#csv-upload-modal.active {
    display: block;
}

#csv-upload-modal .modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#csv-upload-modal .modal-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#csv-upload-modal .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

#csv-upload-modal .close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
}

#csv-upload-modal .modal-body {
    padding: 1.5rem;
}

.upload-instructions {
    margin-bottom: 1.5rem;
}

.upload-instructions h4 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.upload-instructions ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #6c757d;
}

.file-upload-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    text-align: center;
}

.file-info {
    margin-top: 0.5rem;
    color: #6c757d;
}

.upload-preview {
    margin-top: 1.5rem;
}

.upload-preview h4 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.preview-table-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
}

.preview-table th,
.preview-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
}

.preview-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

#csv-upload-modal .modal-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    text-align: right;
}

#csv-upload-modal .modal-footer button {
    margin-left: 0.5rem;
}

#csv-upload-modal .upload-csv-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}
