/* ==========================================
   Auth Pages Styles (Login & Register)
   ========================================== */

/* Override body for auth pages - center everything */
.auth-page {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    padding: 24px !important;
}

/* Container */
.auth-container {
    background: var(--bg-card);
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    box-shadow: var(--shadow-elevated);
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-primary);
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo h1 {
    font-family: var(--font-serif);
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
    margin-top: 16px;
    letter-spacing: 0.05em;
}

.auth-logo-icon {
    width: 56px;
    height: 56px;
    border: 2px solid var(--accent-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 24px;
    font-family: var(--font-serif);
}

/* Form Groups with animation */
.auth-form-group {
    margin-bottom: 24px;
    opacity: 0;
    animation: authFadeIn 0.5s ease-out forwards;
}

.auth-form-group:nth-of-type(1) { animation-delay: 0.08s; }
.auth-form-group:nth-of-type(2) { animation-delay: 0.16s; }
.auth-form-group:nth-of-type(3) { animation-delay: 0.24s; }
.auth-form-group:nth-of-type(4) { animation-delay: 0.32s; }

.auth-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.auth-form-group input {
    width: 100%;
    padding: 12px 0;
    min-height: 44px;
    border: none;
    border-bottom: 2px solid var(--border-subtle);
    border-radius: 0;
    font-size: 15px;
    background: transparent;
    transition: border-color 0.3s;
    color: var(--text-primary);
    font-family: var(--font-primary);
}

.auth-form-group input:focus {
    outline: none;
    border-bottom-color: var(--accent-primary);
}

.auth-form-group input::placeholder {
    color: var(--text-muted);
}

/* SMS Row */
.sms-row {
    display: flex;
    gap: 10px;
}

.sms-row input {
    flex: 1;
}

.btn-sms {
    padding: 12px 15px;
    background: var(--bg-warm);
    border: 1px solid var(--border-medium);
    border-radius: 0;
    color: var(--accent-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    min-width: 100px;
    flex-shrink: 0;
    font-family: var(--font-primary);
    transition: all var(--transition-normal);
}

.btn-sms:hover {
    background: var(--bg-primary);
    border-color: var(--accent-primary);
}

.btn-sms:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Auth Button */
.auth-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent-primary);
    border: none;
    border-radius: 0;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: 10px;
    font-family: var(--font-primary);
}

.auth-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.25);
}

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

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages */
.error-message {
    background: #fef2f2;
    border-left: 3px solid var(--accent-warm);
    color: #991b1b;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 24px;
    display: none;
}

.error-message.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.error-message.shake {
    animation: slideDown 0.3s ease-out, shake 0.35s ease-in-out 0.3s;
}

.success-message {
    background: #f0fdf4;
    border-left: 3px solid var(--accent-secondary);
    color: #166534;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 24px;
    display: none;
}

.success-message.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

/* Footer Link */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Password Toggle */
.password-field {
    position: relative;
}

.password-field input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--text-secondary);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* Responsive */
@media (max-width: 480px) {
    .auth-page {
        padding: 16px !important;
    }

    .auth-container {
        padding: 36px 24px;
    }

    .auth-logo h1 {
        font-size: 24px;
    }

    .auth-logo-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}
