/* Modern Authentication Pages Styling */

/* Auth Wrapper and Background */
.auth-wrapper {
    position: relative;
    min-height: 100vh; 
    overflow: hidden;
}

.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1;
}

.auth-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 80px;
    height: 80px;
    top: 70%;
    left: 80%;
    animation-delay: -5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 80%;
    left: 20%;
    animation-delay: -10s;
}

.shape-4 {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 70%;
    animation-delay: -15s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Brand Section */
.auth-brand-section {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-brand-content {
    padding: 3rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}

.brand-logo-section {
    text-align: center;
    margin-bottom: 3rem;
}

.brand-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    margin-bottom: 1.5rem;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.brand-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Features Section */
.brand-features {
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
}

.feature-text h5 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.feature-text p {
    margin-bottom: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Registration Benefits */
.registration-benefits {
    margin-top: 2rem;
}

.benefits-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.benefit-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.benefit-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.benefit-text h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
}

.benefit-text p {
    margin-bottom: 0;
    opacity: 0.9;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Form Container */
.auth-form-container {
    position: relative;
    z-index: 2;
    background: white;
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
}

.registration-container {
    max-width: 600px;
    box-sizing: border-box;
}

.mobile-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* Form Header */
.auth-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #718096;
    font-size: 1rem;
    margin-bottom: 0;
}

/* Alert Styling */
.auth-alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Form Styling */
.auth-form {
    margin-bottom: 2rem;
    width: 100%;
    overflow: hidden;
}
 
.form-group {
    margin-bottom: 1.8rem;
    position: relative;
    z-index: 1;
    width: 100%;
    overflow: hidden;
}

.form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.input-wrapper.focused {
    transform: translateY(-2px);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    z-index: 3;
    transition: all 0.3s ease;
}

.input-wrapper.focused .input-icon {
    color: #667eea;
}

.auth-input {
    width: 100%;
    max-width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f7fafc;
    box-sizing: border-box;
    min-width: 0;
}

.auth-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-input.error {
    border-color: #e53e3e;
    background: #fed7d7;
}

.auth-input::placeholder {
    color: #a0aec0;
}

/* Textarea specific styling */
textarea.auth-input {
    resize: vertical;
    min-height: 100px;
    padding: 1rem 1rem 1rem 3rem;
    border-radius: 8px;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 3;
}

.password-toggle:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 0.5rem;
    accent-color: #667eea;
}

.form-check-label {
    font-size: 0.9rem;
    color: #4a5568;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Auth Button */
.auth-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-text {
    margin-right: 0.5rem;
}

.btn-icon {
    transition: all 0.3s ease;
}

.auth-btn:hover .btn-icon {
    transform: translateX(3px);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
}

.auth-switch {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.auth-info {
    color: #a0aec0;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Multi-step Form Styling */
.registration-form .form-step {
    animation: slideIn 0.3s ease;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.step-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #e2e8f0;
    color: #718096;
}

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

.step-number.completed {
    background: #38a169;
    color: white;
}

/* Verification Info */
.verification-info {
    margin-bottom: 2rem;
}

.info-card {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    color: #0c5460;
}

.info-card i {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #3182ce;
}

.info-card p {
    margin: 0;
    font-size: 0.9rem;
}

/* File Upload Styling */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f7fafc;
    box-sizing: border-box;
}

.file-upload-wrapper:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.file-upload-wrapper.has-file {
    border-color: #38a169;
    background: #f0fff4;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-display {
    pointer-events: none;
}

.upload-icon {
    font-size: 3rem;
    color: #a0aec0;
    margin-bottom: 1rem;
    display: block;
}

.file-upload-wrapper.has-file .upload-icon {
    color: #38a169;
}

.upload-text {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.upload-hint {
    color: #718096;
    font-size: 0.8rem;
}

/* Photo Upload Section */
.photo-upload-section {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.photo-upload-section .file-upload-wrapper {
    flex: 1;
    min-height: 120px;
}

.camera-option {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.camera-btn {
    white-space: nowrap;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

/* Camera Container */
.camera-container {
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    background: #f7fafc;
}

.camera-preview {
    text-align: center;
    margin-bottom: 1rem;
}

.camera-preview video {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
}

.camera-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
}

.strength-meter {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-bar.weak {
    background: #e53e3e;
}

.strength-bar.medium {
    background: #d69e2e;
}

.strength-bar.strong {
    background: #38a169;
}

.strength-text {
    font-size: 0.8rem;
    color: #718096;
}

/* Password Match */
.password-match {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.password-match.success {
    color: #38a169;
}

.password-match.error {
    color: #e53e3e;
}

/* Terms Section */
.terms-section {
    margin: 2rem 0;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.terms-check {
    display: flex;
    align-items: flex-start;
}

.terms-check .form-check-input {
    margin-top: 0.25rem;
}

.terms-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.terms-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Step Navigation */
.step-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-shrink: 0;
    padding-top: 1rem; 
}

.step-navigation .btn {
    flex: 1;
    min-height: 48px;
}

.prev-step {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    color: #4a5568;
}

.prev-step:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .registration-container {
        max-width: 700px;
        margin: 1rem auto;
    }
    
    .auth-form-container {
        padding: 2.5rem;
        margin: 1rem;
    }
    
    .form-group {
        margin-bottom: 2rem;
    }
    
    .step-header {
        margin-bottom: 2.5rem;
    }
    
    .registration-form .row {
        margin-left: 0;
        margin-right: 0;
        display: flex;
        flex-wrap: wrap;
    }
    
    .registration-form .col-md-6 {
        flex: 0 0 calc(50% - 16px);
        max-width: calc(50% - 16px);
        padding-left: 8px;
        padding-right: 8px;
        box-sizing: border-box; 
    } 
    
    .registration-form .col-md-6 .form-group {
        width: 100%;
        margin: 0 0 1.8rem 0;
    }
    
    .registration-form .col-md-6 .input-wrapper {
        width: 100%;
        box-sizing: border-box;
    }
    
    .registration-form .col-md-6 .auth-input {
        width: 100%;
        box-sizing: border-box;
        padding: 1rem 1rem 1rem 3rem;
        border: 2px solid #e2e8f0;
        border-radius: 8px;
    }
}

@media (max-width: 991px) {
    .auth-brand-section {
        display: none !important;
    }
    
    .auth-form-container {
        margin: 1rem;
        padding: 2rem;
        max-width: 600px;
    }
    
    .registration-container {
        max-width: 100%;
    }
    
    .form-group {
        margin-bottom: 1.8rem;
    }
    
    .row .col-md-6 {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 768px) {
    .auth-form-container {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .photo-upload-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .photo-upload-section .file-upload-wrapper {
        min-height: 100px;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .step-indicator {
        gap: 0.5rem;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .registration-form .form-step {
        min-height: 400px;
    }
}

@media (max-width: 576px) {
    .auth-form-container {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .feature-item,
    .benefit-item {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-icon,
    .benefit-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.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: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Focus States for Accessibility */
.auth-btn:focus,
.file-upload-wrapper:focus-within,
.camera-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .auth-input {
        border-width: 3px;
    }
    
    .auth-btn {
        border: 2px solid #000;
    }
    
    .step-number {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .shape {
        animation: none;
    }
    
    .brand-logo {
        animation: none;
    }
}
