/* UATS Authentication Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    position: relative;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 32px;
    color: #1f2937;
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    color: #6b7280;
    font-size: 14px;
}

.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

h2 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 8px;
}

.step-description {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
}

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

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

input[type="email"],
input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
    background: white;
}

input[type="email"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="email"]::placeholder,
input[type="text"]::placeholder {
    color: #9ca3af;
}

.form-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

.btn-primary,
.btn-secondary,
.btn-link {
    width: 100%;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: #667eea;
    color: white;
    margin-bottom: 12px;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-link {
    background: none;
    color: #667eea;
    padding: 8px;
    font-size: 14px;
}

.btn-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

.resend-section {
    margin-top: 24px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.resend-section p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.loading {
    text-align: center;
    padding: 40px 20px;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

#loading-message {
    color: #6b7280;
    font-size: 14px;
}

.error-message,
.success-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

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

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.success-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.error-message.hidden,
.success-message.hidden {
    display: none;
}

.error-icon,
.success-icon {
    font-size: 20px;
    font-weight: bold;
}

.auth-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

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

    .auth-header h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 20px;
    }
}

/* Loading state overlay */
.auth-card.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    z-index: 5;
}

.auth-card.loading-overlay #loading {
    position: relative;
    z-index: 10;
}
