* {
    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: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

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

.tab {
    flex: 1;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    border: none;
    background: none;
    font-size: 1em;
}

.tab:hover {
    background: #e0e0e0;
}

.tab.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.tab-content {
    display: none;
    padding: 40px;
}

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

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 10px;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

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

.results-container.show {
    display: block;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.results-table th {
    background: #667eea;
    color: white;
    padding: 15px;
    text-align: left;
}

.results-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

.results-table tr:hover {
    background: #f5f5f5;
}

.progress-container {
    display: none;
    margin-top: 20px;
}

.progress-container.show {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.status-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
}

.file-upload {
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
}

.file-upload.dragover {
    background: #e8e8ff;
}

.help-text {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.85em;
}

.badge-in-custody {
    background: #dc3545;
    color: white;
}

/* Name Format Toggle Styles */
.name-format-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 30px;
    border-bottom: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.format-label {
    font-weight: 600;
    color: #495057;
    font-size: 1.05em;
}

.format-options {
    display: flex;
    gap: 25px;
    align-items: center;
}

.format-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 8px;
    background: white;
    border: 2px solid #dee2e6;
    transition: all 0.3s;
    position: relative;
}

.format-option:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.format-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.format-option input[type="radio"]:checked + .format-text {
    color: #667eea;
    font-weight: 600;
}

.format-option:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f3ff 0%, #e8ecff 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.format-text {
    font-size: 1em;
    color: #495057;
    transition: all 0.3s;
}

.format-example {
    font-size: 0.85em;
    color: #6c757d;
    font-style: italic;
    margin-left: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .name-format-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .format-options {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .format-option {
        width: 100%;
        justify-content: center;
    }
}

/* Existing toggle styles remain unchanged */

/* Toggle switch styles */
.toggle-container {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.toggle-label {
    font-weight: 600;
    color: #333;
    margin-right: 15px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #667eea;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-description {
    margin-left: 15px;
    color: #666;
    font-size: 0.9em;
}

/* Badge styles for released inmates */
.badge-released {
    background: #6c757d;
    color: white;
}

/* Not found row styling */
.not-found-row {
    background-color: #f8f9fa;
    font-style: italic;
}

.not-found-row td {
    color: #6c757d;
}

/* Section divider for not found results */
.results-divider {
    margin: 20px 0;
    padding: 10px;
    background: #e9ecef;
    border-left: 4px solid #6c757d;
    font-weight: 600;
    color: #495057;
}
