/* ===== AUTHENTICATION PAGES STYLES ===== */
/* Login, Signup, Password Reset Pages */

.auth-container {
    min-height: calc(100vh - 247px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background-color: var(--background-color);
}

.auth-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 900px) {
    .auth-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

/* Left side - Illustration */
.auth-illustration {
    display: none;
    align-items: center;
    justify-content: center;
}

@media (min-width: 900px) {
    .auth-illustration {
        display: flex;
    }
}

.auth-illustration img {
    width: 100%;
    max-width: 500px;
    height: auto;
}

/* Right side - Form */
.auth-form-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-label {
    display: block;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    line-height: 2.66;
    letter-spacing: 0.08333em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.auth-title {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 1.235;
    letter-spacing: 0.00735em;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

@media (min-width: 900px) {
    .auth-title {
        font-size: 2.125rem;
    }
}

.auth-subtitle {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: 0.00938em;
    color: var(--text-muted);
}

/* Form Styles */
.auth-form {
    width: 100%;
}

.auth-form-group {
    margin-bottom: 2rem;
}

.auth-form-label {
    display: block;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.57;
    letter-spacing: 0.00714em;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.auth-form-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

@media (min-width: 600px) {
    .auth-form-row {
        flex-direction: row;
        align-items: center;
    }
}

.auth-form-row .auth-form-label {
    margin-bottom: 0.5rem;
}

@media (min-width: 600px) {
    .auth-form-row .auth-form-label {
        margin-bottom: 0;
    }
}

.auth-form-input {
    width: 100%;
    padding: 1rem;
    font-family: "Inter", sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
}

.auth-form-input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(55, 125, 255, 0.1);
}

.auth-form-input:hover:not(:focus) {
    border-color: var(--gray-300);
}

.auth-form-input::placeholder {
    color: var(--gray-400);
}

.auth-form-input.error {
    border-color: var(--danger-color);
}

.auth-form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.auth-form-error {
    display: block;
    font-family: "Inter", sans-serif;
    font-size: 0.75rem;
    line-height: 1.66;
    color: var(--danger-color);
    margin-top: 0.5rem;
}

.auth-link {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.57;
    letter-spacing: 0.00714em;
    color: var(--primary-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--primary-600);
    text-decoration: underline;
}

/* Form Actions */
.auth-form-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    margin: 2rem auto 0;
    gap: 1rem;
}

@media (min-width: 600px) {
    .auth-form-actions {
        flex-direction: row;
        align-items: center;
    }
}

.auth-form-footer {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.57;
    letter-spacing: 0.00714em;
    color: var(--text-color);
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: 0.02857em;
    text-transform: uppercase;
    color: #ffffff;
    background-color: var(--primary-500);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.auth-btn:hover {
    background-color: var(--primary-600);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

.auth-btn:disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
    opacity: 0.6;
}

.auth-btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Flash Messages */
.auth-flash {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    font-family: "Inter", sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
}

.auth-flash-alert {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c00;
}

.auth-flash-notice {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #060;
}

/* Loading State */
.auth-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility */
.auth-form-input:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.auth-btn:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Terms and Conditions */
.auth-terms {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-terms-text {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.57;
    letter-spacing: 0.00714em;
    color: var(--text-muted);
}
