/* Auth Modal - Minimalist Architectural Design */

/* Auth Page Layout - Minimalist Architectural Design */

@keyframes auth-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    background: var(--bg-tertiary);
    /* Soft background to contrast card */
    padding: 60px 20px;
    position: relative;
    overflow-x: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(var(--glass-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

/* Auth Container */
.auth-container {
    margin: auto;
    z-index: 1;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 2px;
    padding: 48px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: var(--shadow-elevated);

    /* Entrance Animation */
    opacity: 0;
    animation: auth-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Close Button */
.auth-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.auth-close:hover {
    transform: rotate(90deg);
}

.auth-close span {
    position: absolute;
    width: 20px;
    height: 1px;
    background: var(--text-tertiary);
    transition: background 0.3s ease;
}

.auth-close span:first-child {
    transform: rotate(45deg);
}

.auth-close span:last-child {
    transform: rotate(-45deg);
}

.auth-close:hover span {
    background: var(--text-primary);
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    margin-bottom: 24px;
}

.auth-logo img {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: invert(var(--icon-invert));
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    transition: color 0.3s ease;
}

.form-input,
.form-select {
    width: 100%;
    padding: 14px 0;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    outline: none;
    transition: border-color 0.3s ease;
    font-family: var(--font-body);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23737373' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 20px;
}

.form-select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-input::placeholder {
    color: var(--text-quaternary);
    font-weight: 400;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--text-primary);
}

.form-input:focus+.form-line,
.form-input:not(:placeholder-shown)+.form-line {
    transform: scaleX(1);
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-group:focus-within .form-label {
    color: var(--text-primary);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -8px;
}

.vertical-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-top: 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 1px solid var(--text-quaternary);
    border-radius: 0;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-container input:checked+.checkmark {
    background: var(--text-primary);
    border-color: var(--text-primary);
}

.checkbox-container input:checked+.checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid var(--bg-primary);
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.forgot-link {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--text-primary);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    margin-top: 12px;
    padding: 18px 36px;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.auth-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: var(--text-secondary);
}

/* Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 28px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--glass-border);
}

.auth-divider span {
    position: relative;
    background: var(--bg-primary);
    padding: 0 16px;
    font-size: 0.75rem;
    color: var(--text-quaternary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-mono);
}

/* Social Login */
.social-login {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: 2px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.social-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--text-tertiary);
    color: var(--text-primary);
}

.social-btn svg {
    flex-shrink: 0;
}

/* Dark Theme Adjustments */
body.dark-theme .auth-close span {
    background: var(--text-tertiary);
}

body.dark-theme .auth-close:hover span {
    background: var(--text-primary);
}

body.dark-theme .social-btn {
    background: var(--bg-tertiary);
}

/* Responsive */
@media (max-width: 480px) {
    .auth-container {
        margin: 20px;
        padding: 36px 24px;
    }

    .form-options {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .social-login {
        flex-direction: column;
    }
}