﻿        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
        :root {
            --primary-50: #f0f9ff;
            --primary-100: #e0f2fe;
            --primary-200: #bae6fd;
            --primary-300: #7dd3fc;
            --primary-400: #38bdf8;
            --primary-500: #0ea5e9;
            --primary-600: #0284c7;
            --primary-700: #0369a1;

            --bg-light: #f8fafc;
            --surface-light: #ffffff;
            --border-subtle: rgba(148, 163, 184, 0.22);
            --text-main: #0f172a;
            --text-muted: #64748b;

            --bg-dark: #090d16;
            --surface-dark: #0f172a;
            --border-dark: rgba(71, 85, 105, 0.4);
            --dark-text-primary: #f8fafc;
            --dark-text-tertiary: #94a3b8;

            --shadow-card: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(15, 23, 42, 0.03);
            --radius-md: 0.875rem;
            --radius-lg: 1.25rem;
            --radius-xl: 2rem;
        }
        * { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
        body {
            margin: 0;
            min-height: 100vh;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background-color: var(--bg-light);
            color: var(--text-main);
            transition: background-color 0.3s, color 0.3s;
            letter-spacing: -0.01em;
        }
        body.dark-off { background-color: var(--bg-dark); color: var(--dark-text-primary); }

        .auth-topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 20px 32px;
            max-width: 1280px;
            margin: 0 auto;
        }
        .auth-logo-link {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
            color: var(--text-main);
            transition: transform 0.2s ease;
        }
        .auth-logo-link:hover {
            transform: scale(1.02);
        }
        body.dark-off .auth-logo-link { color: #fff; }
        .auth-logo-img { height: 32px; width: auto; object-fit: contain; }
        .auth-logo-name { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }
        .auth-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            border: 1px solid var(--border-subtle);
            border-radius: 50%;
            background: #fff;
            color: #64748b;
            cursor: pointer;
            transition: all 0.2s;
        }
        .auth-toggle:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
        body.dark-off .auth-toggle { background: rgb(30, 41, 59); color: rgb(203, 213, 225); border-color: var(--border-dark); }
        .auth-toggle i { width: 18px; height: 18px; }

        .auth-wrap {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 24px 16px 48px;
            min-height: calc(100vh - 120px);
        }
        .auth-card {
            width: 100%;
            max-width: 440px;
            background: var(--surface-light);
            border: 1px solid var(--border-subtle);
            border-radius: var(--radius-xl);
            box-shadow: var(--shadow-card);
            padding: 40px 36px 36px;
            margin: 0 auto;
        }
        body.dark-off .auth-card {
            background: var(--surface-dark);
            border-color: var(--border-dark);
            box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.5);
        }

        .auth-icon {
            width: 54px;
            height: 54px;
            border-radius: 1.1rem;
            background: var(--primary-100);
            color: var(--primary-600);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
            box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
        }
        .auth-icon i { width: 26px; height: 26px; }
        body.dark-off .auth-icon { background: rgba(12, 74, 110, 0.35); color: var(--primary-400); }

        .auth-title { font-size: 1.45rem; font-weight: 800; color: #0f172a; margin-bottom: 6px; letter-spacing: -0.02em; }
        body.dark-off .auth-title { color: #fff; }
        .auth-sub { font-size: 0.88rem; color: #64748b; margin-bottom: 24px; line-height: 1.45; }
        body.dark-off .auth-sub { color: rgb(148, 163, 184); }

        .auth-label { font-size: 0.82rem; font-weight: 700; color: #475569; margin-bottom: 6px; }
        body.dark-off .auth-label { color: rgb(203, 213, 225); }
        .auth-hint { font-weight: 400; color: #94a3b8; }
        body.dark-off .auth-hint { color: rgb(100, 116, 139); }

        .auth-input {
            width: 100%;
            padding: 12px 16px;
            font-size: 0.92rem;
            font-family: inherit;
            color: #0f172a;
            background: #fff;
            border: 1px solid var(--border-subtle);
            border-radius: var(--radius-md);
            outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .auth-input:focus {
            border-color: var(--primary-600);
            box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
        }
        body.dark-off .auth-input {
            background: rgb(30, 41, 59);
            color: #fff;
            border-color: rgb(51, 65, 85);
        }
        body.dark-off .auth-input::placeholder { color: rgb(100, 116, 139); }

        .auth-check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; user-select: none; }
        .auth-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--primary-600); flex-shrink: 0; }
        .auth-check-label { font-size: 0.82rem; color: #64748b; line-height: 1.45; }
        body.dark-off .auth-check-label { color: rgb(148, 163, 184); }

        .btn-auth {
            width: 100%;
            padding: 14px;
            font-size: 0.95rem;
            font-weight: 700;
            font-family: inherit;
            color: #fff;
            background: #0f172a;
            border: 0;
            border-radius: var(--radius-md);
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
        }
        .btn-auth:hover { opacity: 0.94; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2); }
        .btn-auth:active { transform: translateY(0); }
        .btn-auth:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
        body.dark-off .btn-auth { background: var(--primary-600); box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3); }

        .auth-alert {
            font-size: 0.84rem;
            border-radius: var(--radius-md);
            padding: 12px 16px;
            margin-bottom: 18px;
            line-height: 1.4;
        }
        .auth-alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
        .auth-alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
        body.dark-off .auth-alert-error { background: rgba(127, 29, 29, 0.35); color: #fca5a5; border-color: rgba(248, 113, 113, 0.35); }
        body.dark-off .auth-alert-success { background: rgba(6, 78, 59, 0.35); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.35); }

        .yandex-sdk-button {
            width: 100%;
            min-height: 44px;
            margin-bottom: 8px;
        }
        .yandex-sdk-button iframe { width: 100% !important; }
        .auth-divider {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 18px 0 20px;
            color: #94a3b8;
            font-size: 0.78rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        .auth-divider::before,
        .auth-divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: var(--border-subtle);
        }
        body.dark-off .auth-divider::before,
        body.dark-off .auth-divider::after { background: var(--border-dark); }

        .yandex-link-card {
            border: 1px solid var(--border-subtle);
            border-radius: var(--radius-md);
            padding: 16px;
            margin-bottom: 12px;
        }
        body.dark-off .yandex-link-card { border-color: var(--border-dark); }
        .yandex-link-meta { font-size: 0.88rem; color: #475569; margin-bottom: 12px; line-height: 1.45; }
        body.dark-off .yandex-link-meta { color: rgb(203, 213, 225); }
        .yandex-link-meta strong { display: block; color: #0f172a; margin-bottom: 4px; }
        body.dark-off .yandex-link-meta strong { color: #fff; }

        .auth-tabs {
            display: flex;
            background: #f1f5f9;
            border-radius: 10px;
            padding: 4px;
            margin-bottom: 22px;
            gap: 4px;
        }
        body.dark-off .auth-tabs { background: rgb(30, 41, 59); }
        .auth-tab {
            flex: 1;
            padding: 9px 10px;
            background: transparent;
            border: none;
            border-radius: 7px;
            font-size: 13px;
            font-weight: 600;
            color: #64748b;
            cursor: pointer;
            font-family: inherit;
        }
        .auth-tab.active {
            color: #fff;
            background: #0f172a;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
        }
        body.dark-off .auth-tab.active { background: var(--primary-600); }
        .auth-forms-wrap { position: relative; }
        .auth-form-view { display: none; }
        .auth-form-view.active { display: block; }
        .auth-or {
            display: flex;
            align-items: center;
            margin: 4px 0 16px;
            color: #94a3b8;
            font-size: 12px;
            font-weight: 600;
        }
        .auth-or::before,
        .auth-or::after {
            content: '';
            flex: 1;
            height: 1px;
            background: var(--border-subtle);
        }
        .auth-or span { padding: 0 12px; }
        body.dark-off .auth-or::before,
        body.dark-off .auth-or::after { background: var(--border-dark); }
        .auth-forgot {
            display: block;
            text-align: right;
            font-size: 12px;
            color: var(--primary-600);
            text-decoration: none;
            margin: -4px 0 14px;
            font-weight: 600;
        }
        .auth-forgot:hover { text-decoration: underline; }

        .auth-call-text { font-size: 0.9rem; color: #475569; margin-bottom: 12px; line-height: 1.5; }
        body.dark-off .auth-call-text { color: rgb(203, 213, 225); }
        .auth-call-number {
            font-size: 1.6rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            color: #0f172a;
            background: #f1f5f9;
            border: 1px solid var(--border-subtle);
            border-radius: var(--radius-md);
            padding: 16px;
            text-align: center;
            margin-bottom: 12px;
            user-select: all;
        }
        body.dark-off .auth-call-number { background: rgb(30, 41, 59); color: #fff; border-color: rgb(51, 65, 85); }
        .auth-call-free { font-size: 0.8rem; color: #64748b; margin-bottom: 20px; line-height: 1.5; }
        body.dark-off .auth-call-free { color: rgb(148, 163, 184); }
        .auth-call-actions { display: flex; gap: 12px; }
        .auth-call-actions .btn-auth { flex: 1; text-align: center; text-decoration: none; }
        .btn-auth-ghost {
            background: transparent;
            color: #475569;
            border: 1px solid var(--border-subtle);
            box-shadow: none;
        }
        .btn-auth-ghost:hover { background: #f1f5f9; box-shadow: none; }
        body.dark-off .btn-auth-ghost { color: rgb(203, 213, 225); border-color: rgb(51, 65, 85); }
        body.dark-off .btn-auth-ghost:hover { background: rgb(30, 41, 59); }

        .auth-card.legal-card { max-width: 720px; }
        .legal-card .auth-title { font-size: 1.3rem; margin-bottom: 18px; }
        .legal-text { font-size: 0.86rem; color: #475569; line-height: 1.65; margin: 0 0 14px; }
        body.dark-off .legal-text { color: rgb(203, 213, 225); }
        .legal-h2 { font-size: 1rem; font-weight: 700; color: #0f172a; margin: 22px 0 10px; }
        body.dark-off .legal-h2 { color: #fff; }
        .legal-list { font-size: 0.86rem; color: #475569; line-height: 1.65; margin: 0 0 14px; padding-left: 20px; }
        body.dark-off .legal-list { color: rgb(203, 213, 225); }
        .legal-list li { margin-bottom: 6px; }
        .legal-card .auth-back { margin-top: 10px; }

        .method-btn { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
        .method-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
        .method-icon { width: 18px; height: 18px; flex-shrink: 0; }
        .method-hint { font-weight: 400; }
        #contact-choice + div { margin-top: 6px; }
        #email-code-wrap button, #email-input-wrap button, #phone-input-wrap button { margin-bottom: 10px; }
        #resend-code:disabled { opacity: 0.6; cursor: not-allowed; }

        .auth-links { margin-top: 24px; text-align: center; font-size: 0.88rem; }
        .auth-links a {
            color: var(--primary-600);
            text-decoration: none;
            font-weight: 600;
            transition: color 0.2s;
        }
        .auth-links a:hover { color: var(--primary-700); text-decoration: underline; }
        body.dark-off .auth-links a { color: var(--primary-400); }
        .auth-back {
            display: inline-block;
            margin-top: 24px;
            font-size: 0.84rem;
            color: #64748b;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.2s, transform 0.2s;
        }
        .auth-back:hover { color: #0f172a; transform: translateX(-2px); }
        body.dark-off .auth-back { color: rgb(148, 163, 184); }
        body.dark-off .auth-back:hover { color: #fff; }
