        /* ===== ACCOUNT PICKER ===== */
        .account-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
            gap: 12px;
        }
        .account-card {
            position: relative;
            background: var(--input-bg);
            border: 1px solid transparent;
            border-radius: 10px;
            padding: 20px 12px 14px;
            cursor: pointer;
            transition: background 0.15s ease, border-color 0.15s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            min-width: 0;
        }
        .account-card:hover {
            background: #2b3a4d;
            border-color: var(--accent);
        }
        .account-card.busy {
            pointer-events: none;
            opacity: 0.5;
        }
        .account-card.failed {
            border-color: var(--danger);
        }
        .account-avatar {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 500;
            font-size: 1.25rem;
            color: white;
            text-transform: uppercase;
            margin-bottom: 10px;
        }
        .account-name {
            font-size: 0.9rem;
            font-weight: 500;
            color: white;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .account-handle {
            font-size: 0.75rem;
            color: var(--text-secondary);
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .account-session {
            font-size: 0.65rem;
            color: var(--text-secondary);
            opacity: 0.65;
            font-family: 'Fira Code', monospace;
            margin-top: 3px;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .account-active-tag {
            position: absolute;
            top: 7px;
            right: 7px;
            font-size: 0.58rem;
            background: var(--accent);
            color: white;
            padding: 2px 6px;
            border-radius: 4px;
        }
        .account-card.add {
            border: 1px dashed var(--panel-border);
            background: transparent;
            justify-content: center;
        }
        .account-card.add:hover {
            background: var(--input-bg);
            border-style: solid;
        }
        .account-add-icon {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.7rem;
            color: var(--accent);
            background: var(--input-bg);
            margin-bottom: 10px;
        }
        .account-card.add:hover .account-add-icon {
            background: var(--sidebar-bg);
        }
        .account-card-error {
            font-size: 0.65rem;
            color: #f87171;
            margin-top: 5px;
            line-height: 1.3;
        }
        .account-spinner {
            position: absolute;
            top: 8px;
            left: 8px;
            width: 14px;
            height: 14px;
            border: 2px solid rgba(255,255,255,0.2);
            border-left-color: var(--accent);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        .login-back {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 0.82rem;
            cursor: pointer;
            padding: 8px;
            margin-top: 6px;
        }
        .login-back:hover {
            color: var(--accent);
        }

        /* Switch-account button in the sidebar header */
        .me-chip {
            display: flex;
            align-items: center;
            gap: 8px;
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 2px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        .me-chip:hover .account-avatar-sm {
            box-shadow: 0 0 0 2px var(--accent);
        }
        .account-avatar-sm {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            font-weight: 500;
            color: white;
            text-transform: uppercase;
            transition: box-shadow 0.15s ease;
        }
        .login-logo {
            font-size: 4rem;
            margin-bottom: 10px;
        }
        .login-title {
            font-size: 1.5rem;
            font-weight: 600;
            color: white;
            margin-bottom: 6px;
        }
        .login-subtitle {
            font-size: 0.95rem;
            color: var(--text-secondary);
            margin-bottom: 30px;
        }
        .login-session-select {
            width: 100%;
            background: var(--input-bg);
            border: none;
            color: white;
            padding: 12px 16px;
            border-radius: 8px;
            outline: none;
            font-size: 0.95rem;
            margin-bottom: 16px;
            appearance: auto;
        }
        .login-input {
            width: 100%;
            background: var(--input-bg);
            border: none;
            border-radius: 8px;
            padding: 12px 16px;
            color: white;
            font-size: 1rem;
            outline: none;
            margin-bottom: 16px;
            transition: all 0.2s;
        }
        .login-input:focus {
            background: #2e3c4a;
        }
        .login-input::placeholder {
            color: var(--text-secondary);
        }
        .login-btn {
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 8px;
            font-weight: 500;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.2s;
            margin-bottom: 12px;
        }
        .login-btn-primary {
            background: var(--accent);
            color: white;
        }
        .login-btn-primary:hover {
            background: #2f83d8;
        }
        .login-btn-primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        .login-hint {
            font-size: 0.85rem;
            color: var(--success);
            margin-bottom: 16px;
            padding: 10px;
            background: rgba(76, 175, 80, 0.1);
            border-radius: 8px;
        }
        .login-error {
            font-size: 0.85rem;
            color: #f87171;
            margin-bottom: 16px;
            padding: 10px;
            background: rgba(239, 68, 68, 0.1);
            border-radius: 8px;
        }
        .login-step-label {
            font-size: 0.75rem;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 20px;
        }
        .login-spinner {
            display: inline-block;
            border: 3px solid rgba(255,255,255,0.2);
            width: 18px;
            height: 18px;
            border-radius: 50%;
            border-top-color: white;
            animation: spin 0.8s linear infinite;
            vertical-align: middle;
            margin-right: 8px;
        }
