/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 {
    font-size: 2.5rem;
    font-weight: 300;
}

h2 {
    font-size: 1.8rem;
    font-weight: 400;
}

h3 {
    font-size: 1.4rem;
    font-weight: 500;
}

/* Government-style Form Styles */
.form-header {
    text-align: left;
    margin-bottom: 1rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 0;
    box-shadow: none;
    font-size: 0.9rem;
    line-height: 1.4;
}

.form-section {
    background: white;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0;
    box-shadow: none;
}

.form-section h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.25rem;
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.required {
    color: #dc3545;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0;
    font-size: 0.9rem;
    transition: border-color 0.15s ease-in-out;
    background-color: #fff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

input[type="file"] {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 0;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 0.9rem;
}

input[type="file"]:hover {
    border-color: #007bff;
    background: #e9ecef;
}

textarea {
    resize: vertical;
    min-height: 60px;
}

.upload-note {
    background: #e8f4fd;
    padding: 0.5rem 0.75rem;
    border-radius: 0;
    margin-bottom: 0.75rem;
    border-left: 3px solid #007bff;
    font-size: 0.85rem;
}

/* Government-style Button Styles */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-align: center;
}

.btn-primary {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    border-color: #545b62;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #dee2e6;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: #27ae60;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: #e74c3c;
    color: #721c24;
}

/* Government-style Admin Styles */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 1rem;
    border-left: 4px solid #007bff;
}

.admin-header h1 {
    font-size: 1.4rem;
    color: #495057;
    margin: 0;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.login-container {
    max-width: 350px;
    margin: 3rem auto;
    background: white;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0;
    box-shadow: none;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: #495057;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

/* Government-style Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: white;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
    border-left: 3px solid #6c757d;
}

.stat-card.pending {
    border-left-color: #ffc107;
}

.stat-card.approved {
    border-left-color: #28a745;
}

.stat-card.rejected {
    border-left-color: #dc3545;
}

.stat-card h3 {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #495057;
    margin-top: 0.25rem;
}

/* Government-style Table Styles */
.admin-section {
    background: white;
    padding: 1rem 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0.75rem;
}

.admin-section h2 {
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.25rem;
}

.table-container {
    overflow-x: auto;
    border: 1px solid #dee2e6;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Government-style Status Badges */
.status {
    padding: 0.2rem 0.5rem;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border-color: #ffc107;
}

.status-approved {
    background: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

/* Government-style KYC Details */
.kyc-details {
    background: white;
    padding: 1rem 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0;
    box-shadow: none;
}

.details-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.details-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.details-section h2 {
    font-size: 1rem;
    color: #495057;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.25rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
}

.detail-item label {
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.125rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    color: #495057;
    font-size: 0.9rem;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.status-dates {
    font-size: 0.8rem;
    color: #6c757d;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}

.document-item {
    background: #f8f9fa;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0;
    text-align: center;
}

.document-item h4 {
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

.action-form {
    background: #f8f9fa;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0;
}

.action-buttons {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0;
}

.admin-actions {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.remarks {
    background: #f8f9fa;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0;
    border-left: 3px solid #007bff;
    font-size: 0.9rem;
}

/* Government-style API Management */
.api-management {
    text-align: center;
    padding: 1rem;
}

.generate-key-form {
    text-align: center;
    margin-bottom: 1rem;
}

.api-docs {
    background: #f8f9fa;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.api-docs h3 {
    font-size: 1rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

.api-docs h4 {
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.25rem;
}

.api-docs pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 0.75rem;
    border-radius: 0;
    overflow-x: auto;
    margin: 0.5rem 0;
    font-size: 0.8rem;
}

.api-docs code {
    padding: 0.125rem 0.25rem;
    border-radius: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .form-section {
        padding: 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* File Upload Styling */
.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 2rem;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

.file-upload-area.dragover {
    border-color: #27ae60;
    background: #d4edda;
}

/* Government-style CAPTCHA */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.captcha-container input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0;
    font-size: 0.9rem;
}

.captcha-container button {
    color: #495057;
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    font-size: 0.9rem;
}

.captcha-container button:hover {
    background: #e9ecef;
    border-color: #007bff;
}

/* Print Styles */
@media print {
    .btn, .form-actions, .admin-info {
        display: none;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .form-section, .admin-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
