﻿/* ====== SHARED AUTHENTICATION STYLES ====== */
/* This CSS file provides consistent styling for all authentication pages */

/* Main Wrapper - Golden Background */
.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Simple Auth Wrapper for single-column pages */
.auth-wrapper-simple {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Background Elements */
.bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.bg-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.1) 0, rgba(255,255,255,0.1) 1px, transparent 1px, transparent 15px);
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.float-element {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.element-1 {
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.element-2 {
    bottom: -150px;
    right: -150px;
    animation-delay: 7s;
}

.element-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

/* Main Container - Two Column Layout */
.auth-container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    width: 100%;
    max-width: 1200px;
    min-height: 650px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

/* Simple Container - Single Column */
.auth-container-simple {
    background: var(--content-bg);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left Side - Branding */
.auth-branding {
    background: var(--tertiary);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

    .auth-branding::after {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(212, 175, 55, 0.03) 0%, transparent 40%);
        animation: rotate 30s linear infinite;
    }

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.branding-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Brand Header */
.brand-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-container {
    margin-bottom: 1.5rem;
}

.brand-logo {
    max-width: 80px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.brand-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.brand-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Features List */
.features-list {
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

    .feature-item:hover {
        background: rgba(212, 175, 55, 0.15);
        transform: translateX(5px);
    }

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.25rem;
    color: var(--primary);
}

.feature-text h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.feature-text p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Info Card */
.info-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

    .info-card i {
        font-size: 1.5rem;
        color: var(--primary);
    }

.info-title {
    display: block;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.875rem;
}

.info-text {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Brand Footer */
.brand-footer {
    margin-top: auto;
    padding-top: 1rem;
}

/* Right Side - Dark Form Section */
.auth-form-section {
    background: #1a1a1a;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

    .auth-form-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        opacity: 0.5;
    }

/* Simple Form Section (for single-column layouts) */
.auth-form-simple {
    padding: 3rem;
    background: var(--content-bg);
}

.form-container {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.form-header {
    margin-bottom: 2.5rem;
}

.form-title {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.auth-form-simple .form-title {
    color: var(--text-primary);
}

.form-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9375rem;
}

.auth-form-simple .form-subtitle {
    color: var(--text-secondary);
}

/* Form Fields */
.auth-form {
    margin-bottom: 2rem;
}

.form-field {
    margin-bottom: 1.5rem;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-form-simple .field-label {
    color: var(--text-secondary);
}

.field-label i {
    font-size: 0.75rem;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.auth-form-simple .input-container {
    background: var(--input-bg);
    border: 1px solid var(--border-divider);
}

.input-container:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 175, 55, 0.3);
}

.auth-form-simple .input-container:hover {
    border-color: var(--primary-light);
}

.input-container:focus-within {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.auth-form-simple .input-container:focus-within {
    background: var(--content-bg);
    border-color: var(--primary);
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.auth-form-simple .input-icon {
    color: var(--text-muted);
}

.input-container:focus-within .input-icon {
    color: var(--primary);
}

.input-field {
    width: 100%;
    padding: 0.875rem 3rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 0.9375rem;
    font-weight: 400;
}

.auth-form-simple .input-field {
    color: var(--text-primary);
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-form-simple .input-field::placeholder {
    color: var(--placeholder-color);
}

.input-field:focus {
    outline: none;
}

/* Buttons */
.auth-button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.primary-button {
    background: var(--primary);
    color: var(--text-on-primary);
}

    .primary-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.6s;
    }

    .primary-button:hover::before {
        left: 100%;
    }

    .primary-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
    }

    .primary-button:active {
        transform: translateY(0);
    }

    .primary-button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.secondary-button {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

    .secondary-button:hover {
        background: var(--primary);
        color: var(--text-on-primary);
    }

/* Alerts */
.alert-modern {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.error-alert {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.warning-alert {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.info-alert {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.success-alert {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Field Errors */
.field-error {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-form-simple .form-footer {
    border-top: 1px solid var(--border-divider);
}

.footer-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.75rem;
}

.auth-form-simple .footer-text {
    color: var(--text-secondary);
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

    .footer-link:hover {
        color: var(--primary-hover);
    }

/* Message Cards */
.message-card {
    background: var(--content-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--elevation-4);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.message-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
}

    .message-icon.success {
        background: var(--success-light);
        color: var(--success);
    }

    .message-icon.error {
        background: var(--danger-light);
        color: var(--danger);
    }

    .message-icon.warning {
        background: var(--warning-light);
        color: var(--warning);
    }

.message-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.message-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.message-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .auth-branding {
        display: none;
    }

    .auth-form-section {
        border-radius: 24px;
    }
}

@media (max-width: 768px) {
    .auth-wrapper,
    .auth-wrapper-simple {
        padding: 1rem;
    }

    .auth-container,
    .auth-container-simple {
        min-height: auto;
    }

    .auth-form-section,
    .auth-form-simple {
        padding: 2rem;
    }

    .form-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .auth-form-section,
    .auth-form-simple {
        padding: 1.5rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .input-field {
        padding: 0.75rem 2.5rem;
        font-size: 0.875rem;
    }

    .auth-button {
        padding: 0.875rem;
    }
}

/* Dark Theme Adjustments */
.theme-atriver-dark .auth-wrapper,
.theme-atriver-dark .auth-wrapper-simple {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #A68416 100%);
}

.theme-atriver-dark .auth-container,
.theme-atriver-dark .auth-container-simple {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.theme-atriver-dark .auth-branding {
    background: #141414;
}

.theme-atriver-dark .feature-item {
    background: rgba(212, 175, 55, 0.08);
}

/* Print Styles */
@media print {
    .auth-wrapper,
    .auth-wrapper-simple {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .auth-container,
    .auth-container-simple {
        border: 2px solid var(--text-primary);
    }

    .input-container {
        border-width: 2px;
    }

    .auth-button {
        border: 2px solid var(--text-primary);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
