﻿/* â”€â”€ DESIGN TOKENS â”€â”€ */
        :root {
            --sg-bg: #0a0f0f;
            --sg-card: rgba(24, 24, 27, 0.85);
            --sg-card-solid: #18181b;
            --sg-border: rgba(255, 255, 255, 0.08);
            --sg-border-hover: rgba(255, 255, 255, 0.16);
            --sg-accent: #00C8FF;
            --sg-accent-hover: #00A8D8;
            --sg-accent-secondary: #22d3ee;
            --sg-accent-glow: rgba(0, 200, 255, 0.2);
            --sg-text-primary: #f8fafc;
            --sg-text-muted: #9599a1;
            --sg-text-dim: #c4c4cc;
            --sg-input-bg: rgba(15, 23, 42, 0.8);
            --sg-error: #f87171;
            --sg-success: #4ade80;
            --sg-trans: 200ms cubic-bezier(0.4, 0, 0.2, 1);
            --sg-radius: 12px;
        }

        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
        html { scroll-behavior: smooth; }

        body {
            font-family: 'IBM Plex Sans', system-ui, sans-serif;
            background: var(--sg-bg);
            color: var(--sg-text-primary);
            min-height: 100vh;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
        }

        /* â”€â”€ SPLIT LAYOUT â”€â”€ */
        .sg-auth-split {
            display: grid;
            grid-template-columns: 58fr 42fr;
            min-height: 100vh;
        }

        /* â”€â”€ BRAND PANEL (Left) â”€â”€ */
        .sg-auth-brand {
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding: 64px 56px;
            overflow: hidden;
            background: linear-gradient(160deg, #0a1212 0%, #09090b 55%, #0b1718 100%);
        }

        .sg-auth-brand::before {
            content: "";
            position: absolute;
            inset: 0;
            background:
                radial-gradient(circle at 30% 20%, rgba(0, 200, 255, 0.14), transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(34, 211, 238, 0.1), transparent 50%);
            pointer-events: none;
        }

        .sg-auth-brand::after {
            content: "";
            position: absolute;
            inset: 0;
            background:
                repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(255,255,255,0.02) 50px, rgba(255,255,255,0.02) 51px),
                repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(255,255,255,0.02) 50px, rgba(255,255,255,0.02) 51px);
            pointer-events: none;
        }

        .sg-brand-inner {
            position: relative;
            z-index: 1;
            max-width: 480px;
            display: flex;
            flex-direction: column;
        }

        .sg-brand-logo {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
            text-decoration: none;
        }

        .sg-brand-logo img {
            height: 64px;
            width: auto;
            filter: drop-shadow(0 0 16px rgba(0, 200, 255, 0.35));
        }

        .sg-brand-tagline {
            font-family: 'Sora', sans-serif;
            font-size: clamp(1.75rem, 3vw, 2.5rem);
            font-weight: 700;
            line-height: 1.2;
            letter-spacing: -0.02em;
            color: #fff;
            margin-bottom: 16px;
        }

        .sg-brand-desc {
            font-size: 1.06rem;
            color: var(--sg-text-muted);
            line-height: 1.6;
            margin-bottom: 40px;
        }

        .sg-brand-features {
            display: flex;
            flex-direction: column;
            gap: 20px;
            margin-bottom: 48px;
        }

        .sg-brand-feature {
            display: flex;
            align-items: center;
            gap: 14px;
            animation: sg-fadeUp 0.6s ease-out both;
            transition: transform 180ms ease;
        }
        .sg-brand-feature:nth-child(1) { animation-delay: 0.1s; }
        .sg-brand-feature:nth-child(2) { animation-delay: 0.2s; }
        .sg-brand-feature:nth-child(3) { animation-delay: 0.3s; }
        .sg-brand-feature:hover { transform: translateX(4px); }

        .sg-brand-feature-icon {
            width: 40px; height: 40px;
            border-radius: 10px;
            background: rgba(0, 200, 255, 0.12);
            border: 1px solid rgba(0, 200, 255, 0.2);
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0;
        }

        .sg-brand-feature-icon svg {
            width: 20px; height: 20px;
            color: var(--sg-accent);
        }

        .sg-brand-feature-text h4 {
            font-family: 'Sora', sans-serif;
            font-size: 0.9375rem;
            font-weight: 600;
            color: var(--sg-text-primary);
            margin-bottom: 2px;
        }

        .sg-brand-feature-text p {
            font-size: 0.8125rem;
            color: var(--sg-text-muted);
        }

        .sg-brand-badges {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
            animation: sg-fadeUp 0.6s ease-out 0.4s both;
        }

        .sg-brand-badge {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--sg-text-dim);
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .sg-brand-badge svg { width: 14px; height: 14px; color: var(--sg-accent-secondary); }

        /* â”€â”€ FORM PANEL (Right) â”€â”€ */
        .sg-auth-form-panel {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 48px 40px;
            position: relative;
            overflow: hidden;
        }

        .sg-auth-form-panel::before {
            content: "";
            position: absolute;
            inset: 0;
            background:
                radial-gradient(ellipse at 60% 20%, rgba(0,200,255,0.10) 0%, transparent 55%),
                radial-gradient(ellipse at 40% 90%, rgba(0,200,255,0.05) 0%, transparent 40%);
            pointer-events: none;
        }

        .sg-auth-container {
            width: 100%;
            max-width: 400px;
            position: relative;
            z-index: 1;
            animation: sg-fadeUp 0.5s ease-out both;
        }

        /* Back link (inside card) */
        .sg-auth-card-back {
            position: absolute;
            top: 20px;
            left: 20px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: transparent;
            border: 1px solid transparent;
            color: var(--sg-text-muted);
            text-decoration: none;
            transition: all var(--sg-trans);
            z-index: 10;
        }
        .sg-auth-card-back:hover {
            color: var(--sg-text-primary);
            background: rgba(255, 255, 255, 0.08);
            border-color: var(--sg-border-hover);
        }
        .sg-auth-card-back:focus-visible {
            outline: 2px solid var(--sg-accent);
            outline-offset: 2px;
        }
        .sg-auth-card-back svg { width: 16px !important; height: 16px !important; display: block; flex-shrink: 0; }

        /* Form card */
        .sg-auth-card {
            position: relative;
            background: var(--sg-card);
            border: 1px solid var(--sg-border);
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 20px;
            padding: 60px 36px 36px;
            backdrop-filter: blur(24px);
            box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05) inset, 0 1px 0 rgba(255,255,255,0.08) inset;
        }

        .sg-auth-title {
            font-family: 'Sora', sans-serif;
            font-size: 2rem;
            font-weight: 700;
            letter-spacing: -0.02em;
            margin-bottom: 6px;
            color: #fff;
        }

        .sg-auth-subtitle {
            font-size: 0.9375rem;
            color: var(--sg-text-muted);
            margin-bottom: 28px;
            line-height: 1.5;
        }

        .sg-auth-subtitle a {
            color: var(--sg-accent);
            text-decoration: none;
            font-weight: 500;
            transition: color var(--sg-trans);
        }
        .sg-auth-subtitle a:hover { color: #5eead4; }

        /* Google button */
        .sg-auth-google {
            width: 100%;
            padding: 12px 16px;
            background: rgba(255,255,255,0.07);
            border: 1px solid rgba(255,255,255,0.13);
            border-radius: var(--sg-radius);
            color: #fff;
            font-family: inherit;
            font-size: 0.9375rem;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            transition: all var(--sg-trans);
        }
        .sg-auth-google:hover {
            background: rgba(255,255,255,0.12);
            border-color: rgba(255,255,255,0.18);
            transform: translateY(-1px);
        }
        .sg-auth-google:focus-visible {
            outline: 2px solid var(--sg-accent);
            outline-offset: 2px;
        }
        .sg-auth-google svg { width: 18px; height: 18px; flex-shrink: 0; }

        /* Divider */
        .sg-auth-divider {
            display: flex;
            align-items: center;
            gap: 14px;
            margin: 24px 0;
            color: var(--sg-text-muted);
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .sg-auth-divider::before, .sg-auth-divider::after {
            content: ""; flex: 1; height: 1px;
            background: linear-gradient(90deg, transparent, var(--sg-border), transparent);
        }

        /* Form fields */
        .sg-auth-form-group { margin-bottom: 20px; text-align: left; }

        .sg-auth-label {
            display: block;
            font-size: 0.8125rem;
            font-weight: 600;
            color: var(--sg-text-primary);
            opacity: 0.75;
            margin-bottom: 8px;
            letter-spacing: 0.01em;
        }

        .sg-auth-input-wrap {
            position: relative;
            display: flex;
            align-items: center;
        }

        .sg-auth-input-icon {
            position: absolute;
            left: 14px;
            width: 18px; height: 18px;
            color: #475569;
            pointer-events: none;
            transition: color var(--sg-trans);
        }

        .sg-auth-input-wrap:focus-within .sg-auth-input-icon {
            color: var(--sg-accent);
        }

        .sg-auth-input {
            width: 100%;
            padding: 13px 14px 13px 42px;
            background: var(--sg-input-bg);
            border: 1px solid var(--sg-border);
            border-radius: var(--sg-radius);
            color: #fff;
            font-family: inherit;
            font-size: 0.9375rem;
            outline: none;
            transition: all var(--sg-trans);
        }
        .sg-auth-input-wrap:has(.sg-auth-password-toggle) .sg-auth-input {
            padding-right: 46px;
        }
        .sg-auth-input:hover { border-color: var(--sg-border-hover); }
        .sg-auth-input:focus {
            border-color: var(--sg-accent);
            box-shadow: 0 0 0 3px var(--sg-accent-glow);
        }
        .sg-auth-input::placeholder { color: #475569; }
        .sg-auth-input.has-error {
            border-color: var(--sg-error);
            animation: sg-shake 0.35s ease;
        }

        /* Password toggle */
        .sg-auth-password-toggle {
            position: absolute;
            right: 12px;
            background: none; border: none;
            color: var(--sg-text-muted);
            cursor: pointer;
            padding: 4px;
            display: flex; align-items: center; justify-content: center;
            transition: color var(--sg-trans);
            z-index: 2;
        }
        .sg-auth-password-toggle:hover { color: var(--sg-text-primary); }
        .sg-auth-password-toggle svg { width: 18px; height: 18px; }

        /* Forgot password */
        .sg-auth-forgot {
            display: block;
            text-align: right;
            font-size: 0.8125rem;
            color: var(--sg-accent);
            text-decoration: none;
            margin-top: 8px;
            margin-bottom: -8px;
            transition: color var(--sg-trans);
        }
        .sg-auth-forgot:hover { color: #5eead4; }

        /* Field error */
        .sg-auth-error {
            display: none;
            font-size: 0.75rem;
            color: var(--sg-error);
            margin-top: 6px;
            min-height: 1.125rem;
        }

        /* Primary button */
        .sg-auth-btn-primary {
            width: 100%;
            padding: 14px 20px;
            background: linear-gradient(135deg, var(--sg-accent), var(--sg-accent-secondary));
            color: #05111a;
            border: none;
            border-radius: var(--sg-radius);
            font-family: 'Sora', sans-serif;
            font-size: 0.9375rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-top: 8px;
            display: flex; align-items: center; justify-content: center; gap: 8px;
            box-shadow: 0 4px 16px rgba(0, 200, 255, 0.3);
        }
        .sg-auth-btn-primary:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 28px rgba(0, 200, 255, 0.4);
        }
        .sg-auth-btn-primary:active:not(:disabled) {
            transform: translateY(1px) scale(0.995);
            box-shadow: 0 2px 8px rgba(0, 200, 255, 0.2);
        }
        .sg-auth-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
        .sg-auth-btn-primary:focus-visible {
            outline: 2px solid var(--sg-accent);
            outline-offset: 2px;
        }

        /* Feedback banners */
        .sg-auth-feedback {
            display: block;
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            border-radius: 10px;
            font-size: 0.875rem;
            border: 1px solid transparent;
            padding: 0 14px;
            transition: max-height 280ms ease, opacity 220ms ease, padding 220ms ease, margin-top 220ms ease;
            margin-top: 0;
        }
        .sg-auth-feedback.error {
            display: block;
            max-height: 80px;
            opacity: 1;
            padding: 12px 14px;
            margin-top: 16px;
            background: rgba(239, 68, 68, 0.08);
            border-color: rgba(239, 68, 68, 0.15);
            color: var(--sg-error);
        }
        .sg-auth-feedback.success {
            display: block;
            max-height: 80px;
            opacity: 1;
            padding: 12px 14px;
            margin-top: 16px;
            background: rgba(34, 197, 94, 0.08);
            border-color: rgba(34, 197, 94, 0.15);
            color: var(--sg-success);
        }

        /* Spinner */
        .sg-auth-loader {
            display: inline-block;
            width: 16px; height: 16px;
            border: 2px solid rgba(255,255,255,0.3);
            border-top-color: #fff;
            border-radius: 50%;
            animation: sg-spin 0.6s linear infinite;
        }

        /* Trust signals */
        .sg-auth-trust {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 4px 14px;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        .sg-auth-trust-item {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.6875rem;
            color: var(--sg-text-muted);
            white-space: nowrap;
        }
        .sg-auth-trust-item svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--sg-accent-secondary); }

        /* â”€â”€ ANIMATIONS â”€â”€ */
        @keyframes sg-shake {
            0%, 100% { transform: translateX(0); }
            20% { transform: translateX(-6px); }
            60% { transform: translateX(6px); }
            80% { transform: translateX(-3px); }
        }
        @keyframes sg-fadeUp {
            from { opacity: 0; transform: translateY(16px); }
            to { opacity: 1; transform: translateY(0); }
        }
        @keyframes sg-spin { to { transform: rotate(360deg); } }

        /* â”€â”€ RESPONSIVE â”€â”€ */
        @media (max-width: 900px) {
            .sg-auth-split { grid-template-columns: 1fr; }
            .sg-auth-brand { display: none; }
            .sg-auth-form-panel { padding: 32px 20px; min-height: 100vh; }
            .sg-auth-card { padding: 32px 24px; }

            /* Show a compact logo above the form on mobile */
            .sg-auth-mobile-logo { display: flex !important; }
        }

        @media (min-width: 901px) {
            .sg-auth-mobile-logo { display: none !important; }
        }

        .sg-auth-mobile-logo {
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-bottom: 24px;
            text-decoration: none;
        }
        .sg-auth-mobile-logo img { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(0, 200, 255, 0.35)); }

