/* UnifiedAnalytiX auth & marketing pages — self-contained (no Tailwind required) */

:root {
    --bg-primary: #0B1120;
    --bg-secondary: #111827;
    --bg-card: #151D2E;
    --border-color: #1E293B;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --accent-blue: #3B82F6;
    --accent-purple: #A855F7;
    --accent-green: #22C55E;
}

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body.uax-auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-bg,
.uax-page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.login-bg .orb,
.uax-page-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
}

.login-bg .orb-1,
.uax-page-bg .orb-1 {
    width: 600px;
    height: 600px;
    background: #3B82F6;
    top: -200px;
    right: -100px;
}

.login-bg .orb-2,
.uax-page-bg .orb-2 {
    width: 500px;
    height: 500px;
    background: #A855F7;
    bottom: -150px;
    left: -100px;
}

.login-bg .orb-3,
.uax-page-bg .orb-3 {
    width: 300px;
    height: 300px;
    background: #22C55E;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-container,
.uax-page-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 20px;
    margin: 0 auto;
}

.login-card,
.uax-card {
    background: rgba(21, 29, 46, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px 32px;
}

.logo-section {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3B82F6, #A855F7);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.logo-section h1,
.uax-brand-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #3B82F6, #A855F7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-section p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.auth-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sso-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.sso-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-align: left;
}

.sso-btn:hover {
    border-color: #334155;
    background: #182035;
}

.sso-btn i {
    width: 22px;
    font-size: 18px;
    text-align: center;
}

.sso-btn .sso-arrow {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 12px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    font-size: 12px;
    color: var(--text-secondary);
}

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

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

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

.form-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-input:focus {
    border-color: var(--accent-blue);
}

.form-input::placeholder {
    color: #475569;
}

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

.input-with-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
}

.input-with-icon .form-input {
    padding-left: 40px;
}

.input-with-icon .toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
    font-size: 14px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
}

.form-row label {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin-bottom: 0;
}

.form-row a {
    color: var(--accent-blue);
    text-decoration: none;
}

.form-row a:hover {
    text-decoration: underline;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-blue);
}

.btn-primary {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: uax-spin 0.6s linear infinite;
}

.btn-secondary {
    display: block;
    width: 100%;
    padding: 13px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
    margin-top: 10px;
}

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

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

.footer-text {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.footer-text a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
}

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

.uax-footer-legal {
    text-align: center;
    margin-top: 16px;
    font-size: 11px;
    color: #475569;
}

.uax-footer-legal a {
    color: #475569;
    text-decoration: none;
}

.error-msg {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #FCA5A5;
    margin-bottom: 16px;
    display: none;
}

.error-msg i {
    margin-right: 6px;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.modal-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-close {
    float: right;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.connected {
    background: rgba(34, 197, 94, 0.12);
    color: #22C55E;
}

.password-strength {
    height: 3px;
    border-radius: 2px;
    background: var(--border-color);
    margin-top: 6px;
    overflow: hidden;
}

.password-strength .bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
    width: 0%;
}

.loading-spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: uax-spin 2s linear infinite;
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

.step-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.step-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.info-banner {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #93C5FD;
    line-height: 1.5;
}

.config-list { margin: 0; }
.config-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}
.config-item:last-child { border-bottom: none; }

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.success-icon i { font-size: 36px; color: var(--accent-green); }

.uax-glass {
    background: rgba(21, 29, 46, 0.85);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

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