/* Modern Authentication Pages Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Animated background elements */
body::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: float 20s infinite;
}

body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: float 15s infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* Auth Container */
.auth-container {
    max-width: 450px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-header::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    top: -50%;
    left: -50%;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.auth-header-content {
    position: relative;
    z-index: 1;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.auth-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Body */
.auth-body {
    padding: 2.5rem 2rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    border-left-color: #2ecc71;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border-left-color: #e74c3c;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border-left-color: #3498db;
    color: #004085;
}

.alert-warning {
    background: #fff3cd;
    border-left-color: #f39c12;
    color: #856404;
}

.alert i {
    font-size: 1.2rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    z-index: 10;
    font-size: 1.1rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: #95a5a6;
}

/* Ensure code input text is always black and visible */
.code-input.form-control,
.form-control.code-input {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

.code-input.form-control:focus,
.form-control.code-input:focus {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

.code-input.form-control:-webkit-autofill,
.form-control.code-input:-webkit-autofill {
    -webkit-text-fill-color: #000000 !important;
    color: #000000 !important;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    z-index: 10;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #667eea;
}

/* Verification Code Input */
.code-input-group {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.code-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #f8f9fa;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    transition: all 0.3s ease;
}

.code-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.form-check-label {
    font-size: 0.9rem;
    color: #5a6c7d;
    cursor: pointer;
    user-select: none;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-link {
    background: none;
    color: #667eea;
    text-decoration: none;
    padding: 0.5rem;
    font-weight: 500;
    width: auto;
}

.btn-link:hover {
    text-decoration: underline;
    color: #5568d3;
}

/* Footer */
.auth-footer {
    text-align: center;
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.auth-footer p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* Links */
.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.auth-link p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: #e74c3c;
}

.password-strength-bar.medium {
    width: 66%;
    background: #f39c12;
}

.password-strength-bar.strong {
    width: 100%;
    background: #2ecc71;
}

.password-hint {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
}

/* Resend Code */
.resend-code {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.resend-code p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.resend-code a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.resend-code a:hover {
    text-decoration: underline;
}

/* Loading State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .auth-card {
        border-radius: 15px;
    }

    .auth-header {
        padding: 2rem 1.5rem;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .auth-body {
        padding: 2rem 1.5rem;
    }

    .code-input {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        color: #000000 !important;
    }

    .auth-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
}

/* Success Animation */
.success-check {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: #2ecc71;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

