/* Auth Pages CSS */

:root {
    --bg-primary: #0a0f1a;
    --bg-secondary: #0d1320;
    --bg-card: #111827;
    --bg-card-hover: #1a2233;
    --border-color: #1e293b;
    
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.3);
    
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --transition-normal: 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.auth-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-blue);
    top: -200px;
    right: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-purple);
    bottom: -100px;
    left: -100px;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    text-decoration: none;
    color: var(--text-primary);
}

.auth-logo svg {
    width: 36px;
    height: 36px;
    color: var(--accent-blue);
}

.auth-logo span {
    font-size: 1.75rem;
    font-weight: 700;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.auth-tab:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.auth-tab.active {
    color: var(--accent-blue);
    border-bottom: 2px solid var(--accent-blue);
}

.auth-form {
    display: none;
    padding: 2rem;
}

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

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

.auth-form h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.input-with-icon input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: monospace;
    text-transform: uppercase;
    transition: all var(--transition-normal);
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.input-with-icon input::placeholder {
    color: var(--text-muted);
    text-transform: none;
}

.input-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

.id-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.id-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.id-value {
    font-family: monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-blue);
    flex: 1;
}

.refresh-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.refresh-btn:hover {
    background: var(--bg-card-hover);
    color: var(--accent-blue);
}

.refresh-btn svg {
    width: 18px;
    height: 18px;
}

.refresh-btn.spinning svg {
    animation: spin 0.5s ease;
}

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

.benefits-list {
    margin-bottom: 1.5rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.benefit-item svg {
    width: 18px;
    height: 18px;
    color: var(--accent-green);
    flex-shrink: 0;
}

.auth-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.auth-btn:hover {
    background: var(--accent-blue-hover);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.auth-btn svg {
    width: 20px;
    height: 20px;
}

.auth-btn.secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.auth-btn.secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-blue);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 1rem;
}

.auth-error {
    display: none;
    color: var(--accent-red);
    font-size: 0.875rem;
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-md);
}

.auth-error.show {
    display: block;
}

.auth-success {
    display: none;
    color: var(--accent-green);
    font-size: 0.875rem;
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-md);
}

.auth-success.show {
    display: block;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-normal);
}

.auth-footer a:hover {
    color: var(--accent-blue);
}

/* Consent Checkbox */
.consent-group {
    margin-top: 0.5rem;
}

.consent-label {
    display: flex !important;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
    font-size: 0.8125rem !important;
    color: var(--text-muted) !important;
    line-height: 1.4;
}

.consent-label input[type="checkbox"] {
    margin-top: 0.15rem;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--accent-blue);
    cursor: pointer;
}

.consent-label a {
    color: var(--accent-blue);
    text-decoration: underline;
}

.consent-label a:hover {
    color: #60a5fa;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-footer a {
        display: inline-block;
        min-height: 44px;
        line-height: 44px;
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 1rem;
    }

    .auth-form {
        padding: 1.5rem;
    }

    .auth-form h2 {
        font-size: 1.25rem;
    }
}
