/* ==========================================================================
   Accountant Dashboard Styles
   Version: 4.2.0 (New Layout & UI Fixes)
   ========================================================================== */

.cig-accountant-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 1300px; /* Increased width for new columns */
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

/* Header & Filters */
.cig-accountant-header h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
    font-weight: 700;
}

.cig-acc-filters-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

/* Filter Lines (Rows) */
.cig-filter-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cig-filter-line.second-line {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Search */
.cig-acc-search-group {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.cig-acc-search-group input {
    width: 100%;
    height: 40px;
    padding-left: 35px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.cig-acc-search-group .dashicons {
    position: absolute;
    right: 10px;
    top: 10px;
    color: #999;
}

/* Date Controls (Grouped) */
.cig-date-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Quick Filters */
.cig-quick-filters {
    display: flex;
    gap: 5px;
}

.cig-qf-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 6px 15px;
    font-size: 13px;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
    font-weight: 500;
}

.cig-qf-btn:hover {
    background: #e0e0e0;
}

.cig-qf-btn.active {
    background: #50529d;
    color: #fff;
    border-color: #50529d;
}

/* Date Inputs */
.cig-date-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cig-acc-date {
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 0 10px;
    width: 140px;
}

/* Dropdown Wrapper */
.cig-dropdown-wrap {
    flex: 0 0 auto;
    min-width: 280px;
}

.cig-acc-select {
    width: 100%;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 0 10px;
    font-weight: 600;
    color: #333;
    background-color: #fff;
}

/* Completion Toggles */
.cig-toggle-group {
    display: inline-flex;
    background: #f0f0f1;
    border-radius: 6px;
    padding: 4px;
    border: 1px solid #ddd;
    margin-left: auto;
}

.cig-toggle-btn {
    padding: 8px 18px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    user-select: none;
    font-weight: 600;
    margin: 0;
}

.cig-toggle-btn input {
    display: none;
}

.cig-toggle-btn.active {
    background: #50529d;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cig-toggle-btn:hover:not(.active) {
    background: #e0e0e0;
    color: #333;
}


/* Table */
.cig-acc-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 13px;
}

.cig-acc-table th {
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    padding: 12px;
    border-bottom: 2px solid #eee;
    white-space: nowrap;
}

.cig-acc-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    color: #333;
}

.cig-acc-table tr:hover td {
    background-color: #fcfcfc;
}

/* Checkboxes */
.cig-status-chk {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #50529d; /* Custom color for checked state */
    margin: 0;
    display: inline-block;
    vertical-align: middle;
}

/* Icons */
.cig-note-wrapper {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.cig-note-icon {
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 1;
}

.cig-note-icon:hover {
    transform: scale(1.2);
}

/* Modals */
.cig-modal {
    display: none; 
    position: fixed; 
    z-index: 10000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
    backdrop-filter: blur(2px);
}

.cig-modal-content {
    background-color: #fefefe;
    margin: 8% auto; 
    padding: 30px;
    border: 1px solid #888;
    width: 550px; 
    max-width: 90%;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: cigFadeIn 0.3s;
}

@keyframes cigFadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.cig-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.cig-modal-close:hover {
    color: #333;
}

/* Buttons inside Modal */
.cig-modal .button-primary {
    background: #50529d;
    border-color: #50529d;
    font-size: 14px;
    padding: 5px 20px;
    height: auto;
}

.cig-modal .button-primary:hover {
    background: #404285;
}

/* Pagination */
.cig-acc-pagination {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.cig-acc-page-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
}

.cig-acc-page-btn:hover {
    border-color: #50529d;
    color: #50529d;
}

/* Responsive */
@media (max-width: 900px) {
    .cig-filter-line {
        flex-direction: column;
        align-items: stretch;
    }
    .cig-date-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .cig-quick-filters {
        justify-content: center;
    }
    .cig-acc-table-container {
        overflow-x: auto;
    }
}