/* ===========================
   AUTH PAGES STYLES
   =========================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    padding: 24px;
    position: relative;
    z-index: 10;
}

/* Onboarding container plus large */
.auth-page:has(.onboarding-box) .auth-container {
    max-width: 900px;
}

.auth-box,
.onboarding-box {
    background: white;
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease-out;
}

.onboarding-box {
    max-width: 100%;
    padding: 56px 64px;
}

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

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

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 32px;
    text-decoration: none;
}

.auth-title,
.onboarding-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.2;
}

.auth-subtitle,
.onboarding-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Body */
.auth-body,
.onboarding-body {
    margin-bottom: 32px;
}

/* Messages */
.error-message {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
    color: #c33;
    font-size: 14px;
    animation: shake 0.5s;
}

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

.loading-message {
    text-align: center;
    padding: 32px 0;
}

.loader {
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.loading-message p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Google Sign-In Button */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 24px;
}

.btn-google:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.btn-google:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.google-icon {
    flex-shrink: 0;
}

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

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 100px);
    height: 1px;
    background: var(--border-color);
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-divider span {
    background: white;
    padding: 0 16px;
    font-size: 13px;
    color: var(--text-light);
    position: relative;
}

/* Auth Info */
.auth-info {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 16px;
    margin-top: 24px;
}

.info-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    text-align: center;
}

/* Footer */
.auth-footer,
.onboarding-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.auth-footer a,
.onboarding-footer a {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.auth-footer a:hover,
.onboarding-footer a:hover {
    color: var(--primary);
}

/* Onboarding Form */
.onboarding-form {
    margin-top: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    transition: var(--transition);
    background: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-help {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.input-group {
    position: relative;
    display: flex;
}

.input-group .form-input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-addon {
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-left: none;
    border-radius: 0 10px 10px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
}

.form-info p {
    font-size: 13px;
    color: #0369a1;
    margin: 0;
    line-height: 1.5;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Decoration */
.auth-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 400px;
    height: 400px;
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.circle-2 {
    width: 300px;
    height: 300px;
    bottom: -150px;
    right: -150px;
    animation-delay: 7s;
}

.circle-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: -100px;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-page:has(.onboarding-box) .auth-container {
        max-width: 700px;
    }
    
    .onboarding-box {
        padding: 48px 48px;
    }
}

@media (max-width: 768px) {
    .auth-container,
    .auth-page:has(.onboarding-box) .auth-container {
        padding: 16px;
        max-width: 100%;
    }
    
    .auth-box,
    .onboarding-box {
        padding: 32px 24px;
    }
    
    .auth-title,
    .onboarding-title {
        font-size: 26px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-divider::before,
    .auth-divider::after {
        width: calc(50% - 80px);
    }
    
    .auth-title,
    .onboarding-title {
        font-size: 22px;
    }
}

/* Link Secondary */
.link-secondary {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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