 body {
            align-items: center;
            justify-content: center;
            background: radial-gradient(circle at top, #1e293b, #0b0f17);
            color: var(--text-primary);
            min-height: 100vh;
            display: flex;
            transition: background 0.3s ease, color 0.3s ease;
        }

        html[data-theme="light"] body {
            background: radial-gradient(circle at top, #f8fafc, #e2e8f0);
            color: #0f172a;
        }

        .login-card {
            background-color: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            width: 100%;
            max-width: 420px;
            padding: 2.5rem;
            box-shadow: var(--shadow-md);
            transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
        }

        html[data-theme="light"] .login-card {
            background-color: #ffffff;
            border-color: #e2e8f0;
            box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
            color: #0f172a;
        }

        html[data-theme="light"] .login-title {
            color: #0f172a;
        }

        html[data-theme="light"] .login-sub {
            color: #475569;
        }

        html[data-theme="light"] .form-label {
            color: #334155;
        }

        html[data-theme="light"] .form-input {
            background-color: #ffffff;
            border-color: #cbd5e1;
            color: #0f172a;
        }

        html[data-theme="light"] .form-input:focus {
            border-color: #0284c7;
            box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
        }

        html[data-theme="light"] .password-toggle {
            color: #64748b;
        }

        html[data-theme="light"] .password-toggle:hover {
            color: #0f172a;
            background: rgba(0, 0, 0, 0.05);
        }

        html[data-theme="light"] .demo-hint {
            border-top-color: #e2e8f0;
            color: #64748b;
        }

        html[data-theme="light"] .signup-nav-link {
            border-top-color: #e2e8f0;
            color: #475569;
        }

        .login-brand {
            text-align: center;
            margin-bottom: 2rem;
        }

        .login-logo {
            width: 50px;
            height: 50px;
            border-radius: 12px;
            background: linear-gradient(135deg, var(--accent), #8b5cf6);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            margin-bottom: 1rem;
        }

        .login-title {
            font-size: 1.5rem;
            font-weight: 800;
        }

        .login-sub {
            font-size: 0.875rem;
            color: var(--text-secondary);
            margin-top: 0.25rem;
        }

        .alert-error {
            background: rgba(239, 68, 68, 0.12);
            border: 1.5px solid rgba(239, 68, 68, 0.35);
            color: #f87171;
            padding: 0.85rem 1rem;
            border-radius: 10px;
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 1.25rem;
            text-align: left;
            display: flex;
            align-items: center;
            gap: 8px;
            line-height: 1.45;
        }

        html[data-theme="light"] .alert-error {
            background-color: #fff1f2;
            border-color: #fecdd3;
            color: #be123c;
        }

        .login-btn {
            width: 100%;
            padding: 0.75rem;
            font-size: 1rem;
            font-weight: 700;
            background-color: var(--accent);
            color: white;
            border: none;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: background 0.2s;
            margin-top: 1rem;
        }

        .login-btn:hover {
            background-color: var(--accent-hover);
        }

        .login-btn:disabled {
            cursor: wait;
            opacity: 0.8;
        }

        .login-btn[aria-busy="true"] {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.55rem;
        }

        .login-spinner {
            width: 16px;
            height: 16px;
            border: 2px solid rgba(255, 255, 255, .4);
            border-top-color: #fff;
            border-radius: 50%;
            animation: login-spin .7s linear infinite;
        }

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

        .password-field {
            position: relative;
            width: 100%;
        }

        .password-field .form-input {
            width: 100%;
            padding-right: 3rem;
        }

        .password-toggle {
            position: absolute;
            top: 50%;
            right: 0.65rem;
            transform: translateY(-50%);
            display: grid;
            place-items: center;
            width: 2rem;
            height: 2rem;
            color: var(--text-muted);
            border-radius: 6px;
            cursor: pointer;
        }

        .password-toggle:hover {
            color: var(--text-primary);
            background: rgba(255, 255, 255, .06);
        }

        .password-toggle svg {
            width: 18px;
            height: 18px;
        }

        .password-toggle .eye-off {
            display: none;
        }

        .password-toggle[aria-pressed="true"] .eye-on {
            display: none;
        }

        .password-toggle[aria-pressed="true"] .eye-off {
            display: block;
        }

        .demo-hint {
            margin-top: 1.25rem;
            padding-top: 1rem;
            border-top: 1px solid var(--border-color);
            font-size: 0.75rem;
            color: var(--text-muted);
            text-align: center;
            line-height: 1.5;
        }

        .signup-nav-link {
            margin-top: 1.5rem;
            text-align: center;
            font-size: 0.88rem;
            color: var(--text-secondary);
            border-top: 1px solid var(--border-color);
            padding-top: 1.25rem;
        }

        .signup-nav-link a {
            color: #38bdf8;
            font-weight: 700;
            text-decoration: none;
            margin-left: 0.25rem;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            transition: color 0.2s;
        }

        .signup-nav-link a:hover {
            color: #7dd3fc;
            text-decoration: underline;
        }

        /* Telegram-Only Touchpoint & Tenant Selection Styles */
        .telegram-auth-container {
            display: none;
            text-align: center;
        }

        .telegram-auth-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 56px;
            height: 56px;
            border-radius: 16px;
            background: linear-gradient(135deg, #0284c7, #0369a1);
            color: #ffffff;
            margin: 0 auto 1.25rem auto;
            box-shadow: 0 8px 24px rgba(2, 132, 199, 0.3);
            animation: pulse-glow 2.5s infinite;
        }

        @keyframes pulse-glow {

            0%,
            100% {
                box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.4);
            }

            50% {
                box-shadow: 0 0 0 10px rgba(2, 132, 199, 0);
            }
        }

        .tenant-selection-title {
            font-size: 1.2rem;
            font-weight: 800;
            margin-bottom: 0.35rem;
            color: var(--text-primary);
        }

        .tenant-selection-sub {
            font-size: 0.84rem;
            color: var(--text-muted);
            margin-bottom: 1.35rem;
            line-height: 1.45;
        }

        .account-cards-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            margin-bottom: 1rem;
            text-align: left;
            max-height: 380px;
            overflow-y: auto;
            padding-right: 2px;
        }

        .account-card {
            display: flex;
            align-items: center;
            gap: 0.85rem;
            padding: 0.85rem 1rem;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
            text-decoration: none;
            color: inherit;
        }

        html[data-theme="light"] .account-card {
            background: #f8fafc;
            border-color: #e2e8f0;
        }

        .account-card:hover {
            transform: translateY(-2px);
            border-color: rgba(56, 189, 248, 0.6);
            background: rgba(56, 189, 248, 0.08);
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
        }

        html[data-theme="light"] .account-card:hover {
            background: #f0f9ff;
            border-color: #0284c7;
            box-shadow: 0 6px 18px rgba(2, 132, 199, 0.12);
        }

        .account-card:active {
            transform: translateY(0);
        }

        .account-card.loading {
            pointer-events: none;
            opacity: 0.65;
        }

        .account-avatar {
            width: 44px;
            height: 44px;
            border-radius: 10px;
            object-fit: cover;
            background: linear-gradient(135deg, #334155, #1e293b);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.15rem;
            font-weight: 750;
            color: #38bdf8;
            flex-shrink: 0;
            border: 1px solid rgba(255, 255, 255, 0.08);
        }

        html[data-theme="light"] .account-avatar {
            background: linear-gradient(135deg, #e0f2fe, #bae6fd);
            color: #0284c7;
            border-color: #cbd5e1;
        }

        .account-details {
            flex: 1;
            min-width: 0;
        }

        .account-name {
            font-size: 0.95rem;
            font-weight: 750;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 2px;
        }

        .account-slug {
            font-size: 0.76rem;
            color: var(--text-muted);
            font-family: monospace;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .role-badge {
            font-size: 0.7rem;
            font-weight: 700;
            padding: 0.22rem 0.55rem;
            border-radius: 9999px;
            text-transform: capitalize;
            letter-spacing: 0.02em;
            flex-shrink: 0;
        }

        .role-badge.role-owner {
            background: rgba(245, 158, 11, 0.15);
            color: #f59e0b;
            border: 1px solid rgba(245, 158, 11, 0.35);
        }

        .role-badge.role-admin,
        .role-badge.role-co-admin {
            background: rgba(16, 185, 129, 0.15);
            color: #34d399;
            border: 1px solid rgba(16, 185, 129, 0.35);
        }

        .role-badge.role-manager {
            background: rgba(56, 189, 248, 0.15);
            color: #38bdf8;
            border: 1px solid rgba(56, 189, 248, 0.35);
        }

        .role-badge.role-staff,
        .role-badge.role-clerk {
            background: rgba(168, 85, 247, 0.15);
            color: #c084fc;
            border: 1px solid rgba(168, 85, 247, 0.35);
        }

        .account-arrow {
            color: var(--text-muted);
            transition: transform 0.2s;
            flex-shrink: 0;
        }

        .account-card:hover .account-arrow {
            transform: translateX(3px);
            color: #38bdf8;
        }

        .telegram-alert-card {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 12px;
            padding: 1.35rem;
            text-align: center;
            margin-bottom: 1.25rem;
            color: var(--text-primary);
        }

        .telegram-alert-card h3 {
            font-size: 1rem;
            font-weight: 750;
            color: #f87171;
            margin-bottom: 0.4rem;
        }

        .telegram-alert-card p {
            font-size: 0.84rem;
            color: var(--text-secondary);
            line-height: 1.45;
            margin-bottom: 1rem;
        }

        .tg-cta-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            width: 100%;
            padding: 0.78rem 1rem;
            border-radius: 8px;
            background: linear-gradient(135deg, #0284c7, #0369a1);
            color: #ffffff;
            font-size: 0.9rem;
            font-weight: 750;
            text-decoration: none;
            transition: all 0.2s;
            border: none;
            cursor: pointer;
        }

        .tg-cta-btn:hover {
            background: linear-gradient(135deg, #0369a1, #075985);
            box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
        }