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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

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

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.tab {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
}

.tab:hover {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
}

.tab.active {
    background: #4facfe;
    color: white;
    transform: translateY(-2px);
}

.tab-content {
    display: none;
    padding: 30px;
    min-height: 500px;
}

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

.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #4facfe;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.btn-success {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #868e96 0%, #495057 100%);
}

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

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

th {
    background: #4facfe;
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f8f9fa;
}

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

.search-container input {
    width: 300px;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    background: white;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.hidden {
    display: none;
}

.multi-challan {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #2196f3;
}

.challan-entry {
    display: flex;
    gap: 15px;
    align-items: end;
    margin-bottom: 10px;
}

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

.summary-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.summary-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4facfe;
}

.summary-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 5px;
}

.challan-checkbox {
    margin-right: 10px;
}

.challan-option {
    background: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.challan-option:hover {
    background: #f8f9fa;
}

.challan-option label {
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
}

.challan-details {
    margin-left: 10px;
    flex: 1;
}

.challan-number {
    font-weight: bold;
    color: #4facfe;
}

.challan-date {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Column width adjustments for View Records tables */
#deposit-records-table th:nth-child(1), #deposit-records-table td:nth-child(1) { width: 6%; } /* Sl. No. */
#deposit-records-table th:nth-child(2), #deposit-records-table td:nth-child(2) { width: 20%; } /* Agency Name */
#deposit-records-table th:nth-child(3), #deposit-records-table td:nth-child(3) { width: 15%; } /* Tender No. */
#deposit-records-table th:nth-child(4), #deposit-records-table td:nth-child(4) { width: 10%; } /* Bill Type */
#deposit-records-table th:nth-child(5), #deposit-records-table td:nth-child(5) { width: 8%; } /* Type */
#deposit-records-table th:nth-child(6), #deposit-records-table td:nth-child(6) { width: 10%; } /* TV Number */
#deposit-records-table th:nth-child(7), #deposit-records-table td:nth-child(7) { width: 12%; } /* Treasury Challan No. */
#deposit-records-table th:nth-child(8), #deposit-records-table td:nth-child(8) { width: 10%; white-space: nowrap; } /* Challan Date */
#deposit-records-table th:nth-child(9), #deposit-records-table td:nth-child(9) { width: 10%; } /* Amount */
#deposit-records-table th:nth-child(10), #deposit-records-table td:nth-child(10) { width: 15%; } /* Actions */

/* Payment records table column widths */
#payment-records-table th:nth-child(1), #payment-records-table td:nth-child(1) { width: 8%; } /* Sl. No. */
#payment-records-table th:nth-child(2), #payment-records-table td:nth-child(2) { width: 20%; } /* Agency Name */
#payment-records-table th:nth-child(3), #payment-records-table td:nth-child(3) { width: 12%; } /* Tender No. */
#payment-records-table th:nth-child(4), #payment-records-table td:nth-child(4) { width: 12%; } /* Treasury Challan No. */
#payment-records-table th:nth-child(5), #payment-records-table td:nth-child(5) { width: 12%; white-space: nowrap; } /* Challan Date - more space */
#payment-records-table th:nth-child(6), #payment-records-table td:nth-child(6) { width: 10%; } /* Amount */
#payment-records-table th:nth-child(7), #payment-records-table td:nth-child(7) { width: 10%; } /* TV Number */
#payment-records-table th:nth-child(8), #payment-records-table td:nth-child(8) { width: 12%; white-space: nowrap; } /* TV Date */
#payment-records-table th:nth-child(9), #payment-records-table td:nth-child(9) { width: 14%; } /* Actions */

@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .container {
        margin: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }

    /* Reset column widths for mobile */
    #deposit-records-table th, #deposit-records-table td,
    #payment-records-table th, #payment-records-table td {
        width: auto !important;
        white-space: normal !important;
        min-width: 80px;
    }
}

/* Authentication Section Styles */
.auth-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.auth-header h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

.user-status {
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #e9ecef;
}

.auth-status-message {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
}

.auth-status-message.success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.auth-status-message.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.auth-status-message.info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Animation for status messages */
.auth-status-message {
    animation: statusFadeIn 0.3s ease-in-out;
}

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

/* Loading animation for buttons */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.auth-forms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    background: white;
}

.auth-form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-form-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.auth-form-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}

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

.auth-form-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.auth-form-section input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-form-section input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.auth-form-section .btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-form-section .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.auth-form-section .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.auth-form-section .btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.auth-form-section .btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.link-status {
    margin-top: 10px;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    min-height: 20px;
}

.logout-section {
    padding: 20px;
    background: white;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.logout-section .btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logout-section .btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
}

.logout-section .btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(238, 90, 36, 0.3);
}

/* Responsive Design for Auth Section */
@media (max-width: 768px) {
    .auth-forms {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 15px;
    }
    
    .auth-form-section {
        padding: 15px;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .auth-header p {
        font-size: 0.9rem;
    }
}

/* Authentication Status Messages */
.auth-status-message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.auth-status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.auth-status-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}