/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*old body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.6;
} */
body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, sans-serif;
  background-color: #f8f9fa;
  color: #212529;
  line-height: 1.6;
}
/* Lucide Icons */
[data-lucide] {
    display: inline-block;
    vertical-align: middle;
}

svg {
    display: inline-block;
    vertical-align: middle;
}

.app-container {
    min-height: 100vh;
}

/* Authentication Section */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 900px;
    width: 100%;
    overflow: hidden;
    display: flex;
}

.welcome-section {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    padding: 48px;
    color: white;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.company-branding {
    margin-bottom: 32px;
}

.company-name {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.company-subtitle {
    font-size: 24px;
    font-weight: 300;
    opacity: 0.9;
    font-style: italic;
}

.welcome-text {
    font-size: 16px;
    line-height: 1.6;
}

.welcome-text p {
    margin-bottom: 16px;
}

.auth-step {
    padding: 48px;
    flex: 1;
    display: none;
}

.auth-step.active {
    display: block;
}

.form-section h3 {
    font-size: 28px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.form-subtitle {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 32px;
}

/* Alert Styles */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-content strong {
    display: block;
    margin-bottom: 4px;
}

/* Homepage (Landing) Section */
.homepage-container {
    display: none; /* shown by JS on initial load */
    background: #ffffff;
    min-height: 100vh;
}

.home-header {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
}

.home-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-brand { display: flex; align-items: center; gap: 10px; }
.home-logo { width: 28px; height: 28px; color: #1976d2; }
.home-brand-text { font-weight: 700; color: #212529; }

.home-nav { display: flex; gap: 8px; }
.home-nav-link { display:flex; align-items:center; gap:8px; padding:10px 12px; color:#6c757d; text-decoration:none; border-radius:8px; }
.home-nav-link:hover { background:#f8f9fa; color:#495057; }
.home-nav-link.active { background:#e3f2fd; color:#1976d2; }

.home-hero { text-align:center; padding:48px 24px 24px; background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);} 
.home-company { font-size: 40px; font-weight: 700; color:#212529; }
.home-title { font-size: 28px; font-weight: 600; color:#495057; margin-top:8px; }
.home-subtitle { max-width: 760px; margin: 12px auto 24px; color:#6c757d; }
.home-actions { display:flex; gap:12px; justify-content:center; }

.home-features { max-width: 1100px; margin: 40px auto; padding: 0 24px; display:grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap:24px; }
.home-feature { background:#fff; border:1px solid #e9ecef; border-radius:12px; padding:20px; text-align:center; }
.home-feature-icon { width:56px; height:56px; border-radius:14px; background:#e3f2fd; display:flex; align-items:center; justify-content:center; color:#1976d2; margin:0 auto 12px; }

/* Registration Section */
.registration-container {
    min-height: 100vh;
    background-color: #f8f9fa;
}

.registration-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 24px 32px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.company-logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    color: #1976d2;
    width: 32px;
    height: 32px;
}

.company-info h1 {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 4px;
}

.company-info p {
    color: #6c757d;
    font-size: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-email {
    font-weight: 500;
    color: #495057;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.dark-mode-toggle:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.dark-mode-icon {
    width: 18px;
    height: 18px;
}

/* Progress Indicator */
.progress-container {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 32px;
}

.progress-steps {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    z-index: 2;
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step.active .step-number,
.step.completed .step-number {
    background: #1976d2;
    color: white;
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    text-align: center;
    max-width: 120px;
}

.step.active .step-label,
.step.completed .step-label {
    color: #1976d2;
}

/* Form Styles */
.form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.step-header {
    margin-bottom: 40px;
    text-align: center;
}

.step-header h2 {
    font-size: 32px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.step-subtitle {
    color: #6c757d;
    font-size: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.field-icon {
    width: 16px;
    height: 16px;
    color: #1976d2;
    flex-shrink: 0;
}

.required {
    color: #dc3545;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 16px;
    color: #495057;
    background-color: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-group input:invalid,
.form-group select:invalid,
.form-group textarea:invalid {
    border-color: #dc3545;
}

.field-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.field-hint.field-required {
    color: #dc3545;
}

.section-divider {
    margin: 40px 0 32px 0;
    padding-top: 32px;
    border-top: 1px solid #e9ecef;
}

.section-divider h3 {
    font-size: 20px;
    font-weight: 600;
    color: #495057;
}

/* Personnel Management */
.personnel-instructions {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
}

.personnel-instructions h4 {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 16px;
}

.personnel-instructions ul {
    margin-left: 20px;
}

.personnel-instructions li {
    margin-bottom: 8px;
    color: #6c757d;
    font-size: 14px;
}

.personnel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.personnel-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #495057;
}

.personnel-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* .personnel-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
} */
.personnel-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    /* justify-content: space-between;
    align-items: center; */
    flex-direction: column;
}

.personnel-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.personnel-info p {
    color: #6c757d;
    font-size: 14px;
}

.personnel-actions {
    display: flex;
    gap: 8px;
	flex-wrap: wrap; /* added*/
}

/* Document Upload */
.document-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.document-group {
    display: flex;
    flex-direction: column;
}

.document-group.full-width {
    grid-column: 1 / -1;
}

.document-group label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.file-upload-area {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: #1976d2;
    background-color: #f0f7ff;
}

.file-upload-area.has-file {
    border-color: #28a745;
    background-color: #f8fff8;
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.upload-icon {
    width: 32px;
    height: 32px;
    color: #6c757d;
}

.upload-text {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.file-upload-area.has-file .upload-icon {
    color: #28a745;
}

.file-upload-area.has-file .upload-text {
    color: #28a745;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 120px;
}

.btn-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #1976d2;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #1565c0;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #218838;
}

.btn-link {
    background: transparent;
    color: #1976d2;
    border: none;
    padding: 8px;
    text-decoration: underline;
    min-width: auto;
}

.btn-link:hover {
    color: #1565c0;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #ced4da;
    color: #495057;
}

.btn-outline:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

/* Form Actions */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e9ecef;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #495057;
}

.modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    color: #6c757d;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.close-icon {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.owner-only {
    display: none;
}

.owner-only.show {
    display: block;
}

/* Success Section */
.success-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background-color: #f8f9fa;
}

.success-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 48px;
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.success-icon {
    margin-bottom: 24px;
}

.success-icon-svg {
    width: 64px;
    height: 64px;
    color: #28a745;
}

.success-card h2 {
    font-size: 32px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 16px;
}

.success-card > p {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 32px;
}

.success-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: left;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: #495057;
}

.detail-item span {
    color: #1976d2;
    font-weight: 500;
}

.success-note {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 32px;
    font-style: italic;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1976d2;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #495057;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        flex-direction: column;
        max-width: 700px;
    }
    
    .welcome-section {
        padding: 32px;
    }
    
    .company-name {
        font-size: 32px;
    }
    
    .company-subtitle {
        font-size: 18px;
    }
    
    .auth-step {
        padding: 32px;
    }
    
    .form-section h3 {
        font-size: 24px;
    }
    
    .registration-header {
        padding: 16px 20px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .company-logo {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .progress-container {
        padding: 20px;
        overflow-x: auto;
    }
    
    .progress-steps {
        min-width: 600px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .step-label {
        font-size: 12px;
        max-width: 100px;
    }
    
    .form-container {
        padding: 32px 20px;
    }
    
    .step-header {
        margin-bottom: 32px;
    }
    
    .step-header h2 {
        font-size: 24px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .document-upload-grid {
        grid-template-columns: 1fr;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 16px;
    }
    
    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .success-card {
        padding: 32px;
    }
    
    .success-card h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 12px 16px;
        font-size: 14px;
        min-width: 100px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .personnel-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .personnel-actions {
        align-self: stretch;
        justify-content: flex-end;
    }
}

/* Dark Mode Styles */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] body {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* Dark Mode - Homepage */
[data-theme="dark"] .homepage-container {
    background: #1a1a1a;
}

[data-theme="dark"] .home-header {
    background: #2d2d2d;
    border-bottom: 1px solid #404040;
}

[data-theme="dark"] .home-brand-text {
    color: #e0e0e0;
}

[data-theme="dark"] .home-nav-link {
    color: #b0b0b0;
}

[data-theme="dark"] .home-nav-link:hover {
    background: #404040;
    color: #e0e0e0;
}

[data-theme="dark"] .home-nav-link.active {
    background: #1976d2;
    color: white;
}

[data-theme="dark"] .home-hero {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

[data-theme="dark"] .home-company {
    color: #e0e0e0;
}

[data-theme="dark"] .home-title {
    color: #c0c0c0;
}

[data-theme="dark"] .home-subtitle {
    color: #a0a0a0;
}

[data-theme="dark"] .home-feature {
    background: #2d2d2d;
    border: 1px solid #404040;
}

[data-theme="dark"] .home-feature h3 {
    color: #e0e0e0;
}

[data-theme="dark"] .home-feature p {
    color: #b0b0b0;
}

/* Dark Mode - Authentication */
[data-theme="dark"] .auth-container {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

[data-theme="dark"] .auth-card {
    background: #2d2d2d;
}

[data-theme="dark"] .welcome-section {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

[data-theme="dark"] .form-section h3 {
    color: #e0e0e0;
}

[data-theme="dark"] .form-subtitle {
    color: #b0b0b0;
}

/* Dark Mode - Registration */
[data-theme="dark"] .registration-container {
    background-color: #1a1a1a;
}

[data-theme="dark"] .registration-header {
    background: #2d2d2d;
    border-bottom: 1px solid #404040;
}

[data-theme="dark"] .company-info h1 {
    color: #e0e0e0;
}

[data-theme="dark"] .company-info p {
    color: #b0b0b0;
}

[data-theme="dark"] .progress-container {
    background: #2d2d2d;
    border-bottom: 1px solid #404040;
}

[data-theme="dark"] .progress-steps::before {
    background: #404040;
}

[data-theme="dark"] .step-number {
    background: #404040;
    color: #b0b0b0;
}

[data-theme="dark"] .step.active .step-number,
[data-theme="dark"] .step.completed .step-number {
    background: #1976d2;
    color: white;
}

[data-theme="dark"] .step-label {
    color: #b0b0b0;
}

[data-theme="dark"] .step.active .step-label,
[data-theme="dark"] .step.completed .step-label {
    color: #1976d2;
}

/* Dark Mode - Forms */
[data-theme="dark"] .step-header h2 {
    color: #e0e0e0;
}

[data-theme="dark"] .step-subtitle {
    color: #b0b0b0;
}

[data-theme="dark"] .form-group label {
    color: #c0c0c0;
}

[data-theme="dark"] .field-icon {
    color: #64b5f6;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
    background-color: #404040;
    border: 1px solid #606060;
    color: #e0e0e0;
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
}

[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
    color: #888;
}

[data-theme="dark"] .field-hint {
    color: #888;
}

/* How It Works Section */
.how-it-works {
    max-width: 1200px;
    margin: 48px auto;
    padding: 0 24px;
    text-align: center;
}

.how-it-works-inner {
    padding: 48px 0;
}

.section-title {
    font-size: 36px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: #6c757d;
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.step-item {
    text-align: center;
    padding: 24px;
}

.step-item .step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1976d2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    margin: 0 auto 16px;
}

.step-item .step-title {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 12px;
}

.step-item .step-description {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
}

/* Fixed Header for Registration */
.progress-container.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: white;
}

.registration-container.has-fixed-header .form-container {
    padding-top: 200px;
}

/* Registration Header - Override any hiding with maximum specificity */
.registration-container .registration-header {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
    background: white !important;
    border-bottom: 1px solid #e9ecef !important;
    padding: 24px 32px !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    margin: 0 !important;
}

/* Ensure progress container doesn't overlap header */
.registration-container .progress-container {
    position: relative !important;
    z-index: 5 !important;
    background: white !important;
    border-bottom: 1px solid #e9ecef !important;
}

/* Ensure header content is also visible */
.registration-container .registration-header * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force display of header content */
.registration-container .header-content {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Company logo visibility */
.registration-container .company-logo {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* User info visibility */
.registration-container .user-info {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Clickable Steps */
.clickable-step {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-step:hover {
    transform: translateY(-2px);
}

.clickable-step:hover .step-number {
    box-shadow: 0 4px 8px rgba(25, 118, 210, 0.3);
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 48px 0 24px 0;
    padding: 24px 0;
    border-top: 1px solid #e9ecef;
}

/* Force Step 5 submit button visibility */
#step5.active .form-navigation #submitBtn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: #28a745 !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    min-width: 160px !important;
    height: auto !important;
    position: relative !important;
    z-index: 50 !important;
}

/* Ensure all navigation buttons are properly displayed */
.form-navigation button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    position: relative !important;
    z-index: 10 !important;
}

.nav-left, .nav-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Home Footer */
.home-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 24px 0;
    margin-top: 48px;
}

.home-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 24px;
}

.copyright-text {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* Step Title Section */
.step-title-section {
    text-align: center;
    margin-bottom: 0;
}

.step-header {
    margin-bottom: 24px;
    text-align: center;
}

.step-header h2 {
    font-size: 32px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.step-subtitle {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 0;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin-bottom: 16px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1976d2, #42a5f5);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-percentage {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #1976d2;
    margin-top: 8px;
}

/* Save for Later Button */
.btn-save-later {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 16px;
    font-size: 12px;
    margin-left: auto;
    min-width: auto;
}

.btn-save-later:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.step-header > div {
    flex: 1;
}

/* Field Validation */
.validation-message {
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}

.validation-message.success {
    color: #28a745;
}

.validation-message.error {
    color: #dc3545;
}

.form-group input.valid,
.form-group select.valid,
.form-group textarea.valid {
    background-color: #f8fff8;
    border-color: #28a745;
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    background-color: #fff5f5;
    border-color: #dc3545;
}

/* Captcha Styles */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.captcha-display {
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 4px;
    color: #495057;
    user-select: none;
    min-width: 120px;
    text-align: center;
}

.btn-refresh {
    background: none;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.2s ease;
}

.btn-refresh:hover {
    background: #f8f9fa;
    color: #495057;
}

/* Status Modal Styles */
.status-result {
    margin-top: 24px;
}

.status-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

.status-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 16px;
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.approved {
    background: #d4edda;
    color: #155724;
}

.status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
}

/* File Preview Styles - New Design */
.uploaded-file-preview {
    margin-top: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.btn-file-action {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-file-action:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
}

.file-thumbnail {
    width: 48px;
    height: 48px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #28a745;
    flex-shrink: 0;
}

.file-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.file-thumbnail i {
    font-size: 20px;
}

/* Success Actions */
.success-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Date Field Validation */
.form-group input[type="date"].invalid {
    background-color: #fff5f5;
    border-color: #dc3545;
}

.form-group input[type="date"].valid {
    background-color: #f8fff8;
    border-color: #28a745;
}

/* Dark Mode - New Features */
[data-theme="dark"] .section-title {
    color: #e0e0e0;
}

[data-theme="dark"] .section-subtitle {
    color: #b0b0b0;
}

[data-theme="dark"] .step-item .step-title {
    color: #e0e0e0;
}

[data-theme="dark"] .step-item .step-description {
    color: #a0a0a0;
}

[data-theme="dark"] .progress-bar {
    background: #404040;
}

[data-theme="dark"] .progress-percentage {
    color: #64b5f6;
}

[data-theme="dark"] .btn-save-later {
    background: #404040;
    border-color: #606060;
    color: #e0e0e0;
}

[data-theme="dark"] .btn-save-later:hover {
    background: #505050;
    border-color: #707070;
}

[data-theme="dark"] .captcha-display {
    background: #404040;
    border-color: #606060;
    color: #e0e0e0;
}

[data-theme="dark"] .btn-refresh {
    border-color: #606060;
    color: #b0b0b0;
}

[data-theme="dark"] .btn-refresh:hover {
    background: #505050;
    color: #e0e0e0;
}

[data-theme="dark"] .status-card {
    background: #404040;
    border-color: #606060;
}

[data-theme="dark"] .status-card h4 {
    color: #e0e0e0;
}

[data-theme="dark"] .file-preview {
    border-color: #606060;
}

[data-theme="dark"] .preview-header {
    background: #505050;
    border-bottom-color: #606060;
}

[data-theme="dark"] .file-name {
    color: #e0e0e0;
}

[data-theme="dark"] .btn-preview {
    border-color: #606060;
    color: #b0b0b0;
}

[data-theme="dark"] .btn-preview:hover {
    background: #606060;
    color: #e0e0e0;
}

[data-theme="dark"] .form-group input.valid,
[data-theme="dark"] .form-group select.valid,
[data-theme="dark"] .form-group textarea.valid {
    background-color: #1a3a1a;
    border-color: #28a745;
}

[data-theme="dark"] .form-group input.invalid,
[data-theme="dark"] .form-group select.invalid,
[data-theme="dark"] .form-group textarea.invalid {
    background-color: #3a1a1a;
    border-color: #dc3545;
}

/* Dark Mode - New Elements */
[data-theme="dark"] .form-navigation-top {
    border-bottom-color: #404040;
}

[data-theme="dark"] .uploaded-file-preview {
    background: #404040;
    border-color: #606060;
}

[data-theme="dark"] .file-name {
    color: #e0e0e0;
}

[data-theme="dark"] .btn-file-action {
    background: #505050;
    border-color: #606060;
    color: #b0b0b0;
}

[data-theme="dark"] .btn-file-action:hover {
    background: #606060;
    color: #e0e0e0;
    border-color: #707070;
}

[data-theme="dark"] .file-thumbnail {
    background: #505050;
    border-color: #606060;
    color: #64b5f6;
}

[data-theme="dark"] .clickable-step:hover .step-number {
    box-shadow: 0 4px 8px rgba(100, 181, 246, 0.3);
}

[data-theme="dark"] .section-divider {
    border-top: 1px solid #404040;
}

[data-theme="dark"] .section-divider h3 {
    color: #c0c0c0;
}

/* Dark Mode - Personnel */
[data-theme="dark"] .personnel-instructions {
    background: #2d2d2d;
    border: 1px solid #404040;
}

[data-theme="dark"] .personnel-instructions h4 {
    color: #c0c0c0;
}

[data-theme="dark"] .personnel-instructions li {
    color: #b0b0b0;
}

[data-theme="dark"] .personnel-header h3 {
    color: #c0c0c0;
}

[data-theme="dark"] .personnel-item {
    background: #2d2d2d;
    border: 1px solid #404040;
}

[data-theme="dark"] .personnel-info h4 {
    color: #e0e0e0;
}

[data-theme="dark"] .personnel-info p {
    color: #b0b0b0;
}

/* Dark Mode - File Upload */
[data-theme="dark"] .file-upload-area {
    background-color: #2d2d2d;
    border: 2px dashed #606060;
}

[data-theme="dark"] .file-upload-area:hover {
    border-color: #1976d2;
    background-color: #1e3a5f;
}

[data-theme="dark"] .file-upload-area.has-file {
    border-color: #4caf50;
    background-color: #1e3a1e;
}

[data-theme="dark"] .upload-icon {
    color: #b0b0b0;
}

[data-theme="dark"] .upload-text {
    color: #b0b0b0;
}

[data-theme="dark"] .file-upload-area.has-file .upload-icon,
[data-theme="dark"] .file-upload-area.has-file .upload-text {
    color: #4caf50;
}

/* Dark Mode - Buttons */
[data-theme="dark"] .btn-secondary {
    background-color: #404040;
    color: #e0e0e0;
    border: 1px solid #606060;
}

[data-theme="dark"] .btn-secondary:hover:not(:disabled) {
    background-color: #505050;
    border-color: #707070;
}

[data-theme="dark"] .btn-outline {
    background-color: transparent;
    border: 1px solid #606060;
    color: #c0c0c0;
}

[data-theme="dark"] .btn-outline:hover {
    background-color: #404040;
    border-color: #707070;
}

[data-theme="dark"] .btn-link {
    color: #64b5f6;
}

[data-theme="dark"] .btn-link:hover {
    color: #90caf9;
}

/* Dark Mode - Modal */
[data-theme="dark"] .modal-content {
    background: #2d2d2d;
}

[data-theme="dark"] .modal-header {
    border-bottom: 1px solid #404040;
}

[data-theme="dark"] .modal-header h3 {
    color: #e0e0e0;
}

[data-theme="dark"] .modal-close {
    color: #b0b0b0;
}

[data-theme="dark"] .modal-close:hover {
    background-color: #404040;
    color: #e0e0e0;
}

[data-theme="dark"] .modal-footer {
    border-top: 1px solid #404040;
}

/* Dark Mode - Success */
[data-theme="dark"] .success-container {
    background-color: #1a1a1a;
}

[data-theme="dark"] .success-card {
    background: #2d2d2d;
}

[data-theme="dark"] .success-card h2 {
    color: #e0e0e0;
}

[data-theme="dark"] .success-card > p {
    color: #b0b0b0;
}

[data-theme="dark"] .success-details {
    background: #404040;
}

[data-theme="dark"] .detail-item {
    border-bottom: 1px solid #606060;
}

[data-theme="dark"] .detail-item strong {
    color: #c0c0c0;
}

[data-theme="dark"] .success-note {
    color: #b0b0b0;
}

/* Dark Mode - Dark Mode Toggle */
[data-theme="dark"] .dark-mode-toggle:hover {
    background-color: #404040;
    color: #e0e0e0;
}

/* Print Styles */
@media print {
    .auth-container,
    .form-navigation,
    .btn {
        display: none !important;
    }
    
    .registration-container {
        background: white !important;
    }
    
    .form-step {
        display: block !important;
        page-break-after: always;
    }
    
    .form-step:last-child {
        page-break-after: avoid;
    }
}

/* span entire row inside the grid, but DO NOT change column count */
.form-grid > .full-row {
    grid-column: 1 / -1;
}

/* styling to differentiate the section */
.bordered-section {
    border: 1px solid #d0d0d0;
    padding: 12px 15px;
    border-radius: 6px;
    background-color: #fafafa;
}

 

/* styling for the radio group container */
#corporateTypeGroup {
    display: flex;
    justify-content: space-between;   /* equally space items */
    align-items: center;
    gap: 20px;
    background-color: #eef3ff;        /* light color for row */
    border: 1px solid #b8c6e0;
    padding: 14px 18px;
    border-radius: 8px;
}

/* style for each label */
#corporateTypeGroup label {
    font-size: 12px;                   /* bigger text */
    font-weight: 600;                  /* bold text */
    color: #003366;                    /* text color */
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* optional: enlarge radio circle slightly */
#corporateTypeGroup input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}


/* Align switch + text */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

/* Hide original checkbox */
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider background */
.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #bfc7d4;
    border-radius: 28px;
    transition: 0.3s;
}

/* Slider knob */
.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

/* Brand color when checked */
.toggle-switch input:checked + .slider {
    background-color: #005bc4;   /* ← YOUR BRAND BLUE */
}

/* Move knob */
.toggle-switch input:checked + .slider:before {
    transform: translateX(24px);
}

/* Text style */
.toggle-text {
    font-size: 14px;
    font-weight: 700;
    color: #003366; /* dark blue */
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Icon styling */
.status-icon {
    font-size: 14px;
}

 
/* Grey out disabled inputs */
.input-disabled {
    background-color: #f0f2f5 !important;
    border-color: #d0d0d0 !important;
    color: #7a7a7a !important;
    cursor: not-allowed !important;
    opacity: 0.8;
}

.multi-role-container .role-checkbox {
  display: inline-block;
  margin-right: 12px;
  margin-bottom: 6px;
}
.multi-role-container input.personnel-role-checkbox { transform: scale(1.02); margin-right:6px; }
 
 
 .personnel-itemInfo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.personnel-info {
  display: flex;
  flex-direction: column;
}

.password-wrapper {
    position: relative;
    width: 250px;
}

.password-wrapper input {
    width: 100%;
    padding-right: 35px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}
