/* ============================================================
   HSE SaaS — Auth Pages CSS (Premium Split Layout)
   ============================================================ */

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

:root {
    --auth-bg: #050816;
    --auth-card: rgba(15, 20, 40, 0.7);
    --auth-card-border: rgba(255,255,255,0.06);
    --auth-text: #F1F5F9;
    --auth-text-muted: #64748B;
    --auth-text-secondary: #94A3B8;
    --auth-accent: #6366F1;
    --auth-accent-light: #818CF8;
    --auth-accent-glow: rgba(99, 102, 241, 0.15);
    --auth-green: #22C55E;
    --auth-border: rgba(255,255,255,0.08);
    --auth-input-bg: rgba(255,255,255,0.03);
    --auth-radius: 16px;
    --auth-radius-sm: 10px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html { -webkit-font-smoothing: antialiased; }

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    min-height: 100vh;
    background: var(--auth-bg);
    color: var(--auth-text);
    display: flex;
    overflow: hidden;
}

/* === SPLIT LAYOUT === */
.auth-split {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Left panel - decorative */
.auth-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-brand-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0F0B2E 0%, #1a103d 40%, #0d1b3e 100%);
}

.auth-brand-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 60% 50%, black 20%, transparent 70%);
}

.auth-brand-glow {
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}
.auth-brand-glow-1 { top: -100px; left: -100px; background: rgba(99,102,241,0.3); }
.auth-brand-glow-2 { bottom: -150px; right: -100px; background: rgba(6,182,212,0.2); }

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}
.auth-brand-logo-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-light));
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff;
    box-shadow: 0 4px 20px rgba(99,102,241,0.3);
}
.auth-brand-logo-text {
    font-family: 'Sora'; font-weight: 800; font-size: 24px; color: #fff;
    letter-spacing: -0.02em;
}
.auth-brand-logo-accent { color: var(--auth-accent-light); }

.auth-brand h1 {
    font-family: 'Sora';
    font-size: 36px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: #fff;
}
.auth-brand h1 span {
    background: linear-gradient(135deg, var(--auth-accent-light), #06B6D4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-brand p {
    font-size: 16px;
    color: var(--auth-text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
}

.auth-brand-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.auth-brand-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--auth-text-secondary);
}
.auth-brand-feature i {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: var(--auth-accent-glow);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: var(--auth-accent-light);
    flex-shrink: 0;
}

/* Right panel - form */
.auth-form-panel {
    width: 520px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(8, 12, 28, 0.6);
    border-left: 1px solid var(--auth-card-border);
    backdrop-filter: blur(20px);
    overflow-y: auto;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.auth-form-header {
    margin-bottom: 32px;
}
.auth-form-header h2 {
    font-family: 'Sora';
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    color: #fff;
}
.auth-form-header p {
    font-size: 14px;
    color: var(--auth-text-muted);
}

/* Form elements */
.auth-field {
    margin-bottom: 18px;
    position: relative;
}
.auth-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--auth-text-secondary);
    margin-bottom: 7px;
    letter-spacing: 0.02em;
}
.auth-field input,
.auth-field select {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--auth-radius-sm);
    background: var(--auth-input-bg);
    border: 1.5px solid var(--auth-border);
    color: #fff;
    font-family: 'DM Sans';
    font-size: 14px;
    transition: all 0.25s var(--ease);
}
.auth-field input::placeholder { color: rgba(148,163,184,0.5); }
.auth-field input:hover { border-color: rgba(255,255,255,0.12); }
.auth-field input:focus {
    outline: none;
    border-color: var(--auth-accent);
    background: rgba(99,102,241,0.04);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}

.auth-field-icon {
    position: absolute;
    right: 14px;
    top: 38px;
    color: var(--auth-text-muted);
    font-size: 16px;
}

.auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.auth-actions a {
    font-size: 13px;
    color: var(--auth-accent-light);
    transition: color 0.2s;
}
.auth-actions a:hover { color: #fff; }

.auth-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: var(--auth-radius-sm);
    background: linear-gradient(135deg, var(--auth-accent), #4F46E5);
    color: #fff;
    font-family: 'DM Sans';
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 12px rgba(99,102,241,0.3);
    letter-spacing: 0.01em;
}
.auth-btn:hover {
    box-shadow: 0 6px 24px rgba(99,102,241,0.4);
    transform: translateY(-2px);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--auth-text-muted);
    font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--auth-text-muted);
}
.auth-footer a {
    color: var(--auth-accent-light);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.auth-footer a:hover { color: #fff; }

.auth-trial-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--auth-radius-sm);
    margin-bottom: 24px;
    background: rgba(34,197,94,0.06);
    border: 1px solid rgba(34,197,94,0.12);
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-green);
}

/* Alerts inside auth */
.auth-alert {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: var(--auth-radius-sm);
    margin-bottom: 18px; font-size: 13px;
    border-left: 3px solid transparent;
}
.auth-alert-success { background: rgba(34,197,94,0.06); color: #4ADE80; border-left-color: var(--auth-green); }
.auth-alert-error { background: rgba(239,68,68,0.06); color: #F87171; border-left-color: #EF4444; }
.auth-alert-warning { background: rgba(245,158,11,0.06); color: #FBBF24; border-left-color: #F59E0B; }
.auth-alert-info { background: rgba(99,102,241,0.06); color: var(--auth-accent-light); border-left-color: var(--auth-accent); }

/* Mobile responsive */
@media (max-width: 1024px) {
    .auth-brand { display: none; }
    .auth-form-panel {
        width: 100%;
        border-left: none;
        background: var(--auth-bg);
    }
}

@media (max-width: 480px) {
    .auth-form-panel { padding: 24px 20px; }
    .auth-form-header h2 { font-size: 22px; }
    .auth-field-row { grid-template-columns: 1fr; }
}
