/* Settle Container */
.settle-container {
    min-height: 100vh;
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* Tab Navigation */
.settle-tabs {
    display: flex;
    background: #fff;
    border-bottom: 2px solid #e0e0e0;
    padding: 0 20px;
    gap: 5px;
}

.settle-tab {
    padding: 15px 30px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.settle-tab:hover {
    color: #0066cc;
    background: #f8f9fa;
}

.settle-tab.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
    background: #fff;
}

/* Tab Content */
.tab-content {
    padding: 20px;
}

.settle-tab-content {
    display: none;
}

.settle-tab-content.active {
    display: block;
}

/* Search Section */
.search-section {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.subsection-title {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin: 0 0 15px;
}

/* Search Form */
.settle-search-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: end;
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-button-field {
    justify-content: flex-end;
}

.search-label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #fff;
}

.search-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.btn {
    padding: 9px 24px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.btn-search {
    background: #0066cc;
    color: #fff;
}

.btn-search:hover {
    background: #0052a3;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.btn-search:active {
    transform: translateY(1px);
}

/* Results Section */
.results-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* Table */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.settle-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.settle-table thead {
    background: #f5f5f5;
}

.settle-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
    font-size: 12px;
}

.settle-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #555;
}

.settle-table tbody tr:hover {
    background: #f8f9fa;
}

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

.no-data-row {
    background: transparent !important;
}

.no-data-cell {
    text-align: center;
    padding: 40px 20px !important;
    color: #999;
    font-size: 14px;
    font-weight: 500;
}

.checkbox-col {
    width: 40px;
    text-align: center;
}

.row-checkbox {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.conf-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.conf-link:hover {
    text-decoration: underline;
}

.btn-icon {
    background: #0066cc;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #0052a3;
    transform: scale(1.05);
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
}

.page-selector {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.pagination-buttons {
    display: flex;
    gap: 15px;
}

.pagination-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.pagination-link:hover {
    color: #0052a3;
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
}

.empty-state p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-done {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-unpaid {
    background: #ffebee;
    color: #c62828;
}

.status-paid {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .search-row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .settle-tabs {
        overflow-x: auto;
        padding: 0 10px;
    }
    
    .settle-tab {
        padding: 12px 20px;
        white-space: nowrap;
    }
    
    .tab-content {
        padding: 10px;
    }
    
    .search-section,
    .results-section {
        padding: 15px;
    }
    
    .search-row {
        grid-template-columns: 1fr;
    }
    
    .settle-table {
        font-size: 11px;
    }
    
    .settle-table th,
    .settle-table td {
        padding: 8px 6px;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .pagination-info,
    .pagination-buttons {
        justify-content: center;
    }
}

/* Scrollbar Styling */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}