/**
 * Modern Authentication Pages - Subtle Masonic Theme
 * Features: Deep blue/gold palette, geometric patterns, modern glassmorphism
 */

:root {
    --auth-navy: #1a2332;
    --auth-royal-blue: #2c3e50;
    --auth-gold: #d4af37;
    --auth-gold-dark: #b8860b;
    --auth-light: #f8f9fa;
    --auth-card-bg: rgba(255, 255, 255, 0.98);
}

/* Body Background with Subtle Geometric Pattern */
body.auth-page {
    background: linear-gradient(135deg, var(--auth-navy) 0%, var(--auth-royal-blue) 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body.auth-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(45deg, transparent 48%, rgba(212, 175, 55, 0.03) 49%, rgba(212, 175, 55, 0.03) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(212, 175, 55, 0.03) 49%, rgba(212, 175, 55, 0.03) 51%, transparent 52%);
    background-size: 60px 60px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

/* Auth Container */
.auth-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

/* Modern Card with Glassmorphism */
.auth-card {
    background: var(--auth-card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
}

/* Subtle Top Border Accent */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--auth-gold-dark), var(--auth-gold), var(--auth-gold-dark));
}

/* Card Body Padding */
.auth-card-body {
    padding: 3rem 2.5rem;
}

@media (min-width: 576px) {
    .auth-card-body {
        padding: 3.5rem 3rem;
    }
}

/* Page Title */
.auth-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--auth-navy);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 2rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.auth-title i {
    color: var(--auth-gold);
    font-size: 1.75rem;
}

/* Form Elements */
.auth-form .form-label {
    font-weight: 500;
    color: var(--auth-navy);
    margin-bottom: 0.5rem;
}

.auth-form .form-control,
.auth-form .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: white;
}

.auth-form .form-control:focus,
.auth-form .form-select:focus {
    border-color: var(--auth-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    outline: none;
}

/* Primary Button */
.auth-btn-primary {
    background: linear-gradient(135deg, var(--auth-gold-dark) 0%, var(--auth-gold) 100%);
    border: none;
    border-radius: 8px;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
}

.auth-btn-primary::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.5s ease;
}

.auth-btn-primary:hover::before {
    left: 100%;
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, var(--auth-gold) 0%, var(--auth-gold-dark) 100%);
}

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

/* Links */
.auth-link {
    color: var(--auth-royal-blue);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.auth-link:hover {
    color: var(--auth-gold-dark);
    text-decoration: none;
}

/* Divider */
.auth-divider {
    margin: 2rem 0;
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ddd, transparent);
}

/* Helper Text */
.auth-helper-text {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Alert Messages */
.auth-page .alert {
    border-radius: 8px;
    border: none;
    margin-bottom: 1.5rem;
}

/* Code Input (for 2FA) */
.auth-code-input {
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    font-weight: 600;
    text-align: center;
    font-family: 'Courier New', monospace;
}

/* Geometric Decorative Elements */
.auth-card::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), transparent);
    border-radius: 50%;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .auth-card-body {
        padding: 2rem 1.5rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-btn-primary {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Read-only field styling */
.auth-form .form-control[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
    border-color: #dee2e6;
}

/* Secondary action text */
.auth-secondary-action {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.auth-secondary-action p {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.auth-secondary-action a {
    color: var(--auth-gold-dark);
    font-weight: 600;
    text-decoration: none;
}

.auth-secondary-action a:hover {
    color: var(--auth-gold);
    text-decoration: underline;
}
