* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Scrollbar Styling - 20% of original width */
::-webkit-scrollbar {
    width: 3px; /* Reduced from default ~15px to 3px (20%) */
    height: 3px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Firefox scrollbar styling */
* {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* Add margin to scrollable content to prevent overlap */
.table-container,
.chart-container,
.dashboard-card,
.modal,
.recent-bids,
.interest-trends {
    margin-right: 8px; /* Space for scrollbar + padding */
    padding-right: 4px; /* Additional padding for content */
}

/* Specific spacing for different container types */
.table-container {
    margin-right: 10px;
    padding-right: 6px;
}

.chart-container {
    margin-right: 8px;
    padding-right: 4px;
}

.dashboard-card {
    margin-right: 6px;
    padding-right: 3px;
}

.modal {
    margin-right: 8px;
    padding-right: 4px;
}

/* Table specific spacing */
.table-container table {
    margin-right: 0;
    padding-right: 0;
}

.table-container th,
.table-container td {
    padding-right: 8px; /* Extra padding for last column */
}

/* Chart specific spacing */
.chart-container canvas {
    margin-right: 4px;
}

/* Modal content spacing */
.modal-content {
    margin-right: 4px;
    padding-right: 8px;
}

/* Centralized Chart Content Styling */
.chart-content {
    margin-right: 8px;
    padding-right: 4px;
    overflow-x: auto;
}

.chart-item {
    margin-right: 4px;
    padding-right: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.chart-item-info {
    margin-right: 4px;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chart-item-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.chart-item-subtitle {
    font-size: 0.8rem;
    color: #6c757d;
}

.chart-item-value {
    margin-right: 4px;
    padding-right: 4px;
    font-weight: 700;
    color: #28a745;
    font-size: 1rem;
}

/* Recent Bids Specific Styling */
.recent-bids-list {
    margin-right: 8px;
    padding-right: 4px;
    overflow-x: auto;
}

.bid-item {
    margin-right: 4px;
    padding-right: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.bid-info {
    margin-right: 4px;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bid-member {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.bid-date {
    font-size: 0.8rem;
    color: #6c757d;
}

.bid-amount {
    margin-right: 4px;
    padding-right: 4px;
    font-weight: 700;
    color: #28a745;
    font-size: 1rem;
}

/* Interest Trends Specific Styling */
.interest-trends {
    margin-right: 8px;
    padding-right: 4px;
    overflow-x: auto;
}

.trend-item {
    margin-right: 4px;
    padding-right: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #ffc107;
}

.member-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.trend-values {
    margin-right: 4px;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-end;
}

.simple-interest {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.compound-interest {
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 600;
}

/* Chart card specific spacing */
.chart-card {
    margin-right: 8px;
    padding-right: 4px;
}

.chart-card h3 {
    margin-right: 4px;
    padding-right: 4px;
}

#recentBidsChart,
#interestTrendsChart {
    margin-right: 6px;
    padding-right: 4px;
}

/* Table container scrollbars */
.table-container::-webkit-scrollbar {
    width: 2px;
    height: 2px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 1px;
}

.table-container::-webkit-scrollbar-track {
    background: #f8f9fa;
}

/* Modal scrollbars */
.modal::-webkit-scrollbar {
    width: 2px;
    height: 2px;
}

.modal::-webkit-scrollbar-thumb {
    background: #495057;
    border-radius: 1px;
}

/* Chart and dashboard scrollbars */
.dashboard-card::-webkit-scrollbar,
.chart-container::-webkit-scrollbar {
    width: 2px;
    height: 2px;
}

.dashboard-card::-webkit-scrollbar-thumb,
.chart-container::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 1px;
}

.dashboard-card::-webkit-scrollbar-track,
.chart-container::-webkit-scrollbar-track {
    background: rgba(0, 123, 255, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.chit-info {
    margin-bottom: 30px;
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.info-card h3 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.info-item .label {
    font-weight: 600;
    color: #4a5568;
}

.info-item .value {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.1rem;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.left-panel, .right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bid-calculator, .previous-bids, .statistics, .add-bid-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.bid-calculator h3, .previous-bids h3, .statistics h3, .add-bid-section h3 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.input-group, .form-group {
    margin-bottom: 20px;
}

.input-group label, .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.input-group input, .input-group select, .form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus, .input-group select:focus, .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary, .btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-secondary {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.results {
    margin-top: 25px;
    display: none;
}

.results.show {
    display: block;
}

.result-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.result-card h4 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.result-item span:first-child {
    font-weight: 600;
    color: #4a5568;
}

.result-item span:last-child {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.1rem;
}

.suggestions {
    background: #fff5f5;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #f56565;
}

.suggestions h4 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #fed7d7;
}

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

.suggestion-label {
    font-weight: 600;
    color: #4a5568;
}

.suggestion-value {
    font-weight: 700;
    color: #e53e3e;
    font-size: 1.1rem;
}

.bids-table-wrapper {
    margin-bottom: 20px;
    width: 100%;
}

.bids-table-container {
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    padding: 0;
    position: relative;
    z-index: 1;
}

.bids-table-container.centered {
    display: flex;
    justify-content: center;
    overflow: visible;
}

.bids-table {
    width: max-content;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    transition: all 0.3s ease;
    min-width: auto;
    margin: 0 auto;
}

.bids-table.compact {
    width: auto;
    margin: 0 auto;
}

.bids-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.bids-table th:first-child {
    border-top-left-radius: 12px;
}

.bids-table th:last-child {
    border-top-right-radius: 12px;
}

.bids-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.bids-table td:last-child {
    text-align: right;
    padding-right: 15px;
    white-space: nowrap;
}

.bids-table td:last-child .btn {
    width: 34px;
    height: 34px;
    padding: 4px;
    font-size: 0.85rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 3px;
}

.bids-table td:last-child .btn i {
    margin: 0;
    font-size: 0.8rem;
}

.bids-table tbody tr {
    transition: all 0.2s ease;
}

.bids-table tbody tr:hover {
    background: #f8faff;
    transform: scale(1.001);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 18px;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #48bb78;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.2);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 5px;
    font-weight: 600;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
}

.add-bid-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.add-bid-form .form-group {
    margin-bottom: 0;
}

.add-bid-form button {
    height: fit-content;
    padding: 12px 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .add-bid-form {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .bids-table th,
    .bids-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
}

/* Animation for results */
.results {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Loading state */
.btn-primary:disabled, .btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success/Error states */
.success {
    color: #48bb78;
    font-weight: 600;
}

.error {
    color: #e53e3e;
    font-weight: 600;
}

/* Custom scrollbar */
.bids-table-container::-webkit-scrollbar {
    height: 6px;
}

.bids-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.bids-table-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.bids-table-container::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

/* Bid Details Styling */
.bid-details {
    background: #f0f8ff;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid #2196F3;
}

.bid-details h4 {
    color: #1976d2;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 8px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e3f2fd;
}

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

.detail-item span:first-child {
    font-weight: 600;
    color: #424242;
}

.detail-item span:last-child {
    font-weight: 700;
    color: #1976d2;
    font-size: 1.1rem;
}

.detail-item.highlight {
    background: #e3f2fd;
    padding: 12px;
    border-radius: 6px;
    margin-top: 8px;
    border: 2px solid #2196F3;
}

.detail-item.highlight span:last-child {
    color: #d32f2f;
    font-size: 1.3rem;
}

/* Bid Trend Styling */
.bid-trend {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid #28a745;
}

.bid-trend h4 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #d4edda;
    padding-bottom: 8px;
}

.trend-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.trend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.trend-item span:first-child {
    font-weight: 600;
    color: #495057;
}

.trend-item span:last-child {
    font-weight: 700;
    color: #28a745;
    font-size: 1.1rem;
}

/* Double Chits Analysis Styling */
.double-chits-analysis {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.double-chits-analysis h3 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.double-chits-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #ff6b35;
}

.summary-label {
    display: block;
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 5px;
    font-weight: 600;
}

.summary-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b35;
}

.double-chits-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.double-chit-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #ff6b35;
}

.double-chit-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.double-chit-date strong {
    color: #2d3748;
    font-size: 1.1rem;
}

.bid-count {
    background: #ff6b35;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.double-chit-amounts {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.double-chit-amounts span {
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    color: #2d3748;
    border: 1px solid #e2e8f0;
}

.double-chit-bids {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.bid-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.bid-item span:first-child {
    font-weight: 600;
    color: #2d3748;
}

.member-name {
    font-size: 0.9rem;
    color: #718096;
    font-style: italic;
}

/* Responsive Design for Double Chits */
@media (max-width: 768px) {
    .double-chits-summary {
        grid-template-columns: 1fr;
    }
    
    .double-chit-amounts {
        flex-direction: column;
        gap: 10px;
    }
    
    .double-chit-bids {
        grid-template-columns: 1fr;
    }
    
    .bid-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Chit Management Styling */
.chit-management {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
}

.chit-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.chit-selector label {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.chit-selector select {
    padding: 10px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    min-width: 250px;
}

.chit-selector select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* Member Management Styling */
.member-management {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.member-management h3 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.member-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.member-list {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.member-item:last-child {
    margin-bottom: 0;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.member-phone {
    color: #718096;
    font-size: 0.9rem;
}

.member-actions-btns {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit {
    background: #2196F3;
    color: white;
}

.btn-delete {
    background: #f44336;
    color: white;
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

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

.modal-header h3 {
    margin: 0;
    color: #4a5568;
    font-size: 1.5rem;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: #000;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

/* Form Styling in Modal */
.modal .form-group {
    margin-bottom: 20px;
}

.modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.modal .form-group input,
.modal .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.modal .form-group input:focus,
.modal .form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Responsive Design for New Elements */
@media (max-width: 768px) {
    .chit-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .chit-selector select {
        min-width: auto;
        width: 100%;
    }
    
    .member-actions {
        flex-direction: column;
    }
    
    .member-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .member-actions-btns {
        justify-content: center;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
}

/* Interest Analysis Styles */
.interest-analysis {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.interest-analysis h3 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.interest-controls {
    margin-bottom: 20px;
}

.interest-controls .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

.interest-content {
    margin-top: 20px;
}

.interest-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.summary-label {
    font-weight: 600;
    color: #495057;
}

.summary-value {
    font-weight: 700;
    color: #007bff;
}

.summary-value.positive {
    color: #28a745;
}

.summary-value.negative {
    color: #dc3545;
}

.member-analysis-table, .monthly-breakdown {
    margin-top: 20px;
}

.analysis-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.analysis-table th,
.analysis-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

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

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

.analysis-table .positive {
    color: #28a745;
    font-weight: 600;
}

.analysis-table .negative {
    color: #dc3545;
    font-weight: 600;
}

.member-selection {
    max-height: 300px;
    overflow-y: auto;
}

.member-option {
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.member-option:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.member-option strong {
    color: #007bff;
}

.member-option small {
    color: #6c757d;
}

/* Table Copy Button Styles */
.table-copy-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    z-index: 10;
}

.table-copy-btn {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 150px;
}

.table-copy-btn:hover:not(:disabled) {
    background: #45b8b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.table-copy-btn:active:not(:disabled) {
    transform: translateY(0);
}

.table-copy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.table-copy-text-btn {
    background: #4ecdc4;
}

.table-copy-text-btn:hover:not(:disabled) {
    background: #45b8b0;
}

.table-copy-image-btn {
    background: #667eea;
}

.table-copy-image-btn:hover:not(:disabled) {
    background: #5568d3;
}

.table-copy-btn.copied {
    background: #28a745 !important;
}

.table-copy-btn.copied:hover {
    background: #218838 !important;
}

.table-copy-btn.error {
    background: #dc3545 !important;
}

.table-copy-btn.error:hover {
    background: #c82333 !important;
}

.table-copy-btn i {
    font-size: 14px;
}

/* Column Manager Styles */
.column-toggle-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    margin-right: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.column-toggle-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.column-toggle-btn:active {
    transform: translateY(0);
}

.column-menu {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    overflow: hidden;
    z-index: 100;
    border: 1px solid #e9ecef;
    position: relative;
}

.column-menu-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-menu-body {
    padding: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.column-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.column-menu-item:hover {
    background: #f8f9fa;
}

.column-menu-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.column-menu-item span {
    flex: 1;
    font-size: 14px;
    color: #2c3e50;
}

/* Table container adjustments for centered layout */
.previous-bids-wrapper {
    margin-bottom: 20px;
    width: 100%;
}

.previous-bids-table-container {
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.previous-bids-table-container.centered {
    display: flex;
    justify-content: center;
    overflow: visible;
    padding: 15px;
}

.previous-bids-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    transition: all 0.3s ease;
    min-width: 600px;
    margin: 0 auto;
}

.previous-bids-table th:first-child {
    border-top-left-radius: 12px;
}

.previous-bids-table th:last-child {
    border-top-right-radius: 12px;
}

.previous-bids-table.compact {
    width: auto;
    margin: 0 auto;
}

/* Table controls wrapper */
.table-controls-wrapper {
    position: relative;
    z-index: 20;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}