/* ============================================
   MODERN AUTH PAGES STYLES
   Clean, Elegant & Brand Consistent
   ============================================ */

/* CSS Custom Properties (Variables) - Brand Colors */
:root {
    --primary-blue: #0a77bc;
    --primary-light: #3490ff;
    --primary-dark: #065a94;
    --dark-navy: #1e293b;
    --navy-accent: #334155;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --text-gray: #64748b;
    --success-green: #10b981;
    --danger-red: #ef4444;
    --warning-yellow: #f59e0b;
    --light-blue: rgba(10, 119, 188, 0.08);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Animation Keyframes */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(200%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Container */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    position: relative;
}

/* Container Base */
.auth-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    backdrop-filter: blur(20px);
    position: relative;
    max-width: 480px;
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.auth-container:hover {
    box-shadow: var(--card-shadow-hover);
}

.auth-container.large {
    max-width: 550px;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-light), var(--primary-blue));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    z-index: 2;
}

.auth-container.success::before {
    background: linear-gradient(90deg, var(--success-green), #34d399);
}

.auth-container.danger::before {
    background: linear-gradient(90deg, var(--danger-red), #f87171);
}

/* Header Styles */
.auth-header {
    background: white;
    padding: 40px 30px 30px;
    text-align: center;
    position: relative;
}

.auth-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(10, 119, 188, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-icon::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

.auth-icon:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 15px 40px rgba(10, 119, 188, 0.4);
}

.auth-icon.success {
    background: linear-gradient(135deg, var(--success-green), #34d399);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.auth-icon.danger {
    background: linear-gradient(135deg, var(--danger-red), #f87171);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

.auth-icon.pulse {
    animation: pulse 2s infinite;
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark-navy);
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--text-gray);
    font-size: 1rem;
    font-weight: 400;
}

/* Content Styles */
.auth-content {
    padding: 0 30px 30px;
    background: white;
}

/* Info/Welcome Sections */
.info-section,
.welcome-section {
    background: var(--light-blue);
    border: 1px solid rgba(10, 119, 188, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-section.success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.info-section.danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

.info-icon,
.welcome-icon {
    color: var(--primary-blue);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-text,
.welcome-text {
    color: var(--dark-navy);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    color: var(--dark-navy);
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.form-label i {
    color: var(--primary-blue);
    width: 16px;
}

.form-control {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    color: var(--dark-navy);
    padding: 15px 18px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    background: white;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px var(--light-blue);
    color: var(--dark-navy);
    transform: translateY(-2px);
    outline: none;
}

.form-control:hover {
    border-color: rgba(10, 119, 188, 0.4);
}

.form-control::placeholder {
    color: var(--text-gray);
    opacity: 0.7;
}

/* Password Input Group */
.password-input-group {
    position: relative;
}

.password-input-group .form-control {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.password-toggle:hover {
    color: var(--primary-light);
    background: var(--light-blue);
    transform: translateY(-50%) scale(1.1);
}

/* Password Requirements */
.password-requirements {
    background: var(--light-blue);
    border: 1px solid rgba(10, 119, 188, 0.2);
    border-radius: 10px;
    padding: 12px 15px;
    margin-top: 10px;
}

.password-requirements-title {
    color: var(--dark-navy);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.password-requirements-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.password-requirement {
    color: var(--text-gray);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.password-requirement.valid {
    color: var(--success-green);
}

.password-requirement.invalid {
    color: var(--danger-red);
}

.password-requirement i {
    font-size: 0.75rem;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 12px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.form-check-input:checked {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.form-check-label {
    color: var(--dark-navy);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Links */
.auth-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 8px;
    background: transparent;
}

.auth-link:hover {
    color: var(--primary-light);
    background: var(--light-blue);
    transform: translateY(-1px);
}

.auth-link i {
    font-size: 0.85rem;
}

.terms-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.terms-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-light));
    border: none;
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(10, 119, 188, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.5s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(10, 119, 188, 0.4);
}

.btn-primary-custom:hover::before {
    left: 100%;
}

.btn-primary-custom:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    border: 2px solid #e2e8f0;
    color: var(--dark-navy);
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 5px;
}

.btn-secondary:hover {
    border-color: var(--primary-blue);
    background: var(--light-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.btn-resend {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-light));
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 10px 5px;
    cursor: pointer;
}

.btn-resend:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 119, 188, 0.3);
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 30px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.divider span {
    background: white;
    padding: 0 20px;
    color: var(--text-gray);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

/* Social Buttons */
.social-btn {
    background: white;
    border: 2px solid #e2e8f0;
    color: var(--dark-navy);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
    width: 100%;
}

.social-btn:hover {
    border-color: var(--primary-blue);
    background: var(--light-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 119, 188, 0.2);
}

.social-btn i {
    font-size: 1.2rem;
}

/* Auth Sections */
.auth-section {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: var(--light-blue);
    border-radius: 12px;
    border: 1px solid rgba(10, 119, 188, 0.15);
}

.auth-section-text {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.auth-section-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.auth-section-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Features Section */
.features-section {
    background: linear-gradient(135deg, var(--light-blue), rgba(52, 144, 255, 0.08));
    border: 1px solid rgba(10, 119, 188, 0.15);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.feature-icon {
    color: var(--primary-blue);
    font-size: 1.5rem;
}

.feature-text {
    color: var(--dark-navy);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Terms Section */
.terms-section {
    background: var(--light-blue);
    border: 1px solid rgba(10, 119, 188, 0.15);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

/* Message Boxes */
.message-box {
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.message-box.success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success-green);
}

.message-box.danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger-red);
}

.message-box.info {
    background: var(--light-blue);
    border: 1px solid rgba(10, 119, 188, 0.2);
    color: var(--dark-navy);
}

/* Validation Styles */
.text-danger {
    color: var(--danger-red);
    font-size: 0.875rem;
    margin-top: 6px;
    display: block;
    font-weight: 500;
}

.text-danger:not(:empty) {
    display: flex;
    align-items: center;
    gap: 5px;
}

.text-danger:not(:empty)::before {
    content: '⚠️';
    font-size: 0.85rem;
}

.field-validation-error {
    color: var(--danger-red) !important;
    font-size: 0.875rem;
    margin-top: 6px;
    display: flex !important;
    align-items: center;
    gap: 5px;
}

.field-validation-error:not(:empty)::before {
    content: '⚠️';
    font-size: 0.85rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger-red);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success-green);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.validation-summary-errors {
    background: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: var(--danger-red) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-bottom: 20px !important;
}

.validation-summary-errors ul {
    margin: 0 !important;
    padding-left: 20px !important;
}

.validation-summary-errors li {
    margin-bottom: 6px !important;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.slide-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.5s ease forwards;
}

.slide-up[style*="animation-delay"] {
    opacity: 0;
}

/* Security Tips */
.security-tips {
    background: var(--light-blue);
    border: 1px solid rgba(10, 119, 188, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
}

.security-tips h6 {
    color: var(--dark-navy);
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.security-tips ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.security-tips li {
    margin-bottom: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-page {
        padding: 20px 15px;
    }

    .auth-header {
        padding: 30px 20px 25px;
    }

    .auth-content {
        padding: 0 20px 25px;
    }

    .auth-icon {
        width: 75px;
        height: 75px;
    }

    .auth-title {
        font-size: 1.6rem;
    }

    .auth-subtitle {
        font-size: 0.9rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .password-requirements-list {
        grid-template-columns: 1fr;
    }

    .btn-primary-custom {
        padding: 14px 28px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        max-width: 100%;
    }

    .auth-header {
        padding: 25px 15px 20px;
    }

    .auth-content {
        padding: 0 15px 20px;
    }

    .auth-title {
        font-size: 1.4rem;
    }

    .form-control {
        padding: 13px 16px;
        font-size: 0.95rem;
    }
}
