:root {
            --bg: #f5ede4;
            --card: #ffffff;
            --text: #1f2937;
            --muted: #6b7280;
            --primary: #f97316;
            --primary-strong: color-mix(in srgb, var(--primary) 78%, #000000);
            --border: var(--primary);
            --input: color-mix(in srgb, var(--primary) 8%, #ffffff);
            --danger: #b91c1c;
            --success: #166534;
            --ring: color-mix(in srgb, var(--primary) 22%, transparent);
        }

        * { box-sizing: border-box; }

        body {
            margin: 0;
            min-height: 100vh;
            padding: 24px 22px 26px;
            background:
                radial-gradient(circle at top right, color-mix(in srgb, var(--primary) 24%, #ffffff) 0%, transparent 45%),
                radial-gradient(circle at left bottom, color-mix(in srgb, var(--primary) 16%, #ffffff) 0%, transparent 38%),
                var(--bg);
            color: var(--text);
            font-family: "Segoe UI", Tahoma, sans-serif;
        }

        .login-page {
            max-width: 1100px;
            margin: 0 auto;
            min-height: calc(100vh - 110px);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
        }

        .login-page-tools {
            width: min(520px, 100%);
            display: block;
            margin: 0;
        }

        .login-tools-card {
            width: 100%;
            border: 1px solid var(--border);
            border-radius: 14px;
            background: var(--card);
            padding: 10px 12px;
            box-shadow: 0 8px 20px rgba(124, 45, 18, 0.1);
        }

        .login-tools-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .wrap {
            width: min(520px, 100%);
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 30px 30px 26px;
            box-shadow: 0 18px 40px rgba(124, 45, 18, 0.16);
        }

        .login-tools {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 14px;
            margin-bottom: 0;
        }

        .radio-inputs {
            display: flex;
            border-radius: 10px;
            background: color-mix(in srgb, var(--primary) 12%, #ffffff);
            border: 1px solid var(--border);
            padding: 3px;
            width: 132px;
            height: 40px;
        }

        .radio-inputs .radio,
        .radio-inputs label.radio {
            margin: 0;
            font-size: 12px;
            font-weight: 700;
            flex: 1 1 auto;
        }

        .radio-inputs .radio input {
            display: none;
        }

        .radio-inputs .radio .radio-item {
            display: flex;
            cursor: pointer;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            border: none;
            padding: 0.45rem 0.35rem;
            color: var(--primary);
            font-weight: 700;
            transition: background-color .25s ease, color .25s ease;
            letter-spacing: .04em;
        }

        .radio-inputs .radio input:checked + .radio-item {
            background-color: #ea580c;
            color: #fff;
        }

        .theme-toggle {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--primary);
            font-size: 13px;
            font-weight: 700;
        }

        .switch {
            font-size: 14px;
            position: relative;
            display: inline-block;
            width: 3em;
            height: 1.7em;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            inset: 0;
            background: #f3f4f6;
            border: 1px solid #d1d5db;
            border-radius: 50px;
            transition: all 0.3s ease;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 1.15em;
            width: 1.15em;
            left: 0.25em;
            bottom: 0.23em;
            background-color: #ffffff;
            border-radius: 50px;
            box-shadow: 0 0px 12px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
        }

        .switch input:checked + .slider {
            background: #111827;
            border-color: #111827;
        }

        .switch input:checked + .slider:before {
            transform: translateX(1.35em);
        }

        .brand { text-align: center; margin-bottom: 18px; }
        .brand img { width: 270px; height: 106px; object-fit: contain; }
        .brand-name {
            margin: 0;
            font-size: 34px;
            line-height: 1.05;
            font-weight: 800;
            color: var(--primary);
            letter-spacing: 0.2px;
            text-transform: uppercase;
        }
        .subtitle { margin: 0; color: var(--muted); font-size: 18px; }

        .msg {
            margin: 10px 0;
            padding: 10px 12px;
            border-radius: 10px;
            font-size: 13px;
        }

        .err { color: var(--danger); background: #fef2f2; border: 1px solid #fecaca; }
        .ok { color: var(--success); background: #f0fdf4; border: 1px solid #bbf7d0; }

        form { margin-top: 14px; }

        label {
            display: block;
            margin: 14px 0 7px;
            font-size: 16px;
            font-weight: 700;
            letter-spacing: 0;
            color: #111827;
        }

        input {
            width: 100%;
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 12px;
            font-size: 16px;
            background: var(--input);
            color: var(--text);
            outline: none;
            transition: border-color .15s ease, box-shadow .15s ease;
        }

        input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 4px var(--ring);
        }

        .password-wrap {
            position: relative;
        }

        .password-wrap input {
            padding-right: 46px;
        }

        .toggle-pass {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            border: 0;
            background: transparent;
            cursor: pointer;
            padding: 4px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .toggle-pass img {
            width: 20px;
            height: 20px;
            display: block;
        }

        .verify-box {
            margin-top: 14px;
            border: 1px dashed var(--border);
            background: var(--input);
            border-radius: 12px;
            padding: 12px;
            overflow: hidden;
        }

        .verify-box .g-recaptcha {
            display: inline-block;
            max-width: 100%;
            overflow: visible;
            transform-origin: left top;
        }

        .verify-note {
            margin: 0 0 10px;
            color: var(--primary);
            font-weight: 600;
            font-size: 15px;
        }

        .btn {
            width: 100%;
            margin-top: 16px;
            border: 0;
            border-radius: 10px;
            padding: 12px;
            font-size: 16px;
            font-weight: 700;
            color: #fff;
            background: linear-gradient(180deg, var(--primary), var(--primary-strong));
            cursor: pointer;
        }

        .btn:hover { filter: brightness(1.03); }

        .links {
            margin-top: 12px;
            display: flex;
            justify-content: space-between;
            gap: 10px;
            font-size: 13px;
        }

        .links a { color: var(--primary); text-decoration: none; }
        .links a:hover { text-decoration: underline; }

        .google-btn {
            margin-top: 10px;
            width: 100%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            border: 1px solid #d1d5db;
            border-radius: 10px;
            padding: 11px 12px;
            background: #fff;
            color: #111827;
            font-size: 15px;
            font-weight: 700;
            text-decoration: none;
            transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
        }

        .google-btn:hover {
            border-color: #9ca3af;
            background: #f9fafb;
            box-shadow: 0 4px 14px rgba(17, 24, 39, 0.08);
        }

        .google-icon {
            width: 18px;
            height: 18px;
            display: block;
        }

        .google-btn-disabled {
            opacity: .65;
            cursor: not-allowed;
        }

        .mt-8 {
            margin-top: 8px;
        }

        .mt-10 {
            margin-top: 10px;
        }

        .login-dialog-backdrop {
            position: fixed;
            inset: 0;
            z-index: 1200;
            display: none;
            align-items: center;
            justify-content: center;
            background: rgba(17, 24, 39, 0.55);
            padding: 16px;
        }

        .login-dialog-backdrop.is-open {
            display: flex;
        }

        .login-dialog {
            width: min(420px, 100%);
            background: #fff;
            border: 1px solid var(--border);
            border-radius: 14px;
            box-shadow: 0 16px 36px rgba(124, 45, 18, 0.22);
            overflow: hidden;
        }

        .login-dialog-head {
            padding: 12px 14px;
            background: color-mix(in srgb, var(--primary) 12%, #ffffff);
            border-bottom: 1px solid var(--border);
            color: var(--primary);
            font-size: 16px;
            font-weight: 800;
        }

        .login-dialog-body {
            padding: 14px;
            color: #1f2937;
            white-space: pre-wrap;
        }

        .login-dialog-actions {
            display: flex;
            justify-content: flex-end;
            padding: 10px 14px 14px;
            border-top: 1px solid var(--border);
            background: var(--input);
        }

        .login-dialog-btn {
            border: 1px solid var(--primary);
            background: var(--primary);
            color: #fff;
            border-radius: 10px;
            padding: 8px 12px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
        }

        html[data-theme="dark"] body {
            background:
                radial-gradient(circle at top right, #2a1f16 0%, transparent 45%),
                radial-gradient(circle at left bottom, #2a1a10 0%, transparent 38%),
                #111827;
            color: #e5e7eb;
        }

        html[data-theme="dark"] .wrap {
            background: #111827;
            border-color: #374151;
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
        }

        html[data-theme="dark"] .login-tools-card {
            background: #111827;
            border-color: #374151;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
        }

        html[data-theme="dark"] .brand-name,
        html[data-theme="dark"] label {
            color: #f59e0b;
        }

        html[data-theme="dark"] .subtitle,
        html[data-theme="dark"] .links a,
        html[data-theme="dark"] .theme-toggle {
            color: #d1d5db;
        }

        html[data-theme="dark"] input,
        html[data-theme="dark"] .verify-box,
        html[data-theme="dark"] .google-btn,
        html[data-theme="dark"] .radio-inputs,
        html[data-theme="dark"] .login-dialog,
        html[data-theme="dark"] .login-dialog-actions {
            background: #1f2937;
            border-color: #374151;
            color: #e5e7eb;
        }

        html[data-theme="dark"] .google-btn:hover {
            background: #111827;
            border-color: #4b5563;
        }

        html[data-theme="dark"] .verify-note,
        html[data-theme="dark"] .login-dialog-head {
            color: #fbbf24;
            background: #1f2937;
            border-color: #374151;
        }

        html[data-theme="dark"] .login-dialog-body {
            color: #e5e7eb;
            background: #111827;
        }

        @media (max-width: 520px) {
            body {
                padding: 18px 14px 16px;
            }
            .radio-inputs {
                width: 106px;
                height: 34px;
            }
            .theme-toggle {
                font-size: 11px;
                gap: 6px;
            }
            .switch {
                font-size: 12px;
            }
            .wrap { padding: 22px 18px; }
            .subtitle { font-size: 16px; }
            label { font-size: 15px; }
            .brand img { width: 220px; height: 88px; }

            .verify-box {
                padding: 10px;
            }
        }
