:root {
    --primary: #3498db;
    --secondary: #2c3e50;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --light: #f8f9fa;
    --dark: #343a40;
}

body {
    background: #f5f7fa;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

.application-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin: 30px 0;
}

.sidebar {
    background: #f8fafc;
    padding: 30px 20px;
    border-right: 1px solid #eaeef2;
    height: 100%;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeef2;
}

.sidebar-header h3 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 5px;
}

.sidebar-header p {
    color: #6c757d;
    font-size: 0.9rem;
}

.step-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    color: #6c757d;
}

.step-item.active {
    background: rgba(52, 152, 219, 0.12);
    color: var(--primary);
    font-weight: 600;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #e9ecef;
    color: #6c757d;
    border-radius: 50%;
    margin-right: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.step-item.active .step-number {
    background: var(--primary);
    color: white;
}

.step-item.completed .step-number {
    background: var(--success);
    color: white;
}

.step-item.completed .step-number:after {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.8rem;
}

.step-content {
    padding: 30px 40px;
    min-height: 600px;
}

.step-title {
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 5px;
}

.step-subtitle {
    color: #6c757d;
    margin-bottom: 25px;
    font-size: 1rem;
}

.form-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    border-left: 4px solid var(--primary);
}

.form-section h5 {
    color: var(--secondary);
    margin-bottom: 20px;
    font-weight: 600;
}

.form-control {
    border-radius: 6px;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.btn-success {
  background-color: var(--success);
  border-color: var(--success);
  padding: 10px 30px;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-success:hover {
  background-color: #27ae60;
  border-color: #27ae60;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    padding: 10px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    padding: 10px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eaeef2;
}

.save-progress {
    background: #f8f9fa;
    padding: 15px;
    text-align: center;
    border-top: 1px solid #eaeef2;
}

.confirmation-icon {
    font-size: 80px;
    color: var(--success);
    margin: 20px 0;
}

.application-step {
    display: none;
}

.application-step.active {
    display: block;
}

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(52, 152, 219, 0.05);
}

.upload-icon {
    font-size: 40px;
    color: #6c757d;
    margin-bottom: 15px;
}

.map-container {
    height: 300px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
}

.map-placeholder {
    text-align: center;
    color: #6c757d;
}

.map-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.option-card {
    border: 2px solid #eaeef2;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.option-card.selected {
    border-color: var(--primary);
    background: rgba(52, 152, 219, 0.05);
}

.option-icon {
    font-size: 30px;
    color: var(--primary);
    margin-bottom: 10px;
}

.info-alert {
    background: #e8f4fd;
    border-left: 4px solid var(--primary);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.validation-error {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
}

.form-control.error {
    border-color: #e74c3c;
}

/* Additional styles from index.html */
.card {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
    transition: transform 0.3s ease;
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background: var(--primary);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    padding: 20px;
    text-align: center;
}

/* Cards with nav-tabs need visible overflow for tab text */

/* Card header nav tabs are now using btn classes — no custom overrides needed */

.application-type,
.service-type {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.application-type:hover,
.service-type:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.application-type.active,
.service-type.active {
    border: 2px solid var(--primary);
    background-color: rgba(52, 152, 219, 0.05);
}

.document-upload,
.legacy-upload {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.document-upload:hover,
.legacy-upload:hover {
    border-color: var(--primary);
    background-color: rgba(52, 152, 219, 0.05);
}

.document-upload.mandatory,
.legacy-upload.mandatory {
    border-color: var(--danger);
    background-color: rgba(231, 76, 60, 0.05);
}

.document-upload.mandatory:hover,
.legacy-upload.mandatory:hover {
    border-color: var(--danger);
    background-color: rgba(231, 76, 60, 0.1);
}

.document-upload.optional,
.legacy-upload.optional {
    border-color: var(--warning);
    background-color: rgba(243, 156, 18, 0.05);
}

.document-upload.optional:hover,
.legacy-upload.optional:hover {
    border-color: var(--warning);
    background-color: rgba(243, 156, 18, 0.1);
}

.badge-mandatory {
    background-color: var(--danger);
}

.badge-optional {
    background-color: var(--warning);
}

.file-preview-container {
    width: 120px;
    /* Slightly wider for better text display */
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 10px;
    position: relative;
    overflow: hidden;
    /* Ensure content doesn't overflow */
}

/* File name text styling */
.file-preview-container p.small {
    width: 100%;
    /* Take full width of container */
    margin: 5px 0;
    font-size: 0.75rem !important;
    /* Slightly smaller font */
    white-space: nowrap;
    /* Prevent line breaks */
    overflow: hidden;
    /* Hide overflow */
    text-overflow: ellipsis;
    /* Show ellipsis for overflow */
    text-align: center;
    line-height: 1.2;
}

/* For even longer file names, you can use two-line truncation */
.file-preview-container p.small.multi-line {
    white-space: normal;
    /* Allow line breaks */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Show max 2 lines */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.4em;
    /* 2 lines * 1.2 line-height */
}

/* Container for uploaded files should wrap properly */
.uploaded-files {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* Alternative: Smaller file preview for more items per row */
.file-preview-container.compact {
    width: 100px;
    height: 100px;
    padding: 8px;
}

.file-preview-container.compact p.small {
    font-size: 0.7rem !important;
}

.requirements-card {
    border-left: 4px solid var(--primary);
    background-color: rgba(52, 152, 219, 0.05);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.required-note {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 20px;
    text-align: right;
}

.field-note {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
}

.custom-dropdown {
    position: relative;
}

.custom-dropdown .dropdown-toggle {
    text-align: left;
    padding-right: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-dropdown .dropdown-toggle::after {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.custom-dropdown .dropdown-menu {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
}

.custom-dropdown .search-container {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

.custom-dropdown .dropdown-item {
    cursor: pointer;
}

.custom-dropdown .dropdown-item:hover,
.custom-dropdown .dropdown-item:focus {
    background-color: #f8f9fa;
}

.no-results {
    padding: 10px 15px;
    color: #6c757d;
    font-style: italic;
}

.validation-message {
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.is-invalid .dropdown-toggle {
    border-color: #dc3545;
}

/* OTP Section Styles */
.otp-section {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    background-color: #f8f9fa;
    display: none;
}

.otp-input-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.otp-input {
    width: 50px !important;
    height: 50px !important;
    text-align: center;
    font-size: 1.2rem !important;
    font-weight: bold;
    border: 2px solid #dee2e6 !important;
    border-radius: 8px !important;
    padding: 5px !important;
    margin: 0 !important;
    display: inline-block !important;
    background-color: white !important;
    /* Remove Bootstrap form-control styling */
    background-clip: initial !important;
    transition: none !important;
}

.otp-input:focus {
    border-color: #3498db !important;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25) !important;
}

.otp-input.verified {
    border-color: #28a745 !important;
    background-color: #f8fff9 !important;
}

.otp-timer {
    font-size: 0.9rem;
    color: #dc3545;
    margin-bottom: 10px;
    font-weight: 600;
}

.otp-status {
    font-size: 0.9rem;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 4px;
}

.otp-status.sending {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
}

.otp-status.sent {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.otp-status.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.btn-verify {
    margin-right: 10px;
}

/* SMS Whitelist Alert */
.sms-whitelist-alert {
    font-size: 0.82rem;
    line-height: 1.45;
    background-color: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 10px 12px;
    color: #5d4037;
}

.sms-whitelist-alert ol {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.sms-whitelist-alert ol li {
    margin-bottom: 2px;
}

.sms-whitelist-alert .close {
    font-size: 1.1rem;
    color: #999;
    opacity: 0.7;
    padding: 0;
    line-height: 1;
}

.sms-whitelist-alert .close:hover {
    opacity: 1;
    color: #333;
}

.verified-badge {
    color: #28a745;
    font-weight: bold;
    margin-left: 10px;
}

/* Progress indicator */
.progress-indicator {
    margin-bottom: 20px;
}

.progress-step {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #e9ecef;
    border-radius: 50%;
    margin: 0 5px;
    position: relative;
}

.progress-step.active {
    background: var(--primary);
}

.progress-step.completed {
    background: var(--success);
}

/* Force OTP inputs to be visible and properly sized */
#emailOtp1,
#emailOtp2,
#emailOtp3,
#emailOtp4,
#emailOtp5,
#emailOtp6,
#mobileOtp1,
#mobileOtp2,
#mobileOtp3,
#mobileOtp4,
#mobileOtp5,
#mobileOtp6 {
    min-width: 50px !important;
    max-width: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    flex: 0 0 50px !important;
    /* Ensure they don't get form-control styling */
    background-image: none !important;
}

/* Blacklist Alert Styles */
.blacklist-alert {
    width: 100%;
    margin-top: 8px;
    padding: 10px 15px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    color: #856404;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    display: none;
}

.blacklist-alert i {
    color: #856404;
}

.blacklist-alert.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.blacklist-alert.error i {
    color: #721c24;
}

/* Rate limit styles */
.rate-limit-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 10px 15px;
    margin: 10px 0;
    font-size: 0.9rem;
    color: #856404;
}

.rate-limit-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 10px 15px;
    margin: 10px 0;
    font-size: 0.9rem;
    color: #721c24;
}

.rate-limit-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 10px 15px;
    margin: 10px 0;
    font-size: 0.9rem;
    color: #0c5460;
}

.countdown-timer {
    font-weight: bold;
    color: #dc3545;
}

.attempts-counter {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
    text-align: right;
}

/* Shake animation for wrong OTP */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* Daily limit warning */
.daily-limit-warning {
    background: linear-gradient(90deg, #fff3cd 0%, #f8f9fa 100%);
    border-left: 4px solid #f39c12;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Styles for new Step 6 */
.skill {
    display: none;
    /* Hide all skill divs by default */
}

/* Map Styles */
.map-container {
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.map-placeholder {
    height: 100%;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
}

.map-instructions {
    margin-top: 15px;
    text-align: center;
    color: #6c757d;
}

/* Glassmorphism for Map Overlays */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    color: #2c3e50;
}

.result-highlight {
    font-weight: 700;
    color: var(--primary);
}

.accepted-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    font-weight: 600;
    font-size: 0.8rem;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.rejected-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    font-weight: 600;
    font-size: 0.8rem;
    border: 1px solid rgba(231, 76, 60, 0.2);
}